Commit Graph

15 Commits

Author SHA1 Message Date
tigerenwork 44e53e373d chore: 版本号更新至 1.5 (build 5) 2026-07-26 23:01:01 +08:00
tigerenwork a0b1fb8aa3 chore: 升级版本至 1.4 并将校准设置移至独立 Section 2026-07-10 02:07:43 +08:00
tigerenwork be384c9238 feat: 增强推送可靠性:指数退避重连、校准服务与飞书按人过滤查询 2026-07-10 01:59:05 +08:00
tigerenwork 01db8e5347 chore: 版本升级至 1.3 并更新构建号
- MARKETING_VERSION 更新为 1.3
- CURRENT_PROJECT_VERSION 更新为 4
- Info.plist 同步更新版本号与构建号
2026-07-08 12:06:16 +08:00
tigerenwork c275c71b55 feat(bitable): 支持通过 SSE 订阅 Bitable 变更并实时刷新
- 新增 BitableEventService,通过 SSE 监听飞书变更推送,收到 change 事件即触发 fetchNow
- AppConfig 新增 feishuAppBaseURL 字段,置空时禁用实时推送、回退轮询
- 设置页新增 "Real-time updates" 区块,支持配置订阅地址并随保存重连
- AppDelegate 启动时自动连接 SSE;断开飞书时同步断开
- 流断开后 30s 自动重连,显式 disconnect 不重连
- Info.plist 放开 ATS 以支持 HTTP 订阅服务(localhost/局域网)
2026-07-08 11:26:47 +08:00
tigerenwork 71e56f8d2b chore: 版本升级至 1.2 并优化构建脚本版本读取 2026-07-05 20:42:19 +08:00
tigerenwork 7047c51a07 feat: 浮动窗口支持自适应尺寸并锚定右下角 2026-07-05 16:14:58 +08:00
tigerenwork f7682ae7cf chore: bump version to 1.1 (build 2) 2026-06-29 21:55:01 +08:00
tigerenwork 12e22da9b3 fix: change HTTP request/response logging from .debug to .info level
Debug-level os.Logger messages are filtered out in Console.app by default,
hiding the actual OAuth token exchange request/response. Changed all
FeishuAuthService.send() log calls to .info level so they appear without
changing Console filter settings.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-29 00:23:07 +08:00
tigerenwork e275e49795 feat: add comprehensive debug logging to OAuth flow
Added os.Logger-based logging (subsystem: com.xorbitlab.bugger) covering:
- FeishuAuthService.send(): raw HTTP request URL, method, body, auth header,
  response status code, and raw response body (up to 1000 chars)
- exchangeCode(): before/after token exchange with token previews
- TokenManager.handleCallback(): each step with success/failure
- LocalOAuthServer: server start, connection received, code extracted

View logs in: Xcode debug console, or Console.app → filter 'bugger'

Also fixed type inference ambiguity in generic send<T>() calls.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-29 00:18:25 +08:00
tigerenwork 74baa22d27 fix: wider settings window, better OAuth error handling, empty refresh token guard
- SettingsWindow: widened to 500pt min, connection result on its own line
  with multiline support (error messages no longer truncated)
- OAuthSetupView: clear statusMessage on error, added 'Try again' button
  when authorization fails, disable Connect button while in progress
- TokenManager: guard against empty refresh token strings (was stored as ''
  when Feishu didn't return refresh_token, causing confusing 'No Feishu
  session' error after access token expired)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-29 00:09:28 +08:00
tigerenwork 9f8fb52726 feat: switch OAuth redirect to localhost loopback (RFC 8252)
Feishu rejected the 'bugger://' custom URL scheme redirect with 参数不合法.
Switched to the standard desktop OAuth flow: a one-shot local HTTP server
on 127.0.0.1:18923 that receives the authorization code from the browser.

Changes:
- Added LocalOAuthServer (Network.framework, one-shot HTTP listener)
- FeishuAuthService now uses dynamic http://127.0.0.1:PORT/callback redirect
- Removed CFBundleURLTypes from Info.plist (no custom scheme needed)
- Removed NSAppleEventManager handler from AppDelegate
- TokenManager.handleCallback changed from URL to code string
- OAuthSetupView starts server before opening browser
- Added offline_access scope for refresh token support
- generate_xcode_project.py: removed dev cert requirements,
  auto-quotes paths with special chars

Builds successfully with xcodebuild.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-28 23:48:49 +08:00
tigerenwork bda106dcad fix: pbxproj now parses with Xcode 26
Root cause: filenames containing '+' (Color+Extensions.swift,
DateFormatter+Extensions.swift, URL+Feishu.swift) had their path values
unquoted in PBXFileReference entries. In NeXTSTEP plist format, '+'
is an operator character — the parser interpreted 'path = Utils/Color'
followed by '+Extensions.swift' as an addition expression instead of
a file path, causing a parse error.

Fixes:
- Added quote_path() to escape paths with special characters
- Regenerated pbxproj with all 25 source files, subdirectory groups
- Fixed workspace contents.xcworkspacedata (was empty)
- Cleaned up generator script (removed dead code, added scheme gen)
- Proper SWIFT_OPTIMIZATION_LEVEL quoting

Verified: xcodebuild -list parses the project successfully.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-28 21:33:02 +08:00
tigerenwork c57ab859eb fix: rewrite pbxproj to fix duplicate groups and broken hierarchy
- Removed duplicate PBXGroup definitions (Models, Services, Views, etc.)
- Removed orphan groups (.claude, docs, scripts, etc.)
- Added proper Products group for productRefGroup reference
- Fixed main group to reference Sources, Resources, Products
- Clean single-definition group hierarchy

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-28 20:59:51 +08:00
tigerenwork d9d8ce3e46 feat: full macOS menu bar app implementation
SwiftUI macOS menu bar app for tracking Feishu Bitable bugs:
- Menu bar icon with active bug count badge
- Popover with bug list sorted by priority, click to open in Feishu
- Floating always-on-top widget (NSPanel, optional)
- OAuth 2.0 flow with Feishu Open API (user_access_token + refresh)
- PollerService with configurable interval (default 5 min)
- Diff engine detecting new bugs, status/priority/assignee changes
- Native macOS notifications (UserNotifications framework)
- Keychain-backed token storage
- Settings window with field mapping, polling interval, widget toggle
- Support for custom Bitable column name mappings
- Zero third-party dependencies

17 source files across Models/Services/Views/ViewModels/Utils layers.
Xcode project generated via scripts/generate_xcode_project.py.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-28 20:56:44 +08:00