mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
The popover had no idea how much of a subscription was left; only the Capacity Dock read `codeburn quota`, and it polled on its own. A store in the page now owns that answer: one CLI spawn every two minutes, single-flight, with the mac's SubscriptionRefreshBackoff on failure (a failed refresh retries after 30s and doubles back out to the cadence, plus jitter), polling only while a surface is subscribed. The strip, the warning row and the Plan insight will all read it rather than each spawning a Node process. Each tab whose provider reports quota gains AgentTabQuotaBar: a 3px capsule in the four severity tiers (under 50 green, yellow, orange from 75, red from 90), solid red when the credential needs reconnecting. Hovering opens the mac's 260px QuotaDetailPopover after 250ms and closes it 150ms after leaving: plan pill, a row per window with bar, percent and time to reset, and the stale, retrying, disconnected and reconnect cards with the mac's copy. The CLI's quota JSON is flatter than the mac's adapters, collapsing the connection state to `available` plus an optional error, so the six-way Connection enum is rebuilt from those two fields plus what the store knows about the refresh in flight. The severity palette needed a second set of tokens: the mac only ever draws these colours on a dark material, and plain yellow is illegible on this warm light surface, so text and icons take a darkened ink in the light theme while the bars keep the system colours. A third set covers the hover card, whose surface is deliberately inverted against the theme. |
||
|---|---|---|
| .. | ||
| dist | ||
| Scripts | ||
| src | ||
| src-tauri | ||
| .gitignore | ||
| DEVELOPMENT.md | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| tokens.json | ||
| tsconfig.json | ||
| vite.config.ts | ||