fix(codeburn): restore menubar project token reporting#565
Conversation
ozymandiashh
left a comment
There was a problem hiding this comment.
Thanks — restoring accurate per-project token totals in the menubar is a real improvement.
Status: needs a rebase before review/merge — it currently conflicts with main. The menubar surface was reworked heavily after this PR's base (2026-06-23), and every core file this PR touches has changed since:
src/menubar-json.tsandtests/menubar-json.test.ts(2 commits each)src/usage-aggregator.ts,mac/.../Data/MenubarPayload.swift,mac/.../CodeBurnApp.swift
Relevant landings include #549 (show every active agent as a tab), #567/#568 (combined multi-device usage in menubar-json), and #598 (menubar plan tab / model-scoped limits).
It's not superseded — I don't see the duplicate-project-row grouping or the project/session token totals in menubar-json on main today — but before a full review please:
- Rebase onto current
mainand resolve themenubar-json.ts/usage-aggregator.ts/MenubarPayload.swiftconflicts against the new shape of those files. - Re-confirm the problem still reproduces after the rework — some of the row-duplication behavior may interact with the new per-agent tab / combined-usage code, so a fresh before/after (the
smoke-popover.shyou added is perfect for this) would help. - Keep the Swift decoder change backward-compatible with the current
MenubarPayloadschema onmain(it moved).
Once rebased + CI-green I'll run the full adversarial review. Thanks for the smoke script and verification notes — that's exactly the right instinct.
Summary
Verification
Note:
swift testis blocked in this local toolchain byno such module Testingbefore task tests run. Full parallelnpm testhit 5000ms timeouts in four heavy CLI test files; those files pass when rerun sequentially with a 30000ms timeout.