fix #93041: [Bug]: After 2026.6.6 no Codex usage\limit UI present in the Control UI Chat interface#95317
fix #93041: [Bug]: After 2026.6.6 no Codex usage\limit UI present in the Control UI Chat interface#95317mikasa0818 wants to merge 2 commits into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the same production sidebar quota-pill fix landed in the merged canonical PR, current main has the render/layout behavior and unit regression coverage, and this branch now only carries incremental test changes rather than a distinct landing candidate. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Keep the merged canonical implementation on main; if maintainers still want browser-level sidebar coverage, open a fresh narrow test-only PR rather than landing this superseded branch. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Keep the merged canonical implementation on main; if maintainers still want browser-level sidebar coverage, open a fresh narrow test-only PR rather than landing this superseded branch. Do we have a high-confidence way to reproduce the issue? No for current main: the original sidebar quota-pill failure is no longer reproducible by source inspection because the quota pill is not gated by sessionSwitcherOnly anymore. The historical failure is still visible in v2026.6.10 source, which predates the current-main canonical fix. Is this the best way to solve the issue? No as a standalone PR: the proposed production fix shape is already on main through the canonical merged PR, and this branch's remaining test-only diff is optional follow-up coverage rather than the best landing path. Security review: Security review cleared: Cleared: the live net diff only modifies UI tests and introduces no dependency, workflow, credential, auth, package, or execution-path change. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against d1b917120a47; fix evidence: commit cf31689a03a7, main fix timestamp 2026-06-22T19:21:38Z. |
# Conflicts: # ui/src/styles/chat/layout.css # ui/src/ui/chat/session-controls.ts # ui/src/ui/e2e/chat-quota-pill-93041.e2e.test.ts # ui/src/ui/views/chat.test.ts
|
🦞✅ Reason: structured ClawSweeper close marker: close-required (sha=ca689ef0ac7cf5a9bcd3c6735e19308e24debf64) Closed:
|
Summary
Closes #93041.
ui/src/ui/chat/session-controls.tsandui/src/styles/chat/layout.cssare paired with regression coverage inui/src/ui/views/chat.test.tsandui/src/ui/e2e/chat-quota-pill-93041.e2e.test.ts. No fallback, catch-all, config, auth, provider routing, or quota data-path changes were added.session-controls.tsis a chat/session control surface. No actual session identity, persistence, or switching state is changed; this only changes whether an already-computed informational quota link renders in the sidebar.What Problem This Solves
After the 2026.6.6 chat layout change, the expanded Control UI chat sidebar stopped showing the OpenAI/Codex provider usage pill. The sidebar still received provider usage data through
models.authStatus, but the chat session selector was rendered insessionSwitcherOnlymode and discarded the quota pill before rendering the sidebar markup.Users who rely on the Control UI chat sidebar to monitor OpenAI/Codex 5h/weekly limits can see the
Usagepill again without changing model selection, session switching,/usage, or provider auth behavior.Related context: #94219 is an existing open PR for the same issue. This PR keeps the same narrow owner boundary: render gating + sidebar layout + regression proof only.
Root Cause
renderChatSessionSelect(...)withsessionSwitcherOnly: trueso the sidebar shows only session switching UI.renderChatSessionSelectused that same flag to suppress both the model selector andrenderChatQuotaPill(state), so valid OpenAI/Codex usage windows frommodels.authStatuswere discarded before markup reached the expanded sidebar.sessionSwitcherOnlyshould hide controls used to switch model/session settings, while the provider quota pill is informational navigation to Usage. Gating the quota pill oncompactinstead restores it anywhere there is enough sidebar space and still keeps the collapsed 44px rail clean. Adding explicitquotagrid rows to the sidebar session-switcher layout gives the restored pill a deterministic slot instead of relying on implicit CSS placement.renderChatSessionSelectplus itschat-controls__session-rowCSS. The quota data source remainscollectQuotaWindowsFromAuthStatus(...)/renderChatQuotaPill(...); no OpenAI/Codex OAuth status, provider routing,/usage, or Gateway protocol contract is changed./status,/usage, provider credentials, model routing, session switching RPCs, or model selector behavior changed.sessionSwitcherOnlystill hides the model selector, and compact/collapsed sidebar mode still hides the quota pill.Why This Change Was Made
The quota pill is informational navigation to Usage, not a model/session control. This keeps
sessionSwitcherOnlyhiding the model selector, but allows the quota pill to render whenever the session switcher is not compact/collapsed. The compact 44px sidebar still omits the pill because there is no space for it.The sidebar session-switcher CSS grid also now has explicit
quotarows for both agent+session and single-session layouts. Without those grid areas, a restored quota pill would not have a deterministic slot in the sidebar stack.User Impact
Usagequota pill again in the expanded Control UI chat sidebar and can click it to open Usage. Users with the collapsed sidebar or without provider usage windows see no new pill.Evidence
See the real behavior proof and regression test plan below. All commands were run after the patch against the committed code path and exited 0.
Real behavior proof
Behavior or issue addressed: Restores the OpenAI/Codex provider usage quota pill in the expanded Control UI chat sidebar while preserving the compact/collapsed sidebar behavior.
Real environment tested: Windows/Git Bash task worktree, Node v22.17.0, pnpm 11.2.2. The repo emitted its existing engine warning (
wanted: {"node": ">=22.19.0"}) during pnpm commands; the commands below still exited 0.Exact steps or command run after this patch:
Evidence after fix: Focused chat test exited 0 and asserts the expanded sidebar
sessionSwitcherOnly: truerender includes[data-chat-provider-usage="true"], keeps[data-chat-model-select="true"]hidden, and compact sidebar mode omits the quota pill. Browser E2E exited 0; with mockedmodels.authStatusprovider usage, it waits for both.sidebar-session-select [data-chat-provider-usage="true"]and.agent-chat__composer-controls [data-chat-provider-usage="true"]to be visible, then verifies the sidebar pill links to/usageand mentions Codex. UI test typecheck exited 0.pnpm ui:buildexited 0 and Vite completed with✓ built in 2.28s. Formatter check exited 0 withAll matched files use the correct format.Observed result after fix: The real browser Control UI render path now exposes the quota pill under
.sidebar-session-selectwhen mocked Gateway auth status reports Codex usage windows, while the existing composer pill remains visible. The focused render test also confirms compact sidebar mode produces no quota pill.What was not tested: A live OAuth-connected OpenAI account showing real account percentages was not available in this environment. The production quota data path is unchanged; the regression proof uses the existing mocked Gateway
models.authStatusE2E fixture to exercise the real browser Control UI render path.SonarLint/Sonar scanner note: no
sonarlintorsonar-scannerexecutable was available on PATH in this environment, so no local Sonar scan was run.Regression Test Plan
ui/src/ui/views/chat.test.tsandui/src/ui/e2e/chat-quota-pill-93041.e2e.test.ts.models.authStatusrenders the quota pill in the expanded sidebar session switcher whilesessionSwitcherOnlystill hides the model selector; compact/collapsed sidebar mode does not render the pill.Merge risk
session-controls.ts; the patch does not mutate session keys, switch sessions, persist state, or change Gateway/session RPC payloads. Layout risk is limited to the sidebar session switcher when quota data exists.renderChatQuotaPilloutput and/usagelink, and the CSS adds explicitquotagrid rows for the expanded sidebar layouts. Focused tests cover expanded sidebar display, model-selector suppression, compact-sidebar hiding, and browser-visible sidebar rendering.