Skip to content

feat(macos): regroup menu bar and notify on updates instead of manual checks - #348

Merged
Fei-Away merged 2 commits into
mainfrom
feat/menubar-reorg-and-update-notify
Aug 8, 2026
Merged

feat(macos): regroup menu bar and notify on updates instead of manual checks#348
Fei-Away merged 2 commits into
mainfrom
feat/menubar-reorg-and-update-notify

Conversation

@Fei-Away

@Fei-Away Fei-Away commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Regroup the status-item menu (~16 flat items) into 主题 (background/import ZIP/saved themes/open folders), 链接 (Gallery/Studio/website), and 维护 (engine reinstall/manual update check/restore+uninstall) submenus. Only 重新应用皮肤(/暂修复并应用/应用皮肤), 暂停皮肤 (conditional), 打开 ChatGPT, and 退出 stay flat at top level — those are the actions used every session.
  • Replace the always-visible "检查更新…" item with a background check (every 24h, plus once ~15s after launch) via the existing check-update-macos.sh --json. When a new version is found, it posts a system notification the first time that version is seen (tracked in UserDefaults, so it won't renotify daily for the same release) and shows a top-level "🆕 发现新版本 vX.X.X" item only while one is actually available — clicking either opens the release page. A manual "立即检查更新" stays in 维护 for anyone who wants to force a check.

Not covered

The menu bar app has no localization at all (no NSLocalizedString/.lproj, hardcoded zh_CN strings throughout) — out of scope here, flagged separately.

Verification

  • NODE=$(which node) bash macos/tests/run-tests.sh passes (shell/JS static + integration suite).
  • Could not run swift build/swift test locally — this sandbox's Command Line Tools ship Swift 5.10 against a macOS 15.2 SDK that requires Swift 6.0.3 (pre-existing toolchain mismatch, unrelated to this change; run-tests.sh itself skips the native Swift step here for the same reason). Manually re-read the full diff for signature/type correctness (caught and removed one dead parameter). CI's macos-latest job (swift test --package-path macos/menubar-app + full DMG build) is the real compile gate for this PR — please don't merge until that's green, ideally with an actual click-through of the new submenu layout and one real "update available" notification since I can't screenshot a native NSMenu from here.

…manual checks

The status-item menu had grown to ~16 flat top-level items. Regroup into
"主题" (background/import/saved themes/folders), "链接" (Gallery/Studio/
website), and "维护" (engine reinstall/manual update check/restore+uninstall)
submenus, keeping only the two most-used actions (reapply skin, open
ChatGPT) and Quit flat at the top level.

Replace the always-present "检查更新…" item with a background check every
24h (plus once ~15s after launch) that posts a system notification the
first time a given version is seen, and shows a top-level "🆕 发现新版本"
item only while one is actually available. Manual "立即检查更新" still lives
in 维护 for anyone who wants to force a check.
- Give the background and manual update-check paths a dedicated
  updateCheckInFlight guard so a manual click during the 24h/15s
  background check can't spawn a second concurrent
  check-update-macos.sh, and split checkForUpdates' guard so hitting
  that (or the busy state) shows nothing instead of a misleading
  "update script missing, reinstall" error.
- "立即检查更新" is now also disabled while either check is running.
- docs/install-macos.md still described the old click-to-check-only
  behavior; describe the new background+notification flow.
@Fei-Away
Fei-Away merged commit 138c4b3 into main Aug 8, 2026
4 checks passed
@Fei-Away Fei-Away mentioned this pull request Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant