Repository navigation
Releases
Releases · Narcooo/ccbar
v1.3.0
- Fixed statusline renders taking seconds and gigabytes of memory on large transcript histories. Every render used to re-read and re-parse every
*.jsonlunder~/.claude/projects(measured: 3.8 GB in 1133 files, 7–9 s and 2.6 GB RSS per render). Token totals now come from an incremental index under~/.cache/ccbar(CCBAR_CACHE_DIRoverrides the location): a render reads only the bytes appended since the previous one (40–70 ms and about 60 MB RSS on the same data), and the first render streams the files instead of loading them whole (2.6–3.4 s, about 200 MB RSS) and publishes its progress every half second, so a render that Claude Code cancels does not start over. - Totals are unchanged: the index keeps the same per-project dedupe by
message.id(latest timestamp, then largest output, then scan order), stores token counts per quarter hour and model, and applies today/week/month boundaries and prices at render time. Files that shrink, are replaced, are rewritten in place or disappear are detected and rescanned; index updates are published atomically, so concurrent renders and renders cancelled by Claude Code cannot corrupt it. The cache directory is created private to the user (0700), like the transcripts it is derived from. - A damaged cache file (for example after a power loss) is discarded and rebuilt from the transcripts in the same render; each rebuild is recorded with its time, file and parse error in
~/.cache/ccbar/rebuild.log. - Quota no longer blocks the render.
claude auth status, the keychain lookup and the usage API call moved into a detached background refresh (one at a time, guarded by a lock, at most every 30 s; the auth mode is re-checked every 5 minutes or when the OAuth token changes). The render shows the last fetched quota, and--when there is none, the last refresh failed, or it is older than 10 minutes. It no longer checks the live token itself, so after switching accounts the previous quota can stay visible until the next refresh. The quota cache moved from the system temp directory to~/.cache/ccbar/quota-v1.jsonand records the failure code of an unsuccessful refresh. setupandrepairnow write a directnode '<plugin dir>/dist/cli.js' --append-modelstatusline command instead of ash -lclogin shell that searched the plugin cache withfindon every render. The new--append-modelflag appends the model display name to the first line, so statuslines wired bysetuporrepairnow end their first line with the model name. TheSessionStarthook still runsrepair, which rewrites the path when the plugin moves to a new version directory.- Terminal width detection reads
/dev/ttydirectly instead of spawning a login shell. - The keychain lookup for the OAuth token selects the item of the current account (
-a <user>) and has a 5 s timeout, so a locked keychain cannot hang it. - A line without a trailing newline at the end of a transcript is now counted once it is complete, not while it is still being written.
v1.1.2
- Fixed compact quota statusline rendering so narrow Claude Code layouts stay on two lines instead of collapsing back into one long row.
- Shortened compact quota bars, compact countdown text, and narrow-path rendering to keep project and quota data visible on constrained widths.
- Added a regression test that enforces the compact quota rows stay within narrow UI width limits.
v1.1.1
1.1.1 - 2026-03-24
- Fixed live quota rendering so
ccbarnow resolves Claude auth mode, reads the Claude Code OAuth token, fetches/api/oauth/usage, and passes real 5h/7d quota data into the statusline. - Added auth-aware quota tests covering
claude.aidetection, API-mode suppression, and live quota cache refresh.
v1.1.0
1.1.0 - 2026-03-24
- Added a responsive statusline layout that automatically switches to a compact two-row view on narrow widths.
- Added safer width detection with runtime probing and a narrow-screen fallback when Claude does not expose terminal width.
- Fixed plugin launcher, setup docs, and hook repair commands to resolve
ccbarinstalls across marketplace cache paths instead of relying on one hardcoded cache layout.