Skip to content

improve(ui): simplify local provider recovery - #117165

Merged
vincentkoc merged 3 commits into
mainfrom
improve-local-provider-recovery
Aug 1, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
improve-local-provider-recovery

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

When a configured local provider goes offline, Model Setup exposes a raw connection error and can also repeat the same provider under gateway discovery. The result looks like setup was lost even though the selected model is still configured.

Why This Change Was Made

  • present the saved provider and model as one quiet Selected model row
  • keep detected endpoint details visible when the Gateway provides them
  • replace the raw unavailable error with a short provider-specific status
  • use one contextual action: Check model, Try again, or Check again
  • suppress the duplicate auto-detected candidate when it represents the configured connection

This deliberately does not introduce a separate connection editor or remote/local mode. Provider setup remains in the existing provider-owned setup flows.

User Impact

Operators can see that their model is still selected, restart the provider if needed, and retry the check without navigating into another setup concept. Successful verification still opens the existing start-chat success dialog.

Evidence

  • focused unit tests: 43 passed
  • provider E2E: Ollama, llama.cpp, LM Studio, and local-provider recovery all passed
  • i18n baseline and verification passed
  • targeted oxlint, stylelint, and git diff --check passed
  • autoreview clean; patch correctness 0.99
  • immutable screenshot evidence is pinned to proof commit e3401ae73fb4646a7b96940963c48464b77644ee

Screenshots

Before

Before: raw failure and duplicated configured provider

Revised desktop

Revised selected-model recovery on desktop

Revised mobile

Revised selected-model recovery on mobile

@vincentkoc vincentkoc self-assigned this Aug 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Aug 1, 2026
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 1, 2026, 4:33 AM ET / 08:33 UTC.

ClawSweeper review

What this changes

The PR redesigns Control UI Model Setup so configured local models appear as a selected-model recovery row with concise provider status, retry text, and duplicate detected-candidate suppression.

Merge readiness

⛔ Blocked by patch quality or review findings - 5 items remain

This PR is still necessary, but its latest head retains the prior P1 regression: once a model is configured, it removes the only discovery-refresh control and replaces it with a verification-only action. A failed local provider can therefore be retried, but the user cannot refresh Gateway discovery to learn about a restarted endpoint or changed offered models; keep the PR open for that focused repair and maintainer review.

Priority: P2
Reviewed head: 53d5cf370ccc82befba3e679bf697b40588d0946

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The visual recovery proof is strong, but the patch removes a needed configured-model recovery operation and its updated E2E encodes that regression.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Downloaded desktop and mobile screenshots directly show the revised selected-model failure state, and the final-head contributor comment reports the focused browser recovery E2E; the remaining blocker is functional coverage for discovery refresh, not missing proof media.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Downloaded desktop and mobile screenshots directly show the revised selected-model failure state, and the final-head contributor comment reports the focused browser recovery E2E; the remaining blocker is functional coverage for discovery refresh, not missing proof media.
Evidence reviewed 6 items Proposed action removes detection refresh: The PR shows the configured-model row with only onVerify, while the top-level Check again control is suppressed whenever configuredModel exists. The changed UI consequently has no reachable onDetect action for configured local models.
Verification cannot refresh Gateway candidates: verifyConnection() only runs the openclaw.setup.verify task, whereas detect() is the operation that resets verification state and calls openclaw.setup.detect. A retry therefore cannot refresh endpoint details or candidate models.
Regression test now asserts the wrong request: The PR changes the configured-route recovery E2E so Check again must issue another verification request and explicitly asserts that detection does not change, leaving the lost recovery behavior unprotected.
Findings 1 actionable finding [P1] Keep discovery refresh available for configured models
Security None None.

How this fits together

Control UI Model Setup asks the Gateway to detect available provider models and separately verify the currently configured model. The detection result feeds candidate and endpoint details, while verification reports whether the saved route can answer; both are needed for local-provider recovery.

flowchart LR
  A[Gateway connection] --> B[Model Setup detection]
  B --> C[Configured model and candidates]
  C --> D[Selected model recovery row]
  D --> E[Verify saved model]
  B --> F[Refresh provider discovery]
  E --> G[Provider status]
  F --> C
Loading

Before merge

  • Keep discovery refresh available for configured models (P1) - The new configured-model condition hides the existing Check again control, and the selected-row button only calls verification. Verification cannot refresh Gateway candidates, so a restarted local provider or changed offered model remains stuck on stale detection data. Restore a detect action and extend the recovery E2E to prove it refreshes the configured route.
  • Resolve merge risk (P1) - Merging would remove the configured-model discovery refresh path: after a local provider restarts, changes endpoint details, or offers a different model, users can only re-run verification against stale detection data.
  • Complete next step (P2) - This maintainer-labeled PR has a concrete P1 correction, but protected-label handling keeps the repair and merge decision in human review rather than an automated work lane.
  • Improve patch quality - Restore a distinct detect/refresh action for configured models.
  • Improve patch quality - Update the local-provider recovery E2E to change detection data and assert that the refresh action issues openclaw.setup.detect and updates the row.

Findings

  • [P1] Keep discovery refresh available for configured models — ui/src/pages/model-setup/view.ts:601
Agent review details

Security

None.

PR surface

Source +138, Tests +256. Total +394 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 4 228 90 +138
Tests 8 281 25 +256
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 509 115 +394

Review metrics

None.

Stored data model

Persistent data-model change detected: vector/embedding metadata: ui/src/e2e/model-setup-recovery.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Restore configured-model discovery refresh (recommended)
    Keep the selected-model verification action, but expose a separate refresh action that calls detection and prove it updates local-provider recovery state.
  2. Accept verification-only recovery
    Intentionally remove discovery refresh for configured models and document why retries against stale detection data are sufficient for supported local providers.

Technical review

Best possible solution:

Preserve the selected-model recovery presentation while keeping a distinct configured-model Check again action that calls detection, then cover endpoint/model refresh in the local-provider recovery E2E.

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

Yes, from source and the mocked-Gateway E2E contract: configured models suppress onDetect, while their remaining button calls only verification; a recovery fixture can change the detected endpoint or model and show that it cannot refresh.

Is this the best way to solve the issue?

No. The presentation cleanup is coherent, but replacing discovery refresh with verification-only retry loses an existing recovery capability; retain both operations with clear contextual labels.

Full review comments:

  • [P1] Keep discovery refresh available for configured models — ui/src/pages/model-setup/view.ts:601
    The new configured-model condition hides the existing Check again control, and the selected-row button only calls verification. Verification cannot refresh Gateway candidates, so a restarted local provider or changed offered model remains stuck on stale detection data. Restore a detect action and extend the recovery E2E to prove it refreshes the configured route.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b0b708d91942.

Labels

Label justifications:

  • P2: This is a bounded Control UI recovery regression for configured local providers, without evidence of data loss, security exposure, or system-wide unavailability.
  • merge-risk: 🚨 compatibility: The PR removes an existing configured-model Check again discovery path, changing recovery behavior for operators whose local endpoint or offered model changes.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): Downloaded desktop and mobile screenshots directly show the revised selected-model failure state, and the final-head contributor comment reports the focused browser recovery E2E; the remaining blocker is functional coverage for discovery refresh, not missing proof media.
  • proof: sufficient: Contributor real behavior proof is sufficient. Downloaded desktop and mobile screenshots directly show the revised selected-model failure state, and the final-head contributor comment reports the focused browser recovery E2E; the remaining blocker is functional coverage for discovery refresh, not missing proof media.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Downloaded desktop and mobile screenshots directly show the revised selected-model failure state, and the final-head contributor comment reports the focused browser recovery E2E; the remaining blocker is functional coverage for discovery refresh, not missing proof media.

Evidence

What I checked:

  • Proposed action removes detection refresh: The PR shows the configured-model row with only onVerify, while the top-level Check again control is suppressed whenever configuredModel exists. The changed UI consequently has no reachable onDetect action for configured local models. (ui/src/pages/model-setup/view.ts:601, 53d5cf370ccc)
  • Verification cannot refresh Gateway candidates: verifyConnection() only runs the openclaw.setup.verify task, whereas detect() is the operation that resets verification state and calls openclaw.setup.detect. A retry therefore cannot refresh endpoint details or candidate models. (ui/src/pages/model-setup/model-setup-page.ts:459, b0b708d91942)
  • Regression test now asserts the wrong request: The PR changes the configured-route recovery E2E so Check again must issue another verification request and explicitly asserts that detection does not change, leaving the lost recovery behavior unprotected. (ui/src/e2e/model-setup.e2e.test.ts:878, 53d5cf370ccc)
  • Prior review blocker remains at the latest head: The provided previous ClawSweeper review identified the same missing discovery refresh; the latest head still routes the configured-model button only to verification and still suppresses the header detect action. (ui/src/pages/model-setup/configured-model.ts:139, 53d5cf370ccc)
  • Feature provenance: Current Model Setup detection and verification ownership appears to date to the initial Control UI implementation commit, which introduced both the page and view surfaces later modified by this PR. (ui/src/pages/model-setup/model-setup-page.ts:459, f58570cb8c91)
  • Visual proof inspected: Downloaded desktop and mobile screenshots visibly show the intended selected-model status and retry presentation; they do not demonstrate a discovery refresh after the endpoint or offered model changes.

