Commit graph

53 commits

Author SHA1 Message Date
AgentSeal
d9e391be11 docs: update screenshot, add total downloads and install size badges, document --refresh flag 2026-04-15 01:40:48 -07:00
AgentSeal
d597d458f9 feat: auto-refresh dashboard, show 'home' for home dir sessions 2026-04-15 01:40:48 -07:00
AgentSeal
e75655e283
Merge pull request #34 from AgentSeal/fix/readable-project-names
feat: readable project names in dashboard
2026-04-15 10:10:43 +02:00
AgentSeal
c6c4979c06 feat: readable project names — strip home dir prefix, show ~ for home sessions 2026-04-15 01:09:18 -07:00
AgentSeal
3858006da0 bump to 0.4.3: menubar actions fix, stale comment cleanup 2026-04-15 00:35:31 -07:00
AgentSeal
5c7639b2fb fix: stale comment referencing removed config currency subcommand 2026-04-15 00:32:51 -07:00
mukunda katta
ad733fe596 fix(menubar): invoke binary directly + correct currency subcommand (#32, #27)
The two menubar action items were built as `bash -c "cd ~/codeburn &&
npx tsx src/cli.ts ..."`, which:

1. assumes a `~/codeburn` source checkout that npm-installed users
   don't have, and
2. interacts badly with how SwiftBar serialises `param2=` on long
   quoted strings — only the `cd` half ends up reaching `bash -c`,
   so the `npx tsx` fallback runs from `$HOME` and fails with
   `ERR_MODULE_NOT_FOUND: /Users/<u>/src/cli.ts`.

Replace with the resolved `${bin}` plus separate `paramN=` args,
which SwiftBar/xbar deliver as discrete argv entries — no shell
quoting, no checkout assumption.

While here, fix the currency submenu the same way: the items were
emitting `${bin} config currency XXX`, but the real CLI subcommand
defined in `src/cli.ts` is `codeburn currency [code]` (with
`--reset` for USD). The previous form silently failed on click.
That's #27.

Closes #32
Closes #27

Verified by running `npm run build` (clean) + `npm test -- --run`
(28/28 pass), and inspecting the rendered output of `codeburn status
--format menubar` to confirm the action lines now look like:

  Open Full Report | terminal=true shell=<bin> param1=report
  Export CSV to Desktop | terminal=false shell=<bin> param1=export param2=-o param3=<HOME>/Desktop/codeburn-report.csv
  --US Dollar (USD) * | terminal=false refresh=true shell=<bin> param1=currency param2=--reset
  --British Pound (GBP) | terminal=false refresh=true shell=<bin> param1=currency param2=GBP
2026-04-14 23:11:32 -07:00
AgentSeal
bd8ae2e971 bump to 0.4.2: agent sessions, Codex cache fix, responsive dashboard, CSV injection fix 2026-04-14 10:21:40 -07:00
AgentSeal
9f172416fd
Merge pull request #25 from AgentSeal/fix/include-agent-sessions
fix: include agent sessions, fix Codex cache hit
2026-04-14 19:19:35 +02:00
AgentSeal
51c56d0726 fix: include agent/subagent sessions, fix Codex cache hit and cost calculation
- Remove agent-*.jsonl exclusion filter that was dropping ~46% of API calls
- Scan subagents/ directories for subagent session files
- Normalize Codex token semantics: OpenAI includes cached tokens inside
  input_tokens, subtract them to match Anthropic's separate reporting
- Fixes cost double-counting and 100% cache hit display for Codex users
2026-04-14 10:18:14 -07:00
AgentSeal
ce2c1d2995 Merge branch 'fix/csv-formula-injection' 2026-04-14 09:39:03 -07:00
AgentSeal
186b672fdc docs: add external PR authorship rule to CLAUDE.md 2026-04-14 09:37:18 -07:00
AgentSeal
a7760e2f2a Merge branch 'feature/terminal-scaling-clean'
# Conflicts:
#	src/dashboard.tsx
2026-04-14 09:35:20 -07:00
AgentSeal
16f39e264e feat: responsive dashboard — dynamic reflow, wider cap, half-width panels
- Use Ink's useWindowSize() hook for reactive terminal reflow (PR #18)
- Raise width cap from 104 to 160 columns for wide screens
- Move Activity panel from full-width to half-width row with Model panel
- Pair Tool + Bash panels, MCP goes full-width at bottom
- Addresses issue #23 (UI responsiveness)
2026-04-14 09:15:37 -07:00
AgentSeal
d2560d7ad8 bump to 0.4.1: multi-currency support, 30-day rolling window 2026-04-14 09:06:35 -07:00
AgentSeal
9ca866fe43 chore: harden gitignore and add commit hygiene rules 2026-04-14 09:03:23 -07:00
AgentSeal
fc7387f427 docs: add branching strategy and PR workflow to CLAUDE.md 2026-04-14 09:00:25 -07:00
AgentSeal
fb18a79779 docs: update README for Codex support, provider system, currency command 2026-04-14 08:52:26 -07:00
AgentSeal
40d04261d6 cleanup: strip TUI picker, promote currency command, remove verbose comments
- Remove CurrencyPicker component and all related state from dashboard
- Promote 'codeburn config currency' to top-level 'codeburn currency'
- Strip JSDoc comments that explain WHAT not WHY
- Remove forceRender hack and unused imports
2026-04-14 08:47:45 -07:00
AgentSeal
9ab7f37f6f Fix CSV formula injection in exports 2026-04-14 11:04:10 -04:00
BlairWelsh
f08f97cd3d feat: add interactive currency picker to dashboard
Press c in the dashboard to open a searchable currency picker modal.
Type to filter, arrow keys to navigate, enter to select, escape to
cancel. Shows 24 common currencies with the active one marked, and
accepts any valid ISO 4217 code typed directly.

Session-only switch -- does not write to config, so users can quickly
compare costs in different currencies without changing their default.
2026-04-14 14:09:39 +01:00
BlairWelsh
d322d9b837 docs: mention menubar currency picker in README 2026-04-14 13:51:12 +01:00
BlairWelsh
df69c2aadf feat: add currency picker to menubar plugin
Adds a Currency submenu to the SwiftBar/xbar dropdown with 16 common
currencies. Clicking one runs codeburn config currency and refreshes
the plugin. Active currency is marked with *.

The full 162 ISO 4217 currencies are available via the CLI for any
not listed in the menubar.
2026-04-14 13:51:11 +01:00
BlairWelsh
d248f0d6df docs: add Currency section to README 2026-04-14 13:51:11 +01:00
BlairWelsh
85304dbe30 feat: add multi-currency support
Display costs in any of 162 ISO 4217 currencies. Exchange rates are
fetched from frankfurter.app (ECB-backed, free, no API key) and cached
for 24h alongside the existing LiteLLM pricing cache.

Currency symbols and decimal rules come from Node's built-in Intl API
rather than hardcoded tables.

New command: codeburn config currency <code>
Reset: codeburn config currency --reset

Config stored at ~/.config/codeburn/config.json.
All internal calculations remain in USD -- conversion is display-only.
2026-04-14 13:51:11 +01:00
Ale Bles
79d4f86c30 feat: dynamic terminal width, reflows on terminal size change
fix: move useWindowSize() out of plain function into calling components
2026-04-14 14:46:19 +02:00
AgentSeal
efab93e78e cleanup: use Period type instead of inline union in renderDashboard 2026-04-14 04:58:47 -07:00
AgentSeal
bbaf71431d
Merge pull request #14 from oysteinkrog/feat/30days-period
feat: add 30-day rolling window period
2026-04-14 13:58:14 +02:00
Øystein Krog
f66afc893d feat: add 30-day rolling window period
Add a '30days' period that shows the last 30 days of usage data, distinct
from 'month' which shows the current calendar month.

- New period available via `--period 30days` and keyboard shortcut `3`
- Dashboard cycles: Today > 7 Days > 30 Days > This Month
- Fix export command to use actual 30-day range instead of calendar month
  for the '30 Days' export label
2026-04-14 13:51:06 +02:00
AgentSeal
25bd54404c bump to 0.4.0: multi-provider support (Codex, provider plugin system) 2026-04-14 04:35:51 -07:00
AgentSeal
391a235d1d feat: multi-provider support (Codex + provider plugin system)
Add Codex (OpenAI) as a second provider alongside Claude Code. Provider
plugin architecture makes adding future providers (Pi, OpenCode, Amp) a
single-file addition.

- Provider interface: types, session discovery, stateful JSONL parsing
- Codex parser: token_count dedup, tool normalization, model resolution
- TUI: press p to cycle All/Claude/Codex with 1-min cache for instant switching
- CLI: --provider flag on report, today, month, status, export commands
- Pricing: Codex model fallbacks, fixed fuzzy matching for gpt-5.4-mini
- Menubar: per-provider cost breakdown when multiple providers detected
- 27 tests (10 new: Codex parser, provider registry, tool/model mapping)
2026-04-14 04:32:09 -07:00
AgentSeal
b2b405aabb fix: require Node 20+ (string-width uses /v regex flag) 2026-04-14 01:57:15 -07:00
AgentSeal
ef0f49d14a bump to 0.3.1: full-width Activity panel, Shell Commands, ENOENT fix 2026-04-14 01:41:53 -07:00
AgentSeal
cb5853c460
Merge pull request #6 from rafaelcalleja/feat/bash-breakdown-panel
feat: add Shell Commands breakdown panel
2026-04-14 10:39:23 +02:00
AgentSeal
3964478e61 fix: handle unreadable session files gracefully
readFile in parseSessionFile had no error handling. If a .jsonl file
is missing, has bad permissions, or gets deleted between readdir and
readFile, the whole process crashes with ENOENT. Now returns null
and skips the file.

Fixes #9
2026-04-14 01:31:31 -07:00
AgentSeal
c7c6a0d2ec bump to 0.3.0 for npm publish 2026-04-14 01:26:02 -07:00
AgentSeal
a25e5c22b4 fix: use raw.githubusercontent for dashboard image (jsDelivr cache stale) 2026-04-14 01:25:03 -07:00
Rafael Calleja
a5696362f2 refactor: share BASH_TOOLS from classifier, remove comments
- Export BASH_TOOLS from classifier.ts instead of duplicating in bash-utils.ts
- Remove isBashTool helper (use BASH_TOOLS.has() directly)
- Strip unnecessary comments per codebase conventions
2026-04-14 10:24:38 +02:00
Rafael Calleja
4f2fcf81d8 feat: add shell commands section to CSV and JSON export 2026-04-14 10:24:38 +02:00
Rafael Calleja
260cad9e08 feat: add Shell Commands breakdown panel to dashboard 2026-04-14 10:24:38 +02:00
Rafael Calleja
6d8c8643a0 feat: extract bash commands and add bashBreakdown to session summary 2026-04-14 10:24:38 +02:00
Rafael Calleja
45ce697eea fix: correct quote-handling alignment in extractBashCommands
Replace quoted strings with same-length spaces in stripQuotedStrings so
separator indices in the stripped string map correctly to the original.
Add test coverage for quoted separators and isBashTool.
2026-04-14 10:24:24 +02:00
Rafael Calleja
b75c2663b4 feat: add extractBashCommands with TDD tests
Implements bash command parsing utility that splits on &&, ;, and |
separators while respecting quoted strings. Includes isBashTool helper.
All 12 vitest tests pass.
2026-04-14 10:24:24 +02:00
AgentSeal
d20281514c feat: one-shot success rate per activity category
Detects edit/test/fix retry cycles (Edit -> Bash -> Edit) within each
turn. Shows 1-shot percentage in the By Activity panel for categories
that involve code edits. Updated screenshot and README.

Fixes #4
2026-04-14 01:14:34 -07:00
AgentSeal
74744f07bb fix: stop tool-result entries from splitting turns and inflating Conversation
Tool results in JSONL are type:"user" entries with no text content.
groupIntoTurns was flushing on every type:"user" entry, creating
phantom turns that got classified as Conversation. Now only flush
when the user entry contains actual text.

Fixes #7
2026-04-14 00:57:43 -07:00
AgentSeal
b04d1e0ff8 add LICENSE and CHANGELOG 2026-04-13 18:24:51 -07:00
AgentSeal
8b8c97e692 bump to 0.2.0 for npm publish 2026-04-13 17:59:47 -07:00
AgentSeal
0da57d1172 add Claude Desktop (code tab) session support
Scans ~/Library/Application Support/Claude/local-agent-mode-sessions/
for Desktop sessions in addition to ~/.claude/projects/. Same JSONL
format, just nested deeper. Cross-platform paths for macOS/Windows/Linux.
2026-04-13 17:58:19 -07:00
AgentSeal
f6cc68a7d4 support CLAUDE_CONFIG_DIR environment variable
Respects CLAUDE_CONFIG_DIR if set, falls back to ~/.claude.
Closes #3.
2026-04-13 17:52:27 -07:00
AgentSeal
490130e32e fix: add files field, slim package from 1.1MB to 40KB
Only ship dist/ to npm. Fixes bin path validation warning.
2026-04-13 15:20:46 -07:00