The strip was a fixed seven, so a machine running Gemini, Kimi or any of the
other two dozen tools the CLI reports had no way to filter by them. It now
mirrors AgentTabStrip.swift: All first, then every provider the payload says
has activity, dearest first, with the provider's brand mark from the mac's
ProviderFilter.color and the compact cost chip. Provider ids come straight
from the payload, which is what --provider takes, so any tool the CLI grows
appears without a change here.
The known-tool list stays as the fallback for a machine the CLI has not seen
activity on, dimmed and explaining itself on hover, because that copy is the
first-run answer to "what is CodeBurn watching".
Overflow chevrons select the neighbouring tab, as on the mac, rather than
scrolling blindly; both measurements are taken from elements the chevrons do
not resize, so showing them cannot feed back into the overflow decision.
Dropping the rail in the top-right corner left a horizontal rail whose ring sat
at its far left: the rows container kept the stylesheet's left and right of 0,
so an end-anchored horizontal rail only ever set its right and the row slid to
the start. Both orientations now set all four offsets explicitly, and the
stylesheet no longer pins the container.
While dragging, the flare followed the attachment progress of whichever edge
was nearest, so a vertical rail approaching the top wore a right-edge flare in
open space. The flare now only follows an edge of the rail's own orientation;
a perpendicular edge shows the loose pill until the drop, and the settle glide
runs from centre to centre so a change of orientation does not jump.
Adds a corner test and logs the layout inputs in debug builds.
Hovering used to move and resize the dock window, and WebView2 presents one
stale frame at every window change, which read as the rail drifting and
glitching. One transparent window is now sized once per placement for the
fully expanded rail plus the bubble's reach and never moves on hover. A 60 Hz
cursor poll, the counterpart of the mac's global event monitor, makes the
window click-through everywhere but the painted shapes, synthesizes hover for
the page, and drives dragging.
Drag follows CapacityDockController: the page owns the 3 px threshold and
passes the press point, Rust keeps the rail under the pointer, morphs the
flare away as it leaves an edge, and on release snaps to any edge within
44 px or leaves the rail floating, then hands the page the old rail rect so
it glides into place with the mac's attach and detach curves. Placement
(docked edge, orientation, normalized offsets) persists in windows-dock.json.
Top and bottom give a horizontal rail with the bubble below or above; a
floating rail keeps its orientation and puts the bubble where there is room.
The context menu gains Dock to Edge with all four edges.
The layout stays a pure function with unit tests, and every window metric
stays a whole pixel. windows-sys gains one feature flag for the cursor and
button reads; no versions change.
The Windows dock now mirrors CapacityDockView.swift at the mac's 0.6 default
scale: the graphite gradient surface with the concave edge flare, a provider
glyph inside a recessed ring, severity colours (green, yellow from 50, orange
from 75, red from 90) on ring, percent and bars, warm off-white text, and the
tailed detail bubble with the mac typography. This also settles the open
severity-colour question in favour of the mac behaviour.
Interaction follows CapacityDockController and CapacityDockInteractionState:
the resting rail shows the preferred provider; hovering expands it after 80 ms
and collapses 180 ms after leaving; hovering a row shows its bubble after
180 ms and dismisses it 240 ms after the row unless the pointer is on the
bubble; clicking a row pins the rail and makes that provider the preferred
one, persisted in windows-dock.json; Escape dismisses; right-click opens a
native menu with Refresh and Hide Capacity Dock.
One transparent window hosts both rail and bubble. dock.rs owns the geometry
as a pure layout function with unit tests, applies size and position in a
single SetWindowPos so the rail never flashes between two updates, and
returns window-relative frames the page paints into after measuring the
bubble's natural height. Every window metric stays a whole pixel.
Out of scope for v1, as before: dragging, edge choice and scale.
The invisible Capacity Dock was not a rendering bug. The debug exe had been
started through the QEMU guest agent's guest-exec, which runs as a service in
session 0, so the dock window was created on a window station that no desktop
shows. The stderr trace ("window created and shown") was accurate; the window
was simply never visible. Launched from the interactive session, the same
binary docks the rail at the right edge, shows the quiet "--" row without
providers, expands on hover, closes on toggle off and comes back on toggle on.
Debug builds on Windows now check the process window station for WSF_VISIBLE
at startup and print a warning when it is missing, so the next service session
launch explains itself. Verified: fires under a SYSTEM scheduled task, silent
from a terminal. Only a feature flag is added to the existing windows-sys
dependency; no versions change.
A slim always-on-top rail on the right screen edge showing one capacity ring
per signed-in provider, the Windows twin of the macOS Capacity Dock.
The window is created on demand and closed when the dock is switched off, so
a disabled dock leaves no webview resident. Hovering widens the same window
to reveal a detail panel with each quota window, its used percent, plan and
reset countdown; the panel unmounts on collapse rather than lingering hidden.
Data comes from `codeburn quota --format json` through the existing cli.rs
spawn plumbing. A CLI without that subcommand exits with `unknown command`,
which the rail reports as a quiet update-needed state instead of an error.
Metrics are the mac dock's whole-point values at its default 0.6 scale.
Quit CodeBurn in the tray menu called app.exit(0), but ExitRequested
was unconditionally prevented in the run loop, so the process never
actually exited. Only prevent exit when code is None (the popover
window closing on its own), letting an explicit app.exit(..) through.
Launching the menubar app twice left two processes running, each
registering its own flame + spend-badge tray icon pair, so the
notification area showed four icons for one app. Add
tauri-plugin-single-instance, registered first in the builder chain,
so a second launch just refocuses the running instance's popover.
Agent tabs filtered strictly on cost > 0, so a provider whose sessions
carry tokens but no recorded dollar cost (Hermes on a flat subscription,
free-tier models, unpriced models) vanished from the strip entirely.
The menubar payload now carries an activity signal per provider, and the
strip keys visibility off it: providers with real usage stay listed, while
providers merely discovered on disk stay hidden. Older payloads without
the signal keep the previous detected-provider behavior.
Applies consistently across the mac menubar, the Electron renderer, and
the Windows payload types.
Bump all surfaces to 0.9.23 together (CLI, desktop app, Windows menubar +
Tauri/Cargo, Flatpak, README download links) and regenerate the lockfile
version fields. Move the Unreleased changelog into a dated 0.9.23 section
covering the Capacity Dock, OMP/Grok pricing fix, CB-3/CB-4 sync, and the
desktop/TUI/menubar reliability fixes. Credit CodexBar (prior art) in the
README acknowledgements and third-party notices.
Version 0.9.21 across CLI, desktop app, and Windows menubar; refreshed
LiteLLM pricing snapshot and fallback (catches the 2026-08-24 OpenAI
GPT-5.6 cut and DeepSeek v4 repricing mid-rollout, #1134 tracks
re-tightening); CHANGELOG stamped for 0.9.21; README release links to
0.9.21. Snapshot-pinned model tests updated to current catalog truth.
Shares the mac release resolution behind a per-platform spec (tag prefix, asset name, error text), so the Windows path reuses the pinned-version URL, the release-API fallback scan, the retrying download and the sha256 verify unchanged. Windows then runs msiexec out of %SystemRoot%\System32 with /i /passive /norestart, treats 3010 and 1602 as non-failures, and launches the exe named by the product's Uninstall registry key.
The spend badge is a second tray icon carrying the number as its bitmap, which
only the Tauri tray backend provides; Linux runs its own SNI tray and has no
equivalent. The module was compiled there anyway, so every item in it - and the
two tray ids in lib.rs - tripped dead_code under clippy -D warnings on the
ubuntu leg.
- `mod tray_badge` and TRAY_ID / BADGE_TRAY_ID are now cfg(not(linux)), so the
code is absent on Linux rather than present and unused.
- `set_tray_badge` reports the badge as unsupported on Linux instead of
returning a success that never happened.
- The frontend hides the control wherever it is unsupported, behind
TRAY_BADGE_SUPPORTED in lib/platform.ts - one constant, three call sites
(the settings row, the footer menu item, and the effect that would otherwise
invoke the command).
- AppState's `linux_tray` field is dropped: it was written and never read, which
is the same lint one file over. init_tray_linux already owns the handle.
Checked rather than reasoned: `cargo clippy --all-targets -- -D warnings` passes
on macOS, and a scratch copy of the crate with the linux/macos cfg arms swapped
(so a normal macOS clippy selects everything a Linux build would keep, and drops
everything it would drop) also passes. Reinstating the ungated `mod tray_badge`
in that copy reproduces the exact CI failure, so the check is real. It stubs
tray_linux.rs, whose ksni and png deps do not build here - that file is still
only covered by CI's ubuntu leg.
windows-menubar-ci.yml runs on windows/** changes: tsc, clippy with -D warnings,
and cargo test on both windows-latest and ubuntu-latest, plus a release-profile
`tauri build --no-bundle` on Windows. The Linux leg exists because most of the
crate's cfg(windows) code cannot be compiled anywhere else, so the reverse -
keeping the ksni paths and every shared helper clean off Windows - has to be
checked somewhere too.
release-menubar-windows.yml mirrors release-menubar.yml: a `windows-v*` tag (or
a manual dispatch) builds the MSI and publishes it, with a sha256, to a
"Windows Menubar vX" release.
The two release-desktop-*.yml files on the source branch are deliberately not
imported: their tag names and "Desktop" release titles would collide with the
Electron app in app/, which already owns `desktop-v*`.
Process spawning (Windows searches the current directory before PATH):
- reg.exe and cmd.exe are now spawned by absolute System32 path via
cli::system_command, which also carries the CREATE_NO_WINDOW flag the three
previous copies each set by hand. The tray badge re-ran `reg query` on every
refresh, so this was the most reliably reachable planted-binary path.
- "Connect Claude" resolves the claude binary itself instead of handing a bare
name to the console shell.
- CLI lookup ignores empty and relative PATH entries. `;;` or a trailing `;`
used to yield PathBuf::from("").join("codeburn.cmd"), a current-directory
lookup, at startup. The filter lives in one place (find_in_dirs) that every
search - codeburn, claude, and the Linux terminal probe - goes through.
- The Linux terminal path re-validates the whole command against the argument
allowlist before joining it into the string `bash -lc` parses; anything that
fails falls through to the argv-only detached spawn.
CLI version gate:
- MIN_CLI_VERSION moves from 0.7.0 to 0.9.9, the first release accepting
`status --format menubar-json --no-optimize` (every quiet refresh passes it)
and emitting all the payload fields the popover reads.
- The gate is probed on mount, before the first fetch. It previously only ran
when a fetch failed with the literal "CLI not found", so an old CLI produced
a payload whose missing history.daily threw and blanked the popover.
- A successful fetch no longer flips an incompatible CLI to compatible, and the
settings panel no longer probes on its own - App owns the verdict, so a
transient probe failure there cannot drop a working app onto the setup screen.
- The payload reads App makes are optional now, so a surprising payload lands on
an empty state rather than a blank window.
Refresh cadence, mirroring mac RefreshCadence.swift: 60s with optimize findings
while the popover is visible, 120s today/all without them while it is hidden,
and an immediate refresh on show when the visible key is stale. Every hide path
in lib.rs now goes through mark_hidden so the debounce stamp and the frontend
signal cannot drift. Previously it was 60s with optimize regardless of
visibility - about 2880 CLI spawns a day.
Claude quota (plan.rs) stops calling the token refresh endpoint. Claude's
refresh token is single-use and rotates, so spending it invalidated the token
Claude Code itself holds and broke the user's login. Parity with
ClaudeCredentialStore.refreshAfter401: re-read Claude's own store for a token it
has already rotated, and report a transient failure when there is not one yet.
Smaller:
- Snapshot writes refuse a symlinked target and are 0600 on unix, mirroring
mac SafeFile; no home directory now means no snapshots rather than a file
dropped in whatever directory the tray was launched from.
- The Windows config lock keeps its file handle open, so the stale sweep can
only ever unlink a lock whose owner is gone. The doc comment now says what the
lock actually buys (the CLI never takes it).
- "updated Xs ago" is only stamped by a fetch of the key on screen.
- External links go through tauri-plugin-opener instead of target=_blank.
- The tray badge font is loaded once into a OnceLock instead of read and parsed
on every render.
- autostart's shared import and constant are cfg-gated so clippy is clean on
every OS.
Adds unit tests for the PATH filter and the version gate.
Brings the Tauri 2.x tray popover from #1022 onto main as windows/, mirroring
mac/. Product name, bundle identifier, and version line up with the macOS
menubar (org.agentseal.codeburn-menubar, 0.9.20); the crate is renamed off
"desktop" so it no longer collides with the Electron app in app/.
Linux (ksni) stays compiled and dev-usable but is documented as experimental:
gnome/ is the shipping Linux surface.
The five src/ CLI commits on that branch are dropped - they re-implement a
daily-bucketing fix main already carries.