Likely related people:

  • Dallin Romney: Git history and blame attribute the current Model Setup detection/verification page and view ownership to the commit that introduced this Control UI surface. (role: feature introducer and current-path owner; confidence: high; commits: f58570cb8c91; files: ui/src/pages/model-setup/model-setup-page.ts, ui/src/pages/model-setup/view.ts)

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-08-01T02:21:51.018Z sha 0daa8c9 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T02:59:33.671Z sha 0daa8c9 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T07:52:41.461Z sha 46598b6 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T08:09:02.262Z sha 46598b6 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T08:20:57.020Z sha 42dde2b :: found issues before merge. :: [P1] Keep discovery refresh available for configured models

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 1, 2026
@vincentkoc
vincentkoc force-pushed the improve-local-provider-recovery branch from 0daa8c9 to 46598b6 Compare August 1, 2026 07:43
@vincentkoc vincentkoc changed the title improve(ui): make local provider recovery actionable improve(ui): simplify local provider recovery Aug 1, 2026
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 1, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 1, 2026 08:02
@vincentkoc

Copy link
Copy Markdown
Member Author

Post-ready exact-head proof for 46598b6966d9da82f45759a9ffcc63f3360d3a6b:

  • focused Model Setup unit tests: 43 passed
  • local-provider recovery browser E2E: 1 passed
  • targeted oxlint and stylelint: passed
  • git diff --check origin/main...HEAD: passed
  • current origin/main has no changes to the touched Model Setup paths since the PR merge base

This addresses the final-head proof refresh requested in the latest ClawSweeper review.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 1, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 1, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

Maintainer decision on the remaining ClawSweeper item: accept the verify-only configured recovery flow.

This is intentional product behavior. Once a model is configured, the selected-model row owns Check model / Try again / Check again, and those actions call openclaw.setup.verify. We do not re-enter provider discovery/setup or add a second “change connection” surface from this state. Discovery remains available through the normal setup flow.

The E2E contract now proves:

  • the selected-model actions re-verify the configured route without issuing a new detect request;
  • same-client Gateway reconnect still performs one fresh detection and replaces stale visible model state;
  • the current labels and split provider/model rendering are asserted directly.

Visual proof remains representative of the final UI source: the commits after 46598b6966d9da82f45759a9ffcc63f3360d3a6b change tests only. The screenshots live on the proof-only branch so production history is not polluted with image binaries.

One unrelated CI failure is already present on main: checks-node-compact-small-4 fails in main run https://github.com/openclaw/openclaw/actions/runs/30691175229 with the same stale memory-core tooling expectation. The PR-local Model Setup failures are being corrected and re-run separately.

@vincentkoc

Copy link
Copy Markdown
Member Author

Final maintainer disposition after the exact-head ClawSweeper review:

  • Accept option 2, verification-only configured recovery. The removal of discovery refresh from this compact selected-model state is intentional product scope, not an accidental substitution.
  • All PR-specific UI checks are green on 53d5cf370ccc82befba3e679bf697b40588d0946, including checks-ui and all four checks-ui-e2e shards.
  • The remaining checks-node-compact-small-4 failure is identical on main run https://github.com/openclaw/openclaw/actions/runs/30691175229; ci-gate only reflects that known main failure.
  • Current origin/main has no changes in the touched Model Setup paths since this PR’s merge base.

Proceeding with a merge commit to preserve the three signed commits; no squash or rebase merge.

@vincentkoc
vincentkoc merged commit ea3b5df into main Aug 1, 2026
96 of 98 checks passed
@vincentkoc
vincentkoc deleted the improve-local-provider-recovery branch August 1, 2026 08:45
@vincentkoc

Copy link
Copy Markdown
Member Author

Landed on main as signed merge commit ea3b5df.

Direct landing was required because the repository rejected GitHub’s merge-commit method, and the maintainer explicitly required no squash. The landed commit has two parents: prior main (e1101d15b87d859f103d182aabf491f7ad59e6b9) and the PR head (53d5cf370ccc82befba3e679bf697b40588d0946), preserving the complete signed author commit series.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
Preserve the signed PR commit series. PR-specific UI checks passed; the remaining compact tooling failure matches current main.
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant