Skip to content

fix(ui): stop model picker Enter checks from failing on cold opens - #207963

Merged
daniel-lxs merged 2 commits into
mainfrom
openclaw/model-picker-enter-flake-a50440
Nov 29, 2026
Merged

daniel-lxs merged 2 commits into
mainfrom
openclaw/model-picker-enter-flake-a50440

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Two Chromium checks for the fallback model picker can fail on the first Enter even when the picker selects the right model. They expect the callback to have run by the time the browser finishes sending the key. On a cold open, keyboard navigation may still be loading.

User Impact

No change to the picker. A person still presses Enter once. CI can now distinguish a delayed selection from a missing, wrong or duplicate selection.

Why This Change Was Made

I kept the real keypress and waited only afterward, using the existing waitForSolid helper around the original toHaveBeenCalledExactlyOnceWith assertions. The Unicode description check, alias spelling and order, and callback count are unchanged. There is no sleep, preload, timeout increase or test retry.

The navigation change deliberately kept keyboard handling off the startup path and replays queued keys in order. An earlier multi-select test fix waits for the same reason. The original failure trace recorded the selection after the assertion, without a second keypress.

Evidence

I compared main f10c999a and the fix 57d43b20 on the same AWS CrabBox Pond lease, with one browser case per fresh Vitest process and retries disabled. I verified that published head 207f6415 has the identical Git tree. Both unchanged tests failed on their first cold run.

Check Main Fix
Enter on the option found by description 0 calls, expected exactly ["fixture/backup"] 6/6 cold runs passed
Enter on the alias and case-sensitive model 0 calls, expected exactly ["backup", "custom/Model-A"] 6/6 cold runs passed

Fix verification: the full multi-select file passed 16/16 in 1.53 s of Vitest wall time. The cold retained-focus test also passed: ArrowDown and Enter queued before navigation loaded, selected only the second option and left focus in the input. UI component-test typecheck, file lint and formatting all passed.

Real Chromium and disposable Gateway: in Settings → Agents, I searched for Backup and pressed Enter once. The fixture/backup chip appeared; the saved fallback list was exactly ["fixture/backup"], and the chip survived reload after autosave. Reloading immediately when the chip first appeared, before the settings save completed, did not retain the edit in a separate run. This PR does not change settings autosave.

Not verified: hosted PR CI or WebKit.

Worked on by: @daniel-lxs

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

🦞 Made with OpenClaw

roboclaw-bot and others added 2 commits November 29, 2026 04:34
Wait for the exact selection callback after a single Enter, including when the navigation module must replay the key. Keep the description and case-sensitive alias assertions intact.

Co-authored-by: daniel-lxs <[email protected]>
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 2721c947-276b-451d-b42f-bf45a3bc4cd3
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Nov 29, 2026
@daniel-lxs
daniel-lxs marked this pull request as ready for review November 29, 2026 04:53
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. labels Nov 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR waits for selection callbacks after Enter in the alias-preservation and description-search browser tests.

Example: Search for Café on a cold picker open and press Enter once.

  • Before: The test can assert zero calls before queued navigation selects fixture/backup.
  • After: The test awaits exactly one callback containing ["fixture/backup"].

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A correct, minimal test repair supported by source, a recorded failure trace, and reported browser validation; run artifacts remain independently unverified.
Proof confidence 🦐 gold shrimp (3/6) This test-only PR reports baseline failures, six passing cold runs per repaired case, and a passing complete component suite; those run artifacts were not independently inspected, and the prepared linked-work screenshots do not prove these assertions.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: A successful cold fallback-model selection can produce a false browser-check failure.
Reason: The focused repair preserves intentional lazy loading and distinct alias and Unicode-description coverage without changing shipped behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR makes two browser assertions respect intentional asynchronous keyboard replay while preserving their exact expected results; no actionable defect was found.

Reviewed head: 207f641568000244509654a10a7a062183f311e7

Before merge

None.

Findings

None.

Agent review details

How this fits together

The browser tests mount the production MultiSelect component, send keyboard input through its shared lazy menu runtime, and observe the resulting selection callback.

flowchart TD
 A[Browser test] --> B[MultiSelect input]
 B --> C[Shared menu machine]
 C --> D[Lazy navigation runtime]
 D --> E[Selection callback]
 E --> F[Awaited exact assertion]
Loading

Technical review

Best possible solution:

Keep the existing single-key interactions and await their exact callback results with the established helper.

Do we have a high-confidence way to reproduce the issue?

Source shows Enter being queued during the dynamic import while the old assertions run immediately, and the linked diagnostic records precisely that ordering; this review executed no target code.

Is this the best way to solve the issue?

This is the smallest complete repair because the tests must observe asynchronous selection completion without preloading navigation, repeating Enter, or weakening the expected callback.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f766de450b05.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 74d40a7 adds ui/src/components/multi-select.browser.test.ts:202 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 74d40a7ec406; files: ui/src/components/multi-select.browser.test.ts)
  • Shakker: Raw commit 28f5187 adds ui/src/components/multi-select.test.ts:310 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 28f51878583b; files: ui/src/components/multi-select.test.ts)

PR surface

Tests +4. Total +4 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 6 2 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 6 2 +4

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:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 28, 2026, 11:58 PM ET / November 29, 2026, 04:58 UTC.

@daniel-lxs
daniel-lxs merged commit d01f6c1 into main Nov 29, 2026
151 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/model-picker-enter-flake-a50440 branch November 29, 2026 05:13
vincentkoc added a commit that referenced this pull request Nov 29, 2026
* commit 'a012e91c821705e443e42660c34e352623fb0a70': (584 commits)
  fix: confirm recovered config edits while the Gateway is busy (#207918)
  fix: make desktop chat presence avatars slightly smaller (#207966)
  fix: list and select routed Claude models without requiring Claude CLI (#207806)
  fix(ci): check out verifier before plugin preflight reuse
  test(reply): prove channel replacement on user messages (#207813)
  fix(release): bootstrap smoke uses persistent agent creation
  fix(ui): stop model picker Enter checks from failing on cold opens (#207963)
  fix: explain when a provider policy stops a chat reply (#207411)
  fix: show context usage during Claude CLI turns (#207036)
  fix: align the side panel with its resize divider (#207936)
  fix: stop the manual handoff UI test from hanging after completion (#207945)
  fix: surface favorites and recommended models in picker search (#201450)
  fix: show the saved quota reset when chat skips its only model (#207210)
  fix: avoid reloading unchanged plugins after Gateway boot (#207949)
  fix: keep Task progress double-clicks from changing the window (#207937)
  fix(doctor): continue repairs past retained conflicting exec approvals (#207951)
  test(reply): make account isolation assertion decisive (#207793)
  fix: keep task progress compact when reopening Details (#207943)
  fix(ui): restore the saved reading position after an empty search (#207673)
  fix: remove four Memory Wiki settings that had no effect (#207882)
  ...
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
…207963)

Wait for the fallback model picker to replay a single Enter on a cold open. Keep the exact callback count, alias order and case, and Unicode description selection assertions.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 2721c947-276b-451d-b42f-bf45a3bc4cd3
(cherry picked from commit d01f6c1)

Follow-up audit: Pinned main audit found no later same-path, PR-number, or source-SHA follow-ups.

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
…penclaw#207963)

Wait for the fallback model picker to replay a single Enter on a cold open. Keep the exact callback count, alias order and case, and Unicode description selection assertions.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 2721c947-276b-451d-b42f-bf45a3bc4cd3
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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

2 participants