fix(ui): restore provider usage pill in desktop chat composer [AI]#93055
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 15, 2026, 3:33 PM ET / 19:33 UTC. Summary PR surface: Source +11, Tests +138. Total +149 across 6 files. Reproducibility: yes. at source level: current main routes Chat through renderGuardedChatControls/renderChatControls, which omits renderChatQuotaPill even though models.authStatus can provide usage windows. I did not rerun a live browser repro during this read-only review. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land this PR after the maintainer clears the human-review pause and exact-head gates, then close #93041 as implemented; this PR is the stronger current landing path than #93285 because it includes the async re-render dependency, mobile layout guard, and browser proof. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main routes Chat through renderGuardedChatControls/renderChatControls, which omits renderChatQuotaPill even though models.authStatus can provide usage windows. I did not rerun a live browser repro during this read-only review. Is this the best way to solve the issue? Yes. Reusing renderChatQuotaPill and the existing models.authStatus usage-window contract in the active composer control surface is the narrow maintainable fix; a new Codex-only widget or broader topbar redesign would be too broad for this regression. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b3128ba93def. Label changesLabel justifications:
Evidence reviewedPR surface: Source +11, Tests +138. Total +149 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper automerge |
|
🦞🧹
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
Re-review progress:
|
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
…aw#93041) Composer refactors dropped the quota pill from renderChatControls and left the desktop renderChatSessionSelect wrapper orphaned, so it rendered nowhere on desktop. Re-attach the existing pill, add modelAuthStatusResult to the guarded controls dep list so it updates when usage windows arrive async, and hide it on the 2-col mobile composer grid. Co-Authored-By: Claude Opus 4.8 <[email protected]>
) Playwright/Chromium test that mocks models.authStatus usage windows and asserts the restored provider usage pill renders in the desktop chat composer (and is absent without usage). Skips gracefully when Chromium is unavailable. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…openclaw#93041) Match the control-ui-e2e convention (.artifacts/control-ui-e2e/...) so the proof run does not leave untracked root-level files. Addresses ClawSweeper review. Co-Authored-By: Claude Opus 4.8 <[email protected]>
49a5b9c to
f01823e
Compare
|
Maintainer verification complete for
Land-ready. Screenshots remained under ignored |
…penclaw#93055) * fix(ui): restore provider usage pill in desktop chat composer (openclaw#93041) Composer refactors dropped the quota pill from renderChatControls and left the desktop renderChatSessionSelect wrapper orphaned, so it rendered nowhere on desktop. Re-attach the existing pill, add modelAuthStatusResult to the guarded controls dep list so it updates when usage windows arrive async, and hide it on the 2-col mobile composer grid. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(ui): add real-browser e2e proof for chat quota pill (openclaw#93041) Playwright/Chromium test that mocks models.authStatus usage windows and asserts the restored provider usage pill renders in the desktop chat composer (and is absent without usage). Skips gracefully when Chromium is unavailable. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(ui): write quota-pill e2e screenshots to ignored .artifacts path (openclaw#93041) Match the control-ui-e2e convention (.artifacts/control-ui-e2e/...) so the proof run does not leave untracked root-level files. Addresses ClawSweeper review. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
…penclaw#93055) * fix(ui): restore provider usage pill in desktop chat composer (openclaw#93041) Composer refactors dropped the quota pill from renderChatControls and left the desktop renderChatSessionSelect wrapper orphaned, so it rendered nowhere on desktop. Re-attach the existing pill, add modelAuthStatusResult to the guarded controls dep list so it updates when usage windows arrive async, and hide it on the 2-col mobile composer grid. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(ui): add real-browser e2e proof for chat quota pill (openclaw#93041) Playwright/Chromium test that mocks models.authStatus usage windows and asserts the restored provider usage pill renders in the desktop chat composer (and is absent without usage). Skips gracefully when Chromium is unavailable. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(ui): write quota-pill e2e screenshots to ignored .artifacts path (openclaw#93041) Match the control-ui-e2e convention (.artifacts/control-ui-e2e/...) so the proof run does not leave untracked root-level files. Addresses ClawSweeper review. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
Summary
After 2026.6.6 the provider usage/quota pill (5h + weekly limits) disappeared from the desktop Control UI chat. The composer refactors (
feat: calm composer controls #88772,feat(webui): add session workspace rail #92856) moved the desktop chat controls intorenderChatControlsbut dropped the quota pill; the only desktop caller that still rendered it (therenderChatSessionSelectwrapper) became orphaned, so the pill rendered nowhere on desktop. Mobile was unaffected.This restores the existing pill (
renderChatQuotaPill) intorenderChatControlsusing the existingmodels.authStatususage-window contract — provider-agnostic, no new config, no Codex/protocol change. It is intentionally scoped to re-attaching the existing pill, not the separately-tracked always-visible topbar. The pill now sits in the composer controls row (next to the model selector) rather than the pre-2026.6.6 upper-right header, since that desktop header no longer exists.Surface:
ui/(Control UI desktop chat composer controls).Root cause / fix details:
renderChatControls(the shipped desktop composer controls) rendered the model select + settings popover but no longer the quota pill.renderGuardedChatControlswrapsrenderChatControlsinguard([...]); the dep list omittedstate.modelAuthStatusResult, so even once the pill is re-attached the guarded controls would not re-render when usage windows arrive async. Added that dependency..agent-chat__composer-controlsis flex (pill fits); the@media (max-width: 768px)layout is a fixed 2-column grid (model | settings), so the pill is hidden on mobile to avoid pushing the settings chip onto a second row.Linked context
Refs #93041
Real behavior proof
Behavior addressed: Desktop Control UI chat no longer shows the OpenAI/Codex (or any monitored provider) usage pill after 2026.6.6; this restores it and makes it update when
models.authStatususage windows arrive.Real environment tested: The production Control UI, served by the mocked-gateway harness and rendered in real headless Chromium 148 (Playwright) at a 1280×900 desktop viewport — the full app on the real
/chatroute, not jsdom.models.authStatusreturned an OAuth Codex provider with 5h + Week usage windows.Exact steps or command run after this patch:
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/ui/e2e/chat-quota-pill-93041.e2e.test.tsEvidence after fix: Headless Chromium screenshot of the production Control UI desktop chat — the composer controls row shows the restored provider pill reading "Usage 29%", linking to
/usage, between the model selector and the Chat settings button./usage; it is absent when no provider usage windows are present. Onorigin/main, the identical harness rendered no pill even with usage windows present.models.authStatuswas mocked with representative OAuth usage windows). Mobile intentionally keeps no composer pill (hidden via CSS to preserve the 2-column mobile grid).Tests and validation
ui/src/ui/e2e/chat-quota-pill-93041.e2e.test.ts— real-browser (Playwright/Chromium) test: mocksmodels.authStatususage windows, asserts the pill renders in.agent-chat__composer-controlson/chat, and that it is absent without usage windows. Skips gracefully when Chromium is unavailable. 2/2 pass.ui/src/ui/app-render.helpers.browser.test.ts— added 2 jsdom tests asserting the pill renders inrenderChatControlswith usage data and is absent without it (guards the live surface the existingchat.test.tstest missed — it rendered the orphaned wrapper). 9/9 pass.ui/src/ui/views/chat.test.ts— 104/104, unchanged.oxfmt --check,oxlint,tsgo:core,tsgo:test:ui— all clean.Risk
Low, UI-only. Reuses an existing render helper and the existing
models.authStatusprojection; no config/default/migration/auth-logic change.AI assistance
AI-assisted (Claude). Investigation, fix, and proof were reviewed and are owned by me.