fix(control-ui): restore provider usage quota pill in sidebar session switcher (fixes #93041)#94219
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 21, 2026, 2:33 AM ET / 06:33 UTC. Summary PR surface: Source +18, Tests +64. Total +82 across 3 files. Reproducibility: yes. Source inspection shows current main and v2026.6.9 pass the sidebar selector through sessionSwitcherOnly: true while renderChatSessionSelect suppresses renderChatQuotaPill in that mode; the PR body also includes before/after live render output. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow sidebar render/layout fix after maintainer review and current-head check gating, keeping the existing provider-agnostic quota data path unchanged. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main and v2026.6.9 pass the sidebar selector through sessionSwitcherOnly: true while renderChatSessionSelect suppresses renderChatQuotaPill in that mode; the PR body also includes before/after live render output. Is this the best way to solve the issue? Yes. Gating the informational quota pill on compact space preserves the intended model-selector suppression, reuses the existing quota data/render path, and adds sidebar quota grid rows for the newly rendered area. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 604aa301899f. Label changesLabel justifications:
Evidence reviewedPR surface: Source +18, Tests +64. Total +82 across 3 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
|
Co-Authored-By: Claude Opus 4.8 <[email protected]>
… switcher (fixes openclaw#93041) (openclaw#94219) * fix(control-ui): restore provider usage quota pill in sidebar session switcher * ci: re-trigger flaky cron-service shard Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Pick-cat <[email protected]> Co-authored-by: Pick-cat <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]>
Summary
renderChatSessionSelect(...)withsessionSwitcherOnly: true. That flag was meant to hide the model selector, but it also suppressed the quota pill.compact(available space) instead ofsessionSwitcherOnly. It renders in the expanded sidebar / desktop / mobile, and stays hidden only in the collapsed (44px) sidebar where there is no room.--session-switchergrid only definedagent/sessionareas, so a rendered quota pill (grid-area: quota) had no slot. Added explicitquotarows to the session-switcher grid templates so the pill stacks deterministically under the session picker.fetchCodexUsage,collectQuotaWindowsFromAuthStatus,renderChatQuotaPill) or to desktop/mobile behavior. The model-selector suppression insessionSwitcherOnlymode is unchanged.Linked context
Closes #93041
Related #93157 — an earlier attempt that removed the guard unconditionally but added no regression test and did not address the missing
quotagrid area in the session-switcher layout.Real behavior proof (required for external PRs)
origin/main.renderChatSessionSelect(...)in sidebar session-switcher mode (sessionSwitcherOnly: true) now emits the quota pill. Copied livenodeoutput of the rendered DOM:Before the patch the same render produced no
data-chat-provider-usagenode (the regression assertion readundefined):data-chat-provider-usage="true"anchor readingUsage 28%, and the row carrieschat-controls__session-row--has-quotaso the newquotagrid area applies.node scripts/run-tsgo.mjsexits 0 and thevite buildof the Control UI completes (✓ built).node; the displayed percentages depend only on the unchangedrenderChatQuotaPilldata path.autoreviewcould not run here (no Codex auth, HTTP 401), so verification relied on the livenoderender output plus the productionvite build.Tests and validation
Which commands did you run?
node scripts/run-vitest.mjs ui/src/ui/views/chat.test.ts— 112 passed (2 new regression tests added).node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.ui.json— exit 0.pnpm ui:build—✓ built.What regression coverage was added or updated?
shows provider quota in the sidebar session switcher (regression #93041)— fails before the patch, passes after.hides provider quota when the sidebar session switcher is collapsed.Risk checklist
Did user-visible behavior change? Yes — the usage quota pill is restored in the expanded sidebar chat; it stays hidden in the collapsed rail.
Did config, environment, or migration behavior change? No.
Did security, auth, secrets, network, or tool execution behavior change? No — the quota data path is untouched; only render gating and CSS grid areas changed.
What is the highest-risk area? Sidebar grid layout when the quota pill is present.
How is that risk mitigated? Explicit
grid-template-areaswere added for the--session-switcher+--has-quotacombinations; covered by the render output above and a cleanpnpm ui:build.Current review state
What is the next action? Maintainer review.
What is still waiting on author, maintainer, CI, or external proof? CI on the pushed head.
Which bot or reviewer comments were addressed? None yet (new PR).
AI-assisted: implemented with Claude Code; verified via the live render output, tsgo, and ui:build above. Author understands the change.