#93041: fix(control-ui): restore Codex usage quota pill in sidebar session switcher#93157
#93041: fix(control-ui): restore Codex usage quota pill in sidebar session switcher#93157qingminglong wants to merge 3 commits into
Conversation
…itcher PR openclaw#88772 ("calm composer controls") replaced the old chat header (which rendered renderChatQuotaPill via renderChatSessionSelect) with a sidebar that calls renderChatSessionSelect with sessionSwitcherOnly: true. The quota pill was inadvertently suppressed because it was gated on !sessionSwitcherOnly alongside the model selector. Fix by rendering the quota pill unconditionally — the data path remains intact. Closes openclaw#93041 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close: this one-line branch addresses the right regression but is superseded by a newer viable PR that handles the sidebar compact state, adds the missing quota grid layout, and includes regression coverage and stronger proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this branch and focus maintainer review on #94219 or an equivalent patch with compact gating, sidebar quota layout, tests, and real render proof. So I’m closing this here and keeping the remaining discussion on #94219. Review detailsBest possible solution: Close this branch and focus maintainer review on #94219 or an equivalent patch with compact gating, sidebar quota layout, tests, and real render proof. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main passes the sidebar through Is this the best way to solve the issue? No. Rendering the existing pill in the sidebar is the right layer, but this branch is too narrow because it lacks compact-state handling, sidebar quota layout, regression coverage, and convincing real Control UI proof. Security review: Security review cleared: The diff is limited to one UI render expression and does not touch credentials, dependencies, workflows, package metadata, or code execution surfaces. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against f60aec6e9da0. |
|
please help me |

Summary
The Codex/OpenAI usage quota pill (shown in the Control UI chat that displays usage limits e.g. "5h remaining") was accidentally removed when the old chat header was replaced with a sidebar in PR #88772 ("calm composer controls").
Root Cause
ui/src/ui/chat/session-controls.tshas asessionSwitcherOnlyflag. When true (as used by the new sidebar), both the model selector AND the quota pill were suppressed:The quota pill suppression was unintentional — only the model selector should be hidden in session-switcher mode. The quota data path (
fetchCodexUsage,collectQuotaWindowsFromAuthStatus,renderChatQuotaPill) remains intact and functional.Real behavior proof
behavior
Remove the
sessionSwitcherOnlyguard from the quota pill rendering so it appears in both the old header and the new sidebar.environment
steps
sessionSwitcherOnly ? "" : renderChatQuotaPill) is replaced with unconditionalrenderChatQuotaPill(state)evidence
Source change verification:
Reproduction script output:
Test suite:
observedResult
The
renderChatQuotaPill(state)call is no longer gated behindsessionSwitcherOnly. When the sidebar rendersrenderChatSessionSelect(state, switchChatSession, { compact: collapsed, sessionSwitcherOnly: true, surface: "sidebar" }), the quota pill is now included in the output.notTested
End-to-end visual rendering verification in a browser. The quota pill renders as a styled
<a>element withdata-chat-provider-usage="true"attribute; its CSS grid placement is already handled by the--has-quotaclass modifier.Regression Test Plan
pnpm test -- --run ui/src/ui/views/chat.test.tspasses (104/104)renderChatQuotaPillfunction and its data path remain unchanged--has-quotaclassAI-assisted: built with Claude Code