Skip to content

fix(ui): empty model picker leaves an effort-control gap on narrow screens - #198986

Merged
steipete merged 1 commit into
mainfrom
fix/ui-empty-model-effort-gap
Nov 14, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/ui-empty-model-effort-gap

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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-spacing e2e green again: at 390px it measured a 46px model-to-Dictate gap, against its 32px bound.

Evidence

Before: reserved empty effort slot. After: no unavailable effort control

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.
  • New regression in ui/src/pages/new-session/model-control-view.test.tsx covers 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.
  • The rest of the model-control and transcript-search unit tests pass on both runtimes; scoped lint and type checks pass.
  • chat-model-controls.e2e.test.ts > keeps independent model and effort controls within the chat composer already 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.

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.
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T15:54:00.055527Z 82ea3bb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Hide 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.

  • Before: An invisible effort control leaves a reported 46px gap before Dictate.
  • After: The supplied comparison shows the empty slot removed; the author reports a 2px gap.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with direct visual evidence and useful lifecycle coverage; broad exact-head CI is still incomplete.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The inspected before/after composer screenshot demonstrates the changed empty-catalog layout at 390px with synthetic Gateway data; the body additionally records browser spacing checks on Bun and Node and failure restoration after reverting the component change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An empty model catalog leaves unused space or an unavailable Speed fallback beside the model picker.
Reason: The maintainer-authored direction restores the intended empty-state layout while retaining the earlier loading-stability behavior.

Regression provenance

Regression provenance — verified: source commit 2e2faf0339b3 by Vincent Koc; canonical PR #198751 (blame-to-merge-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
Reviewed head: 82ea3bb2a196f61bf07981f257e7deef17b67482

Before merge

None.

Findings

None.

Agent review details

How this fits together

Chat 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]
Loading

Technical review

Best 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

  • Narrow-screen effort reservation changes intended behavior with a stated reason (2e2faf0: Keep background catalog arrival from moving composer controls.)
  • Collapsed unavailable effort control keeps the original intent (16b6110: Avoid an invisible effort slot pushing the model picker away from the microphone.)
  • Access selection visibility keeps the original intent (3e1eff7: Preserve Access choices independently of catalog availability and model-default policy.)
  • Caller-controlled effort suppression keeps the original intent (8c18a7b: Reuse the New Session picker in Cmd+K Compose without showing its effort control.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +8, Tests +30. Total +38 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 10 2 +8
Tests 1 30 0 +30
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 40 2 +38

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This repairs visible composer spacing and an unavailable fallback control without changing message delivery or blocking a working setup.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 14, 2026, 11:06 AM ET / 16:06 UTC.

@steipete
steipete merged commit b7bc6c4 into main Nov 14, 2026
162 of 166 checks passed
@steipete
steipete deleted the fix/ui-empty-model-effort-gap branch November 14, 2026 21:31
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 15, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant