Skip to content

Add SubSwitcher Bar, a macOS menu bar app for cached usage - #1

Merged
whi02 merged 2 commits into
mainfrom
feat/macos-menubar
Oct 28, 2026
Merged

whi02 merged 2 commits into
mainfrom
feat/macos-menubar

Conversation

@whi02

@whi02 whi02 commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • New macos/ app (SwiftUI MenuBarExtra, macOS 14+) showing each Claude account's five-hour and seven-day usage plus time to reset.
  • Reads only what Claude Code cached: shared config, ~/.claude-* slot configs and profiles.json. Freshest value per account wins; every account shows its observation age, and windows whose reset time has passed read 0%.
  • With SubSwitcher, the shared config's numbers are attributed to the active profile (they were observed stamped with a previous account's uuid while reset times matched the active one).
  • Refuses profiles.json versions newer than it understands; PROFILES_VERSION comment points at that check.
  • Compliance audit now also scans macos/Sources/**/*.swift for network (URLSession, WebKit…), keychain (SecItem*) and process execution, with self-test fixtures.
  • CI gets a macos-latest job that builds the app; .vscodeignore keeps macos/ out of the .vsix.
  • README (ko/en): new SubSwitcher Bar section.

Test plan

  • npm run check — typecheck, compliance audit (27 fixtures, 19 files), 87 tests pass
  • macos/scripts/build_app.sh builds and the app runs (Command Line Tools only)
  • Reader output on a real machine with three Pro slots matches the cached files; active account's 7-day value (65%) matches claude.ai settings
  • macos CI job on GitHub runner

🤖 Generated with Claude Code

whi02 and others added 2 commits October 28, 2026 15:40
Shows each Claude account's five-hour and seven-day usage, with time to reset, from the macOS menu bar. It only reads what Claude Code already cached: the shared config, each ~/.claude-* slot's config and profiles.json, keeping the freshest value per account and showing how old it is. No network, keychain or process access, and the compliance audit now checks the Swift sources for all three.

With SubSwitcher the shared config's numbers are fetched with the active slot's credentials but can still be stamped with a previous account's uuid, so they are attributed to the active profile. The app ignores profiles.json versions newer than it understands; PROFILES_VERSION now points at that check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@whi02
whi02 merged commit ccf9760 into main Oct 28, 2026
2 checks passed
@whi02
whi02 deleted the feat/macos-menubar branch October 28, 2026 06:45
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