Commit graph

371 commits

Author SHA1 Message Date
AgentSeal
37a54081b2 Release 0.9.1: yield command
Some checks are pending
CI / semgrep (push) Waiting to run
Adds `codeburn yield` to track which AI sessions shipped to main vs were reverted or abandoned.
2026-04-25 17:11:37 +02:00
AgentSeal
54c035f5aa docs: add yield command to README
Some checks are pending
CI / semgrep (push) Waiting to run
2026-04-25 14:17:50 +02:00
AgentSeal
6eb9ba0a3b chore: clean up yield.ts - remove redundant comments and dead code 2026-04-25 14:04:16 +02:00
iamtoruk
1c5ca45bd8 Add experimental yield command to track productive vs wasted spend
New command: codeburn yield --period <period>

Correlates AI sessions with git commits to categorize spend:
- Productive: sessions with nearby commits that made it to main
- Reverted: sessions with commits that were reverted
- Abandoned: sessions with no commits or not in main

Uses timestamp proximity heuristic (session time + 1 hour window).
Works across branches, squash merges, and rebases by checking
if commits are in main branch ancestry.

Closes #152
2026-04-25 13:47:07 +02:00
iamtoruk
155b4a0708 Fix README: correct defaults domain and clarify menubar shows today 2026-04-25 13:09:23 +02:00
iamtoruk
e2254e9237 Revert AgentTabStrip to original todayPayload behavior
Some checks are pending
CI / semgrep (push) Waiting to run
2026-04-25 01:59:51 +02:00
AgentSeal
d7c92225e5 Revert "Fix trend chart to show days matching selected period"
This reverts commit c10484fe2b.
2026-04-25 01:56:51 +02:00
iamtoruk
c10484fe2b Fix trend chart to show days matching selected period 2026-04-25 01:47:30 +02:00
iamtoruk
8ffbffcd7f Fix double-counting in menubar-json period data
PR #136 (2e5e449) changed parseAllSessions to use periodInfo.range
(full period) instead of just today's range. When combined with
cached historical data, this caused days to be counted twice:
- Once from getDaysInRange(cache, ...)
- Again from parseAllSessions(periodInfo.range, ...)

Result: 7-day cost showed ~$402 instead of correct ~$209.

