codeburn/app/electron
ozymandiashh 59ed66b977
feat(dock): one Claude ring per config directory, with its own sessions and today (#1570)
* feat(dock): one Claude ring per config directory, with its own sessions and today (#1523)

Rate limits are per account, so a machine with a work and a personal
~/.claude cannot be served by one Claude ring. When the CLI knows two or
more Claude config directories:

- `codeburn quota --format json` adds a top-level `claudeProfiles` array,
  one entry per directory (`providers[]` unchanged). Each entry carries
  the directory's own windows, read from its own `<dir>/.credentials.json`
  (the macOS Keychain fallback stays reserved for the default ~/.claude),
  plus that directory's own today totals from a single Claude-only,
  cache-backed parse of today's range, filtered per source id exactly like
  the menubar's per-config payloads.
- Live sessions carry `claudeConfigSourceId`, so a per-profile ring claims
  only its own sessions. Claude Desktop sessions keep their own bucket id
  and belong to no profile.
- The Windows Capacity Dock gains a `claudeProfiles` preference (combined,
  default; separate draws one captioned ring per directory). Profile rings
  keep addressing the `claude` provider id for the provider set, glyphs,
  colors and the connect button; the settings row appears only when the
  CLI reports more than one profile.
- Captioned rows are taller by two new metrics (caption line + gap),
  mirrored in TS and Rust: the page tells Rust the rail is captioned in
  the layout request, and the frame carries the effective row extent the
  hit-test uses. Non-captioned rails are pixel-identical to before.
- The desktop app's shared dock-prefs schema parses and sanitizes the new
  key, so its pane cannot strip it from windows-dock.json.

Closes #1523

* review: opt-in profile reads, today timeout, missing-dir filter (#1570)

- `quota --claude-profiles` gates the per-directory reads: without it the
  payload lists profiles ({id,label,path}) only, so a combined rail and
  WSL users pay nothing; the Windows dock passes the flag only while its
  claudeProfiles preference is separate, and an unknown option from an
  older CLI reads as CliOutdated.
- The default ~/.claude profile reuses the claude provider row's result —
  no second request, no second macOS Keychain read.
- claudeTodayBySource races the same timeoutMs and answers an empty map
  on loss, so a silent child cannot cost the dock every provider's quota.
- Missing config directories are filtered before the >1 check.
- `captioned` applies only while a Claude ring is in the selected set;
  profile rows tolerate a list-mode answer; comments trimmed; merge with
  #1560 keeps both keepExpanded and claudeProfiles.

* test(quota): set USERPROFILE for the default-dir check; drop issue refs

---------

Co-authored-by: Resham Joshi <65915470+iamtoruk@users.noreply.github.com>
2026-09-28 19:06:53 +02:00
..
quota Claude quota: recover the credential from the source it came from (#1516) 2026-09-23 18:16:23 +02:00
cli-win32-reap.test.ts
cli-win32-tree-kill.test.ts
cli.test.ts fix(cache-lock): coalesce heartbeat ticks; make time-sensitive tests deterministic (#1559) 2026-09-25 05:06:43 +02:00
cli.ts
mac-menubar.test.ts 0.9.25 round 2: fixes found testing the built apps (#1517) 2026-09-21 13:53:45 +02:00
mac-menubar.ts 0.9.25 round 2: fixes found testing the built apps (#1517) 2026-09-21 13:53:45 +02:00
main.test.ts
main.ts fix(windows): Store installs get no GitHub update offer, and codeburn menubar opens the Store copy by its app id (#1520) (#1549) 2026-09-24 19:51:04 +02:00
menubar.test.ts
menubar.ts
optimize-store.test.ts
optimize-store.ts
preload.ts
telemetry.test.ts 0.9.25 round 2: fixes found testing the built apps (#1517) 2026-09-21 13:53:45 +02:00
telemetry.ts 0.9.25 round 2: fixes found testing the built apps (#1517) 2026-09-21 13:53:45 +02:00
tray-settings-atomic.test.ts
tray-settings-lock.test.ts
tray-settings.test.ts feat(dock): one Claude ring per config directory, with its own sessions and today (#1570) 2026-09-28 19:06:53 +02:00
tray-settings.ts feat(dock): one Claude ring per config directory, with its own sessions and today (#1570) 2026-09-28 19:06:53 +02:00
updates.test.ts fix(windows): Store installs get no GitHub update offer, and codeburn menubar opens the Store copy by its app id (#1520) (#1549) 2026-09-24 19:51:04 +02:00
updates.ts fix(windows): Store installs get no GitHub update offer, and codeburn menubar opens the Store copy by its app id (#1520) (#1549) 2026-09-24 19:51:04 +02:00