Add menubar cost/tokens toggle#307
Conversation
|
Validation run on macOS arm64 with real local usage data. No project names, prompts, paths, session IDs, or internal product details are included here. Commands run:
Results:
Swift unit tests were not used for this validation because the current local Swift test target is blocked by the pre-existing |
bc396f5 to
c078641
Compare
|
Visual validation for #307 after the latest rebase and token-total fix. Update after contributor review: the earlier screenshot showed inflated token totals because Tokens mode was including cache read/write buckets. That screenshot has been replaced. Follow-up fix pushed in
Validation/proof:
Swift unit tests were not used for the final proof because the current local Swift test target is blocked before filtered tests run by the existing unrelated |


Summary
Rebases the menubar Cost/Tokens toggle onto current
mainand keeps the original #305 behavior intact after the CLI split and daily-cache changes.This lets users switch the same menubar surface between dollar cost and total token traffic when tokens are the more useful signal, especially on flat-rate plans.
Closes #305.
What changed
Cost | Tokensheadline metric in the macOS menubar app.0.mainis already v7, and v7 entries still lack per-category token totals, so older cache files are backed up and rebuilt cleanly.Validation
npx vitest run- 60 files / 861 tests passed.npx vitest run tests/menubar-json.test.ts tests/day-aggregator.test.ts tests/daily-cache.test.ts- 42/42 tests passed.npm run build- passed.swift build- passed.git diff --check- passed.Notes
swift test --filter MenubarPayloadTestsis still blocked locally by the existing Swift test-target/toolchain issue:no such module 'Testing'in existing test files.