Skip to content

fix(ui): preserve unavailable choices in saved model settings - #142048

Merged
obviyus merged 15 commits into
mainfrom
fix/saved-model-settings
Sep 8, 2026
Merged

obviyus merged 15 commits into
mainfrom
fix/saved-model-settings

Conversation

@obviyus

@obviyus obviyus commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

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.

@obviyus obviyus self-assigned this Sep 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 8, 2026
@obviyus obviyus changed the title fix(ui): preserve saved model inheritance and unavailable choices fix(ui): preserve unavailable choices in saved model settings Sep 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 8:24 AM ET / 12:24 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 14994e8272d968863a2a771e233b315d29785cb4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with useful regression coverage, specific retained runtime observations, and no remaining actionable finding.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Recorded built UI/Gateway observations exercise unavailable-choice rejection, keyboard skipping, Auto removal, and configuration readback; six relevant production files match that build. The prepared sibling screenshots support inheritance preservation only, and no fresh execution is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Recorded built UI/Gateway observations exercise unavailable-choice rejection, keyboard skipping, Auto removal, and configuration readback; six relevant production files match that build. The prepared sibling screenshots support inheritance preservation only, and no fresh execution is claimed.
Evidence reviewed 10 items Remaining defect on current main: Current main still omits catalog availability when constructing Agents and Models setting options; the introduced changes carry available=false into the existing disabled-option contract.
Latest-release check: The supplied latest release, v2026.9.2, also constructs default-model options without forwarding available=false.
Selection boundary preserves saved values: The multi-select rejects disabled additions by caller-owned model identity, skips disabled keyboard targets, and leaves saved-chip removal available. The added tests exercise clicks, typed additions, keyboard navigation, changing availability, and case-distinct model references.
Findings None None.
Security None None.

How this fits together

Control 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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +27, Tests +160. Total +187 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 5 36 9 +27
Tests 4 162 2 +160
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 198 11 +187

Review metrics

Metric Value Why it matters
Proof continuity 6 relevant production blobs match the recorded build The conflict-resolution head preserves the exercised settings behavior and control implementation.

Technical review

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

Labels

Label justifications:

  • P2: This repairs a bounded model-settings selection defect without evidence of an urgent runtime outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Recorded built UI/Gateway observations exercise unavailable-choice rejection, keyboard skipping, Auto removal, and configuration readback; six relevant production files match that build. The prepared sibling screenshots support inheritance preservation only, and no fresh execution is claimed.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded built UI/Gateway observations exercise unavailable-choice rejection, keyboard skipping, Auto removal, and configuration readback; six relevant production files match that build. The prepared sibling screenshots support inheritance preservation only, and no fresh execution is claimed.

Evidence

What I checked:

  • Remaining defect on current main: Current main still omits catalog availability when constructing Agents and Models setting options; the introduced changes carry available=false into the existing disabled-option contract. (ui/src/pages/model-providers/default-models-view.ts:57, 0ed187312e9e)
  • Latest-release check: The supplied latest release, v2026.9.2, also constructs default-model options without forwarding available=false. (ui/src/pages/model-providers/default-models-view.ts:57, 3928bad9badf)
  • Selection boundary preserves saved values: The multi-select rejects disabled additions by caller-owned model identity, skips disabled keyboard targets, and leaves saved-chip removal available. The added tests exercise clicks, typed additions, keyboard navigation, changing availability, and case-distinct model references. (ui/src/components/multi-select.ts:169, 14994e8272d9)
  • Prior dependency blocker resolved: GitHub REST confirms feat(ui): search long model menus #141894 merged at 2026-09-08T12:00:45Z. Its shared picker and model-picker adapter match current main in this checkout; that merged work supplies the control, while this PR supplies the remaining availability propagation. (ui/src/components/select-picker.ts:143, 932ae87ede92)
  • Recorded real behavior: The captured PR body reports the built UI/Gateway at 5c82ef64e954844c89160fec0e68e643d7355857 retaining an unavailable saved label, rejecting its click, skipping it during keyboard navigation, saving an enabled choice, and removing the utility override through Auto. Configuration readback preserved primary, fallback, and agent settings. The optional final focus-query failure is disclosed separately from successful save/readback. Artifact metadata confirms the referenced build artifact belongs to run 34215662198 and the prior reviewed head. (5c82ef64e954)
  • Proof continuity across conflict resolution: GitHub contents reads at the recorded proof build matched current-checkout blob identities for the multi-select, shared picker, Agents option builder, default-model view, runtime label formatter, and multi-select stylesheet. Their production contents also have no diff from the previously reviewed head. This establishes source continuity without claiming a fresh runtime execution. (ui/src/pages/model-providers/default-models-view.ts:60, 5c82ef64e954)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • shakkernerd: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-08T08:54:42.259Z sha 6271ea9 :: blocked before merge. :: none
  • reviewed 2026-09-08T09:41:17.557Z sha cc4dc89 :: blocked before merge. :: none
  • reviewed 2026-09-08T10:36:07.650Z sha 02e8e49 :: blocked before merge. :: none
  • reviewed 2026-09-08T11:16:53.237Z sha 02e8e49 :: blocked before merge. :: none
  • reviewed 2026-09-08T11:47:30.073Z sha 02e8e49 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 8, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 8, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 8, 2026
obviyus added a commit that referenced this pull request Sep 8, 2026
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]>
@obviyus
obviyus merged commit bc02bd0 into main Sep 8, 2026
189 of 191 checks passed
@obviyus
obviyus deleted the fix/saved-model-settings branch September 8, 2026 12:31
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

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.

Before After
Saved model choices lost their unavailable state. Unavailable additions are rejected while saved choices remain visible and removable.
Missing runtime metadata guessed an engine. Missing metadata stays unknown.

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.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 9, 2026
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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 9, 2026
…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]>
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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