Repository navigation
fix(ui): preserve unavailable choices in saved model settings - #142048
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 8:24 AM ET / 12:24 UTC. ClawSweeper reviewWhat this changesThe PR keeps unavailable saved models visible and removable while preventing new selections, adds control regressions, and displays missing runtime metadata as unknown. Merge readiness✅ Ready for maintainer review This remains a useful fix absent from current main. The shared-picker dependency has merged, resolving the previous review blocker; no actionable correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherControl UI model settings combine saved configuration with the Gateway model catalog. Selection controls display those choices and send explicit edits through the existing configuration writers. flowchart LR
A[Saved model settings] --> C[Build model choices]
B[Gateway model catalog] --> C
C --> D[Selection controls]
D --> E{Available choice?}
E -->|Yes| F[Existing configuration writer]
E -->|No| G[Keep visible and reject addition]
D -->|Remove saved choice| F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +27, Tests +160. Total +187 across 9 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Preserve catalog availability at the existing control boundary while retaining saved choices and the established configuration writers. Do we have a high-confidence way to reproduce the issue? Yes, from source: an unavailable saved catalog row survives the settings-data builder but loses its unavailable flag before reaching the picker on current main. No current-main runtime reproduction was executed during this read-only review. Is this the best way to solve the issue? Yes. Forwarding the existing availability flag and enforcing it in the existing multi-select is a narrow repair that preserves model identity, saved values, and writer ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0ed187312e9e. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Related: #136257 Long model menus in Settings and existing model forms now support search by label, model reference, and detail text when there are more than eight choices. One shared picker preserves caller-owned selection and saving, current labels, disabled choices, empty/default values, and custom model entry. The control uses the supported Web Awesome popup API and shared positioning. Compact menus fit their contents, long menus retain readable labels within the viewport, and opening a previously positioned menu after resizing keeps the page in place. Connected caller tests move to the shared control, and the approved control-owner inventory is updated. Validation: - Retained built before-state captures show the original menu without search. Actual Models interactions show label/reference filtering, dismissal without saving, and one exact `fixture/aurora-large` selection followed by public Gateway configuration readback. - The built Automations flow covers compact selection and Default, full-reference filtering and clearing, separate arrow steps, Escape/Tab focus, custom values, catalog replacement with an active query, removed-row refusal, and top/phone layouts. The corrected phone capture has no sideways page scroll. Top-opening keyboard navigation keeps the active row visible. - The page-scroll regression first fails after desktop-to-phone reopening while the same-width control passes. All nine focused browser cases pass after the one-line focus fix, including saved disabled-current and disabled-addition controls. - Additional compiled observations use the same shared-picker bytes with the saved-setting caller from #142048. They show an unavailable row refusing addition, keyboard navigation skipping that row, a saved enabled selection, and removal of a saved unavailable utility value to Auto. Availability policy and saved-setting scope remain owned by that caller. - Required CI is green for `3233f376a5653e6d7d9318fbcf9fd9dce551b7e9`: https://github.com/openclaw/openclaw/actions/runs/34214125224. The real-Gateway artifact is https://github.com/openclaw/openclaw/actions/runs/34214125224/artifacts/10051451654. Additional compiled checks use build `5c82ef64e954844c89160fec0e68e643d7355857` from https://github.com/openclaw/openclaw/actions/runs/34215662198/artifacts/10051766486. Fresh independent acceptance passes all six original behavior clauses using the full recorded public evidence. Earlier failed setup/capture actions and their actual build identities remain in the retained proof; the optional final Models focus query failed after saved-value readback and final accessibility snapshots. AI-assisted. Co-authored-by: Ayaan Zaidi <[email protected]>
|
Thanks @obviyus! Proof: The built Control UI rejected the unavailable choice, saved an available model through the Gateway, and removed a saved utility override through Auto. Readback preserved neighboring settings and the agent's explicit empty fallback list.
The inherited-primary writer remains credited to #141967; the shared picker remains credited to #141894. All 38 tests in the affected file pass after resolving the test-helper import conflict. Required CI passed on the final signed head. Fresh local review found no code or security issue and accepted the retained behavior evidence. The exercised product owners are unchanged from the recorded build. The restriction run retained a failed optional final focus query after its successful save/readback. Its final accessibility snapshots and clean browser/Gateway stops remain recorded; no post-save focus-retention claim is made. |
Related: openclaw#136257 Long model menus in Settings and existing model forms now support search by label, model reference, and detail text when there are more than eight choices. One shared picker preserves caller-owned selection and saving, current labels, disabled choices, empty/default values, and custom model entry. The control uses the supported Web Awesome popup API and shared positioning. Compact menus fit their contents, long menus retain readable labels within the viewport, and opening a previously positioned menu after resizing keeps the page in place. Connected caller tests move to the shared control, and the approved control-owner inventory is updated. Validation: - Retained built before-state captures show the original menu without search. Actual Models interactions show label/reference filtering, dismissal without saving, and one exact `fixture/aurora-large` selection followed by public Gateway configuration readback. - The built Automations flow covers compact selection and Default, full-reference filtering and clearing, separate arrow steps, Escape/Tab focus, custom values, catalog replacement with an active query, removed-row refusal, and top/phone layouts. The corrected phone capture has no sideways page scroll. Top-opening keyboard navigation keeps the active row visible. - The page-scroll regression first fails after desktop-to-phone reopening while the same-width control passes. All nine focused browser cases pass after the one-line focus fix, including saved disabled-current and disabled-addition controls. - Additional compiled observations use the same shared-picker bytes with the saved-setting caller from openclaw#142048. They show an unavailable row refusing addition, keyboard navigation skipping that row, a saved enabled selection, and removal of a saved unavailable utility value to Auto. Availability policy and saved-setting scope remain owned by that caller. - Required CI is green for `3233f376a5653e6d7d9318fbcf9fd9dce551b7e9`: https://github.com/openclaw/openclaw/actions/runs/34214125224. The real-Gateway artifact is https://github.com/openclaw/openclaw/actions/runs/34214125224/artifacts/10051451654. Additional compiled checks use build `5c82ef64e954844c89160fec0e68e643d7355857` from https://github.com/openclaw/openclaw/actions/runs/34215662198/artifacts/10051766486. Fresh independent acceptance passes all six original behavior clauses using the full recorded public evidence. Earlier failed setup/capture actions and their actual build identities remain in the retained proof; the optional final Models focus query failed after saved-value readback and final accessibility snapshots. AI-assisted. Co-authored-by: Ayaan Zaidi <[email protected]>
…aw#142048) Saved model controls lost a catalog row's unavailable state, so an unavailable saved fallback could become a new default choice. Preserve that state in Agents and Models settings, reject disabled additions at the existing multi-select boundary, and skip disabled rows during keyboard navigation. Saved choices stay visible and removable. Missing runtime metadata displays as unknown instead of guessing an engine. All 82 affected control and consumer checks pass. The real built UI/Gateway at CI merge `5c82ef64e954844c89160fec0e68e643d7355857` displayed `retired/not-offered`, then selecting Auto removed the utility override and showed “Defaults saved.” Primary, fallbacks and the selected agent's explicit empty fallback list stayed unchanged. Browser and Gateway stopped normally. Earlier retained lifecycle proof verifies inherited-primary edits, explicit-empty save/readback, later global-default changes and sibling preservation; the already-landed writer from openclaw#141967 remains unchanged. The same build also ignored a normal click on the unavailable row, preserving the complete config readback. Separate keyboard captures show Down/Up movement, Escape/Tab focus and End skipping the unavailable row. Enter then saved `fixture/global-two`, preserving the saved utility, fallback chain and agent settings. A final optional focus query failed after that successful save/readback; the raw failure, final accessibility snapshot and clean consumer stops are retained. The shared picker from openclaw#141894 has landed and its exercised implementation matches this candidate. That PR owns the control and caller migrations. This change adds the unavailable-setting regression, saved-label assertion and Auto removal callback check. Required CI run [34215662198](https://github.com/openclaw/openclaw/actions/runs/34215662198) passed on the prior combined head. GitHub then refused the merge. A check against authoritative main confirmed one test-helper import conflict. The resolution keeps both helpers, and all 38 tests in the affected file pass. The exercised product owners are unchanged; the built proof above retains its original identity. Fresh review and required CI are pending on this conflict-resolution head. Earlier failed checks and fixture attempts remain preserved. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #141967, #141894.
What Problem This Solves
Saved model controls lost unavailable status, letting an unavailable saved fallback become a new default choice. Missing runtime metadata could also display a guessed engine.
Why This Change Was Made
Agents and Models settings retain published availability. The shared multi-select boundary rejects disabled additions and keyboard navigation skips them. Saved choices remain visible and removable; absent runtime metadata stays unknown.
User Impact
Users can remove unavailable saved choices or select Auto without adding unavailable models. Existing primary, fallback, and agent-specific settings remain intact.
Consumers: Agents and Models saved-setting controls preserve availability through display and selection.
Evidence
All 82 affected checks passed. Real built UI/Gateway checks showed the unavailable saved value, removed it with Auto, and preserved other settings. Clicking an unavailable row made no change; keyboard navigation skipped it and saved an enabled choice. An optional focus query failed after successful save/readback; that failure remains recorded. After resolving a test-helper import conflict, all 38 tests in that file passed. Earlier continuous integration and browser proof apply to unchanged product code; no new post-conflict runtime run is claimed.