Conversation
The float bar rendered an informational selected metric (no budget set, a balance line, no active session) as "0% used" and turned its text into "Resets <text>". Pills now show the informational text (or an em dash), keep the neutral tone and only show a reset taken from a timestamp, like the tray card and the tray tooltip already do.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
UI proof (browser-use)Result: PASS on build At the maintainer's direction, this proof drove the app's WebView2 over CDP with the browser-use CLI instead of CUA. It used no keyboard, mouse or focus. All proof windows stayed on the second display, the foreground window was never part of the proof process tree, and the kit settings turned the global shortcut off. Setup
Results
Before this fix, the same situation on the #702 build (LiteLLM spend-only account, scenario s4) rendered the pill as Validation at
|
| Command | Result |
|---|---|
pnpm install --frozen-lockfile |
pass |
pnpm run check-locale |
OK, 871 keys |
pnpm test |
65 files, 396 passed. The timing-based useTrayPanelLayout.sizing.test.tsx case failed once under full-suite load, passed 3 of 3 runs alone, and the full rerun was green. |
src/floatbar/FloatBar.test.tsx |
31 passed. The five informational tests fail without the FloatBar.tsx change. |
pnpm run lint |
0 errors |
pnpm run build |
pass |
Rust is unchanged.
Screenshots
All paths are under C:\Users\FSOS\AppData\Local\Win-CodexBar\port-audit\proof\floatbar-info\shots\. The float bar window is transparent, so its captures are RGBA. Each -on-dark.png copy composites the capture onto #1c1c1e at 4x so the white pill text is readable.
733-info-floatbar-on-dark.png: the pill reads "No active 5h session" with the teal Codex border.733-info-tray-card.png: the tray card's Session row with the same text.733-percent-floatbar-on-dark.png: the control pill, "61%" and "2h 59m".733-percent-tray-card.png: the control tray card, 61% and 24% used.
Seen again during this proof (on main, not caused by this PR)
- A reset more than about 24.8 days away triggers an immediate forced refresh. This is the
useProviderstimer overflow that Fix reset refresh timer for resets over 24.8 days away #720 fixes. A firstpercentseed with a reset in 2099 was replaced by a forced refresh about 100 ms after launch, with two Codex fetches in the log. The same seed with a reset 3 hours out stayed, and that run is the control above.
|
Adversarial validation passed at b613a91 Scope: fix float bar pills for informational metrics (#733), validated as merged into release/v0.70.0 (merge b613a91 = merge of 0e0944f into a453cfd). Attacks:
No defects found. The browser-use proof (issuecomment-5928195219 at 0e0944f) already showed the informational pill as neutral text with no % and no reset. READY for the un-draft rule. |
Found while proving #702 (LiteLLM spend-only account, scenario s4).
Summary
When the selected metric is informational, the float bar rendered it as a quota anyway:
0%(or100%in remaining mode),LiteLLM: 0% usedfollowed byResets No budget set, because the informational text went through the reset formatter.Informational metrics have no quota percentage: no budget set, a balance line, or no active session. The tray card and the tray tooltip already show their text, so the float bar now does the same:
<Provider>: <text>. A reset line is added only when the window has a reset timestamp.This is not specific to LiteLLM. Every provider whose selected metric falls back to an informational primary is affected on
main, for example Hugging Face billing, OpenRouter "Account balance unavailable", Kilo "Credit usage unavailable", and Codex or Claude "No active 5h session" with no other lane.Upstream reference
None. The float bar is a Windows-only surface, so upstream has no counterpart. The behavior matches this app's tray card and tray tooltip, which already show informational text.
Ported / Deferred
Nothing is ported or deferred.
Validation
pnpm --dir apps/desktop-tauri install --frozen-lockfile: passpnpm run check-locale: OK, 871 keyspnpm test: 65 files, 396 passed. The first full run had 1 failure inuseTrayPanelLayout.sizing.test.tsx("does not feed measurement style changes back into another auto-fit pass"). That test is timing-based and comes frommain. It passed 3 of 3 runs in isolation, and the full rerun was green.src/floatbar/FloatBar.test.tsx: 31 passed. The five informational tests fail without theFloatBar.tsxchange.pnpm run lint: 0 errors. The warnings already exist onmain, including the unusedSettingsSnapshotimport inFloatBar.tsx.pnpm run build: passAffected areas
apps/desktop-tauri/src/floatbar/FloatBar.tsx) and testsMerge note: port branches that add
resetDescriptionFallbackto the float bar (the #657/#702 chain) conflict in one hunk. To resolve it, passnullinstead of the fallback when the window is informational.UI proof
PASS at
0e0944f3(browser-use over WebView2 CDP, no keyboard, mouse or focus): #733 (comment)%and no reset element. The tooltip isCodex: No active 5h session, and the tray card shows the same text.auto.