Releases: mryll/codexbar
v0.6.0
codexbar 0.6.0 — Smarter cold-boot startup & honest stale messaging
At boot, the widget often lost the race against DHCP/DNS: a ~7s retry budget would expire seconds before the network came up, leaving day-old data with an unexplained ⏸ for a full Waybar interval — and on multi-monitor setups, one bar stale while the others showed fresh data. No config changes needed — existing setups get all of this automatically.
Changed
- Adaptive retry deadline: boot-like starts (no cache, or cache older than 10 min) now poll transient network failures for up to ~20s before giving up. At the first exec there is nothing better to show than an empty module, and on re-execs Waybar keeps the previous output visible — so waiting beats rendering yesterday's data. Mid-session blips keep the quick ~6s budget.
- Multi-monitor episode marker (
.net_wait): only the first instance burns the long wait; siblings do a single quick attempt, so an offline boot converges on all bars in ~22s. - Explicit stale messaging: the tooltip footer now tells you exactly what's happening —
⏸ Waiting for network — data from 09:12 (3 h ago)for network waits,⏸ Stale — data from …for API/auth errors (with HTTP code and reason). Appended to custom--tooltip-formattoo. Fresh data keepsUpdated HH:MM.
Fixed
- Refresh-token rotation race (multi-monitor): credential read + OAuth refresh now happen under the same lock as the fetch. Concurrent boot instances could previously refresh with the same already-rotated refresh_token, hard-fail, and fire a spurious "run codex login" notification.
- Hard refresh failures now persist
.last_errorwith the provider's message, so the tooltip can show why data is stale (previously discarded). - Clock-skewed cache mtimes are never treated as fresh;
flockwait raised 45s → 90s so a waiting sibling renders late instead of dying with a lock-timeout ⚠.
Unchanged
- Healthy-network output is byte-identical to v0.5.x (regression-checked against the v0.5.0 script). No new flags, no waybar config changes.
v0.5.1
codexbar 0.5.1 — Robust cold-boot startup
At boot, Waybar dispatches the widget before the network is up; the single failed request left the widget paused (⏸) on stale data for a full interval (often 5 minutes).
Fixed
- Transient network failures are retried (3 attempts, 3s apart) in both the token refresh and the usage fetch — the boot network race now resolves within one dispatch instead of waiting for the next interval.
- No-response fetch failures no longer persist the
.stalemarker to disk. They reuse the recent cache with an in-memory stale flag (or show a neutral "Loading…" with no cache), matching the transient/hard split the token-refresh path already had. Disk markers and the desktop notification remain reserved for hard HTTP failures (4xx/5xx).
Unchanged
- No new flags, no behavior change on healthy networks. Hard API failures still surface
.stale,.last_errorand the tooltip HTTP section.
v0.5.0
codexbar 0.5.0 — Configurable framed font
The framed tooltip (--frame) pinned JetBrainsMono Nerd Font Mono. That's now just the default of a new --frame-font — point it at any complete Mono Nerd Font you already have instead of installing JBM.
Added
--frame-font: the font pinned in framed mode (defaultJetBrainsMono Nerd Font Mono). No effect in plain mode; the value is escaped for the Pango attribute.
Unchanged
- Default behavior is identical — plain tooltip by default; framed mode still pins JBM unless you override it.
v0.4.0
codexbar 0.4.0 — Plain tooltip by default, opt-in framed mode
The rich tooltip now renders plain (no border) by default, so it looks correct in any Waybar font — no specific font required. The framed "card" is now opt-in via --frame. The never-crash invariant (always exit 0 with valid Waybar JSON) is unchanged.
Changed
- Default is plain: the tooltip drops its box and renders in your bar font. Nothing is aligned to a right border, so a non–Nerd Font can never misalign it.
--frame(new): draws the bordered card and pinsJetBrainsMono Nerd Font Monoso the box, bars, per-model meters and icons stay aligned regardless of your bar font. Install a Nerd Font Mono (e.g.ttf-jetbrains-mono-nerd) for it.
Upgrade note
Existing setups lose the tooltip box on upgrade. Add --frame to your Waybar exec to bring it back.
v0.3.4
codexbar 0.3.4 — Tooltip polish
Visual refinements to the rich tooltip. No behavior change; the never-crash invariant (always exit 0 with valid Waybar JSON) is untouched.
Changed
- Aligned value labels: percentages right-align to a fixed column across the Session, Weekly, Code review and the per-model rate-limit meters.
- Pace marker: the elapsed-pace marker is now a thin gate (
┃) in the foreground color, clearly distinct from the bar fill (█). - Code review pace: the Code review block now shows its pace indicator (
↑ ↓ →), matching the other blocks. - Reset icon: reset lines use the Nerd Font clock glyph.
v0.3.3
Per-model rate limits (additional_rate_limits, e.g. GPT-5.3-Codex-Spark) now render each window (5h / weekly) with its own icon header, vertically aligned with the Session/Weekly blocks — clearer and consistent with the rest of the tooltip.
The reset line drops its redundant label prefix (the label moved to the new per-window header). No behavior changes: severity, pacing and the never-crash invariant (always exit 0 with valid Waybar JSON) are untouched.
v0.3.2
Fixes
- Hardened against extreme/malformed numeric values in the usage payload and local credentials. Scientific-notation (e.g.
1e100) and negative numbers no longer crash the widget — they clamp to a safe range; a corrupt or multi-document cache is rejected up front; andmake_barcan no longer produce a negative-width bar. The additional model-specific meters now use the identical clamped values for both severity and rendering, so a meter can never color the bar without being shown (or vice-versa). The widget always exits 0 with valid Waybar JSON for any input.
v0.3.1
Fixes
- The widget no longer exits non-zero (which makes Waybar hide the module) when the local Codex credentials contain a malformed JWT.
jwt_decodenow always yields a valid JSON object, so token-expiry (exp) and plan-type parsing degrade gracefully — a bad token simply triggers a normal refresh and the plan falls back — instead of crashing underset -euo pipefail. Reinforces the "always exit 0 with valid Waybar JSON" guarantee.
v0.3.0
Features
--remaining: show usage as "what's left" — the bar text and rich tooltip flip to remaining mode (battery-style draining bars plus a remaining-time marker). Opt-in; severity coloring is unchanged.- New format placeholders:
{session,weekly,review}_remaining_pctand{session,weekly,review}_remaining_bar. - Additional Codex model-specific rate-limit meters (
additional_rate_limits) are now shown in the tooltip and counted toward the severity class. - Nicer plan labels: "Pro Lite", "Business Usage Based", "Enterprise Usage Based".
Robustness
- Number-safe jq parsing: malformed or partial usage payloads no longer crash the widget — it always exits 0 with valid Waybar JSON.
Compatibility
- Fully backward compatible — without
--remaining, output is byte-identical to v0.2.1.
v0.2.1
Hardening release — prevents a float-typed value from the API from crashing the widget, the same bug class fixed in claudebar v0.2.2.
Fixed
reset_at, the JWTexpclaim and theapprox_*_messagescredit counts were read raw fromjq. jq ≥ 1.7 preserves a float literal (e.g.13.0), and bash(( ))arithmetic rejects a decimal point in every locale — a float-typed value would have aborted the widget viacountdown,calc_pacingor the token-refresh check. They are now floored injq, exactly asused_percentalready was. Not currently triggered (the API returns integers today).