mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-05-19 16:13:56 +00:00
Every period/provider tab tap was spawning a fresh codeburn status CLI, which ran the whole sessions parser again — roughly 500 ms to 2 s per call. The Mac app caches by (period, provider) with a 60 s TTL; port the same pattern to GNOME. * New payloadCache Map keyed by "period|provider". A switch that lands on a cached key renders from memory immediately and skips the CLI. * inFlightKeys Set de-duplicates concurrent fetches for the same key — rapid clicks don't fan out into parallel subprocesses. * When a fetch returns but the user has since switched to a different key, cache the payload anyway (warms it for a later tap) and skip the render so the stale response can't overwrite the new one. * Currency switch no longer re-fetches. Payloads are raw USD; formatCost applies the FX multiplier at render time. Dispatch the CLI currency write in the background so other tools (TUI, menubar subcommand) see the same symbol on next run, then re-render the cached payload. |
||
|---|---|---|
| .. | ||
| extension.js | ||
| metadata.json | ||
| stylesheet.css | ||