codeburn/extensions/gnome-shell
AgentSeal c155ba3c98 perf(extensions): cache payloads by (period, provider) for instant switches
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.
2026-04-18 06:00:39 -07:00
..
codeburn@agentseal.org perf(extensions): cache payloads by (period, provider) for instant switches 2026-04-18 06:00:39 -07:00
README.md feat(extensions): add GNOME Shell extension for native panel feel 2026-04-18 04:06:44 -07:00

CodeBurn GNOME Shell extension

Native GNOME panel button that shows today's AI coding spend with a click-to-open popover, matching the feel of Ubuntu's Quick Settings menu.

This is an alternative to the cross-platform Tauri tray app in ../desktop/. Use this on GNOME for the most native UX. The Tauri app stays the right choice for KDE, Unity, wlroots compositors, Windows, and headless systems.

Requirements

  • GNOME Shell 45, 46, 47, or 48 (Ubuntu 22.04 LTS, 24.04 LTS, and Fedora 39+)
  • codeburn CLI on PATH (npm install -g codeburn)

Install (from source, local user)

cp -r extensions/gnome-shell/codeburn@agentseal.org ~/.local/share/gnome-shell/extensions/
gnome-extensions enable codeburn@agentseal.org

Then restart GNOME Shell so the extension loads:

  • X11: press Alt + F2, type r, press Enter.
  • Wayland: log out and log back in (GNOME on Wayland has no in-session shell restart).

What it shows

Panel button:

  • 🔥 icon
  • Today's cost (e.g. $24.73)

Popup menu:

  • Header: period + cost + call count + session count
  • Top 5 activities (Coding, Debugging, Testing, etc.) with per-activity cost and turn count
  • Optimize findings count with potential savings (if any)
  • Refresh and Open Full Report actions

Data refreshes every 60 seconds. Right-click the panel button to open the default panel context menu.

Uninstall

gnome-extensions disable codeburn@agentseal.org
rm -rf ~/.local/share/gnome-shell/extensions/codeburn@agentseal.org

Development

Run a nested shell to iterate without restarting your session (X11 only):

dbus-run-session -- gnome-shell --nested --wayland

Tail the extension log:

journalctl -f -o cat /usr/bin/gnome-shell

The extension uses the GNOME 45+ ESM-based extension API (import + Extension class). It will not load on GNOME 44 or earlier.