Commit graph

3 commits

Author SHA1 Message Date
Resham Joshi
3f14d95118
fix(menubar): older menubar apps load again, and in-app Update restarts the app (#1548)
* fix(menubar): always emit avgCostPerSession for older menubar apps

Menubar 0.9.14-0.9.24 decode topProjects[].avgCostPerSession as required,
so omitting it for partial session counts broke Today with any 0.9.25 CLI.
Emit the 0.9.24 value again and keep sessionCountBasis so 0.9.25+ hides
a partial average. Add a test that checks the payload against the
required keys of every released menubar app.

* fix(menubar): restart the app after an in-app update

The app runs `codeburn menubar --force` as its child, and pgrep/pkill
skip their own ancestors, so the running app was never stopped and
`open` re-activated the old copy. Find the app with pgrep -a; when it is
an ancestor, swap the bundle while it runs, exit, and let a detached
helper stop it and open the new bundle. The terminal path stops the app
first as before.

Reported in #1541, thanks @AleksandrLiadov.
2026-09-24 20:07:25 +02:00
iamtoruk
df38e63849 fix(usage): fold Windows case in spend identity, qualify --json counts, drop scratch tests 2026-09-07 14:56:32 -07:00
Aditya Vikram Singh
f5fd47e83d fix(usage): preserve project identity and qualify incomplete session counts 2026-09-07 22:02:54 +05:30