Repository navigation
fix(ui): empty model picker leaves an effort-control gap on narrow screens - #198986
Conversation
Keep the effort reservation while model discovery is pending, then omit the control when accepted picker choices are empty. Preserve active access-program controls and cover the pending-provider transition without exposing fallback Speed controls.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesHide the effort control after model discovery confirms an empty catalog, while preserving pending discovery and active Access controls. Example: Open New Session at a 390px viewport with no available models.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep open: this PR narrowly repairs a current-main layout regression, with no actionable correctness or security findings. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherChat and New Session share model controls that consume catalog readiness, model choices, and session preferences to render the model and effort pickers. flowchart LR
A[Model catalog owner] --> B[Catalog readiness and choices]
C[Session preferences] --> D[Shared model controls]
B --> D
D --> E[Model picker]
D --> F[Conditional effort picker]
Technical reviewBest possible solution: Use the existing shared controls to reserve effort space during discovery and omit unavailable effort controls after confirmed empty discovery. Do we have a high-confidence way to reproduce the issue? The current-main reservation and narrow-screen CSS establish the failing path, supported by the inspected comparison and reported before/fix/revert browser results; no target code was executed during this review. Is this the best way to solve the issue? The patch is a small, complete change in the existing presentation owner, preserving pending-provider behavior, populated choices, active Access selection, and explicit caller suppression. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5ed2b57f17ad. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +8, Tests +30. Total +38 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 14, 2026, 11:06 AM ET / 16:06 UTC. |
|
Merged via squash.
|
…claw#198986) Keep the effort reservation while model discovery is pending, then omit the control when accepted picker choices are empty. Preserve active access-program controls and cover the pending-provider transition without exposing fallback Speed controls.
Related: #198751
What Problem This Solves
Fixes: the new-session composer keeps an empty effort-control gap before the Dictate button on narrow screens when model discovery finds no models.
User Impact
User impact: with no models available, the composer no longer shows a blank gap or a stray Speed fallback next to the model picker; the layout matches the populated state.
Why This Change Was Made
#198751 restored a hidden effort slot on narrow screens, so the composer's geometry stays stable while the model catalog loads. The slot is still reserved after discovery confirms there are no model choices. Now the composer keeps the reservation only while discovery is pending, or while a provider is still resolving. Once the catalog is confirmed empty, it omits the whole effort control, including the provider-default Speed fallback. This also turns the scheduled
new-session-page.model-picker-spacinge2e green again: at 390px it measured a 46px model-to-Dictate gap, against its 32px bound.Evidence
Synthetic fixture, 390px viewport, no models configured. After the fix, the gap is 2px on mobile and 3px on desktop, and it stays the same while the picker opens and closes.
ui/src/e2e/new-session-page.model-picker-spacing.e2e.test.ts: fails before the fix on both the pinned Bun runtime (12.83s) and Node (16.80s). After the fix, all nine spacing and catalog-arrival cases pass on both: Bun 22.20s, Node 35.89s. Reverting the component change brings the failure back on both.ui/src/pages/new-session/model-control-view.test.tsxcovers three states. An unresolved catalog reserves the slot. An empty catalog with a pending provider keeps it. An accepted empty catalog removes the whole effort control, including the Speed fallback.chat-model-controls.e2e.test.ts > keeps independent model and effort controls within the chat composeralready fails on unmodified main, on both runtimes and with a non-empty catalog. This change doesn't touch that path; it stays a separate failure.