Fix: Parse only today's sessions when using cache path. Historical
data comes exclusively from cache, today's data from fresh parse.
2026-04-25 01:44:02 +02:00
iamtoruk
bfcae0f84e Fix provider tabs showing wrong costs when period changes
The AgentTabStrip was using allProvidersToday for cost display, which
meant tabs always showed today's per-provider costs regardless of
which period was selected. This caused the hero to show e.g. $209 for
30 Days but the Claude tab to show $59 (today's Claude cost).

Fix: cost(for:) now reads from store.payload (selected period) instead
of allProvidersToday. Tab VISIBILITY still uses todayPayload so tabs
don't disappear when switching periods.

Bug existed since the original menubar app commit (495a254, Apr 17).
2026-04-25 01:34:10 +02:00
Resham Joshi
d54e88fdbb
Merge pull request #150 from getagentseal/release/0.9.0
Some checks are pending
CI / semgrep (push) Waiting to run
Release 0.9.0
2026-04-24 11:25:25 -07:00
AgentSeal
ed7d76567b Release 0.9.0: Cursor Composer 2 support and provider fixes
- Fix cursor-agent provider to detect Composer 2 JSONL sessions (#142)
- Bump version to 0.9.0
- Update changelog with all 0.9.0 changes
2026-04-24 20:24:49 +02:00
Resham Joshi
0bebe6e5d0
Merge pull request #149 from getagentseal/fix/compare-bar-colors
Fix compare chart bar colors to always match legend
2026-04-24 11:18:57 -07:00
AgentSeal
752aaf04c1 Fix compare chart bar colors to always match legend
Bars now always show their assigned colors (blue for model A, green
for model B) instead of graying out the non-winner. Only the winner's
percentage value is highlighted in green.
2026-04-24 20:18:33 +02:00
Resham Joshi
17022433a2
Merge pull request #148 from getagentseal/fix/codex-patch-edit-detection
Fix Codex provider to detect file edits from patch_apply_end events
2026-04-24 11:09:11 -07:00
AgentSeal
396c8b542c Fix Codex provider to detect file edits from patch_apply_end events
Codex records file modifications as event_msg entries with type
patch_apply_end rather than function_call tool invocations. This fix
tracks those events and adds Edit to the tools list, enabling proper
calculation of edit turns, one-shot rates, and retry rates.

Fixes edit detection showing 0 edit turns despite actual file changes.
2026-04-24 20:07:13 +02:00
Resham Joshi
8c2fc4ffe8
Merge pull request #145 from getagentseal/fix-cursor-provider-agentKv
Fix Cursor provider for newer versions
2026-04-24 11:06:49 -07:00
Resham Joshi
68cf823223
Merge pull request #144 from getagentseal/add-claude-max-5x-preset
Add claude-max-5x preset for $100/month tier
2026-04-24 11:06:33 -07:00
Resham Joshi
4aafe89f62
Merge pull request #147 from getagentseal/fix/tahoe-statusitem-rendering
Fix NSStatusItem not rendering on macOS Tahoe (26.x)
2026-04-24 11:05:17 -07:00
Resham Joshi
9546f4e215
Merge pull request #143 from getagentseal/menubar-perf-optimization
Reduce menubar CPU usage from 14% to near zero
2026-04-24 11:05:12 -07:00
AgentSeal
2268a8a47d Fix NSStatusItem not rendering on macOS Tahoe (26.x)
On macOS 26.4+, accessory apps may fail to render their status item if
the activation policy is set to .accessory before the status item is
created and populated. The status item draw code executes but nothing
appears in the menu bar.

Workaround:
1. Start as .regular app and call activate() to ensure window server
   registration
2. Set a simple SF Symbol image immediately on the status button
3. Defer the attributed title setup to ensure initial render completes
4. Switch to .accessory policy after setup to hide from Dock

Fixes #146
2026-04-24 20:03:26 +02:00
AgentSeal
ec10ad1b67 Fix Codex model extraction from turn_context entries 2026-04-24 19:42:21 +02:00
AgentSeal
e1609e495c Add GPT-5.2 Low model display name for Cursor 2026-04-24 19:23:54 +02:00
AgentSeal
681afdbece Fix Cursor provider for newer versions that store data in agentKv
Newer Cursor versions store conversation data in agentKv entries
instead of populating tokenCount in bubbleId entries. This adds
a fallback parser that reads agentKv blobs and estimates tokens
from content length.

Closes #114
Closes #102
2026-04-24 18:11:25 +02:00
AgentSeal
25a71bf016 Add claude-max-5x preset for $100/month tier
Closes #141
2026-04-24 15:47:59 +02:00
AgentSeal
88f7e5329d Reduce menubar CPU usage from 14% to near zero
Remove duplicate refresh timer, increase interval to 30s, add debounce
2026-04-24 15:30:27 +02:00
AgentSeal
f893c964cc Add auto-start on login via osascript subprocess
Some checks are pending
CI / semgrep (push) Waiting to run
2026-04-24 13:50:32 +02:00
AgentSeal
b3b0dfbf60 Auto-register as login item on first launch 2026-04-24 13:27:39 +02:00
AgentSeal
d3c4de0375 Reduce CLI timeout from 60s to 20s for faster recovery
Some checks are pending
CI / semgrep (push) Waiting to run
2026-04-24 05:53:52 +02:00
AgentSeal
053ca25253 Show loading spinner on every refresh, not just first load 2026-04-24 02:59:38 +02:00
AgentSeal
2dcf6f37f6 Add Discord invite link to README
Some checks are pending
CI / semgrep (push) Waiting to run
2026-04-23 22:02:01 +02:00
Resham Joshi
ed3abce4f6
Merge pull request #140 from getagentseal/fix/menubar-stability
Fix menubar crashes and add reliable auto-refresh
2026-04-23 12:13:55 -07:00
AgentSeal
68daad5dfa Fix menubar crashes and add reliable auto-refresh
Fixes crash when switching timeframes or providers by handling
duplicate dates in history data gracefully.

Adds LaunchAgent that posts a distributed notification every 15
seconds to keep prices fresh even after long idle periods.
2026-04-23 21:09:46 +02:00
iamtoruk
17b7e6ae6c fix(menubar): Swift 6 strict concurrency for wake observers
Some checks are pending
CI / semgrep (push) Waiting to run
2026-04-23 05:39:03 -07:00
Resham Joshi
48d2373fcc
Merge pull request #137 from getagentseal/fix/menubar-auto-refresh
fix: menubar auto refresh stops working after idle
2026-04-23 03:36:06 -07:00
AgentSeal
e970f64cbb fix: menubar auto refresh stops working after app is idle
The menubar price would freeze after the app was idle for a while because macOS App Nap suspends Task.sleep even with beginActivity.

Replace Task.sleep with DispatchSourceTimer which is more robust for background execution. Also add observers for system wake and screen wake events to force a refresh when the Mac resumes from sleep.
2026-04-23 02:25:20 +02:00
iamtoruk
b4fad91512 chore: bump version to 0.8.9, add changelog
Some checks are pending
CI / semgrep (push) Waiting to run
Stale menubar price fix (#136), variable-width status item default.
2026-04-22 13:06:17 -07:00
Resham Joshi
bd83196f9d
Merge pull request #136 from Miles-dev-29/fix/menubar-stale-price
fix: use consistent date range for menubar status queries
2026-04-22 13:00:08 -07:00
AgentSeal
2e5e449ad1 fix: use consistent date range for menubar status queries
The menubar showed stale prices because provider all used end:now while provider specific queries used end:endOfDay. Sessions with timestamps after now was captured were excluded from all providers but included in specific provider queries.

Use periodInfo.range consistently across all parseAllSessions calls in menubar json status.
2026-04-22 21:28:12 +02:00
iamtoruk
3355e3699e fix(menubar): variable width for both compact and default mode 2026-04-22 05:45:51 -07:00
iamtoruk
46f945fd72 fix: restore package.json truncated by sed 2026-04-22 05:38:14 -07:00
Resham Joshi
daf711daeb
Merge pull request #135 from getagentseal/chore/bump-0.8.8
chore: bump version to 0.8.8
2026-04-22 05:35:22 -07:00
iamtoruk
f3687db447 chore: bump version to 0.8.8, add changelog
OOM streaming fix (#132), compact menubar mode (#133), keychain
credential fix + App Nap hardening (#134).
2026-04-22 05:35:06 -07:00
Resham Joshi
ab39fff98a
Merge pull request #134 from getagentseal/fix/menubar-keychain-appnap
fix(menubar): keychain credential lookup + App Nap hardening
2026-04-22 05:27:25 -07:00
iamtoruk
3d063c9100 fix(menubar): keychain account filter + App Nap hardening + single query
Remove hardcoded "default" account allowlist from keychain credential
lookup. Claude Code 2.1.x writes the macOS login username, not
"default", so the filter silently dropped valid credentials on every
install.

Collapse the two-phase keychain enumeration into a single
SecItemCopyMatching call (one keychain prompt instead of four on
debug builds).

Harden App Nap opt-out: disable automaticTerminationSupport and
suddenTermination at the process level so AppKit cannot override
the beginActivity token.

Closes #115
2026-04-22 05:27:07 -07:00
Resham Joshi
66606c81f8
Merge pull request #133 from getagentseal/feat/menubar-compact
Some checks are pending
CI / semgrep (push) Waiting to run
feat(menubar): opt-in compact mode
2026-04-22 04:33:56 -07:00
iamtoruk
e8f8ccc94a feat(menubar): opt-in compact mode with variable-width status item
UserDefaults key CodeBurnMenubarCompact toggles a tighter menubar
display: no decimals, no leading space, variable width that hugs
the rendered text instead of the fixed 130pt slot.

Closes #129
2026-04-22 04:33:35 -07:00
Resham Joshi
bc54f85e34
Merge pull request #132 from maucher/fix/streaming-oom-readSessionLines
fix: switch scanJsonlFile and parseSessionFile to readSessionLines to prevent OOM
2026-04-22 03:58:46 -07:00
Łukasz Majcher
5e49f17e64 fix: switch scanJsonlFile and parseSessionFile to readSessionLines to prevent OOM
readViaStream (used for files ≥8 MB) reconstructs the full file as a
single string via chunks.join('\n'), giving the same peak allocation as
readFile. Callers then call content.split('\n'), creating a second copy.
With FILE_READ_CONCURRENCY=16 and files up to 128 MB this can exhaust
the V8 heap (~6 GB theoretical peak).

readSessionLines already exists as a proper async generator that yields
one line at a time. Switch both hot-path callers to iterate it directly
so the full file string is never held in memory.

Adds two tests: a spy test confirming readSessionLines is called (not
readSessionFile), and a 500-entry correctness test.

Fixes #131
2026-04-22 10:11:13 +00:00
Resham Joshi
d4e07de18f
Merge pull request #128 from getagentseal/chore/changelog-omp-model-alias
Some checks are pending
CI / semgrep (push) Waiting to run
docs: backfill 0.8.7 changelog with OMP provider and model-alias
2026-04-21 14:00:48 -07:00