Skip to content

fix(local-ai): model setup unavailable after install - #1254

Merged
shanselman merged 1 commit into
mainfrom
shanselman-local-ai-installed-setup
Aug 28, 2026
Merged

shanselman merged 1 commit into
mainfrom
shanselman-local-ai-installed-setup

Conversation

@shanselman

Copy link
Copy Markdown
Collaborator

Closes #1243

What Problem This Solves

Fixes an issue where users with an installed Local AI model could stop or restart it, but could not reopen model setup from the Local AI page.

Why This Change Was Made

Adds one localized Change model action for verified or loaded models. It reuses the existing full onboarding route, so setup remains the single configuration implementation and existing Local Gateway replacement confirmation stays in force. The action remains visible for installed models and is disabled while a Local AI runtime operation is active.

User Impact

Users can reopen Local AI model setup directly from the model card without searching through Settings. The page explains that replacing an existing Local Gateway still requires confirmation.

Evidence

Focused presentation tests cover verified, loaded, missing, unknown, and runtime-busy states. Current-head live UI diagnostics are recorded under Real Behavior Proof.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Validation

  • ./build.ps1: passed, all 5 projects built
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: passed, 3,819 passed, 32 skipped
  • dotnet test ./tests/OpenClaw.SetupEngine.Tests/OpenClaw.SetupEngine.Tests.csproj --no-restore: passed, 1,010 passed
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName~LocalAiPageViewModelTests|FullyQualifiedName~LocalizationValidationTests": passed, 21 passed
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --blame-hang --blame-hang-timeout 5m: blocked after 2,281 tests passed. The test host repeatedly hangs in the pre-existing BrowserProxyEndpointScopingTests.Diagnostics_NoOverride_TunnelWithoutBrowserProxyForward_DoesNotProbeTunnelLocalPlusTwo native listener inspection. The same test hangs when run alone. Crabbox was unavailable on this controller, so a remote full Tray run could not replace the blocked local run.
  • python .agents/skills/autoreview/scripts/autoreview --mode local --stream-engine-output: clean after accepting and fixing its runtime-busy concurrency finding

Real Behavior Proof

  • Environment tested: Windows 11, isolated OpenClaw Dev identity with synthetic one-byte installed-model receipt and isolated roaming/local data
  • PR head or commit tested: 7769ea95
  • Exact steps or command run: built with ./build.ps1 -DevBuild, launched with ./run-app-local.ps1 -NoBuild -Dev -DataDir <isolated> -AllowNonMain, opened openclaw-dev://hub/local-ai, closed the startup setup window, then invoked Change model
  • Evidence after fix: live WinUI accessibility diagnostics showed Downloaded and verified, model proof-model, the safety copy Replacing the existing Local Gateway still requires confirmation, and enabled button Change model with automation ID LocalAiChangeModel
  • Observed result: invoking LocalAiChangeModel created a new OpenClaw Setup (Dev) window at Security notice, Step 1 of 6, with an enabled Continue button. This proves the Local AI action uses the supported full setup route rather than a second configuration path.
  • Screenshot or artifact links verified? N/A. The background compositor returned a black capture, so copied live UI accessibility diagnostics are used instead.
  • Not verified or blocked: full Tray suite blocked by the unrelated native listener-inspection hang described above

Security Impact

  • New permissions or capabilities? No
  • Secrets or tokens handling changed? No
  • New or changed network calls? No
  • Command or tool execution surface changed? No
  • Data access scope changed? No
  • If any answer is Yes, explain the risk and mitigation: N/A

Compatibility and Migration

  • Backward compatible? Yes
  • Config or environment changes? No
  • Migration needed? No
  • If yes, list the exact upgrade steps: N/A

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

Rubber-duck review identified the initial wrong-route implementation and it was corrected to reuse ShowOnboarding. Autoreview identified the runtime-busy concurrency edge and it was corrected while preserving installed-state visibility. Final autoreview reported no accepted or actionable findings.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: needs maintainer proof decision A ClawSweeper-authored PR needs a maintainer proof capture or override decision. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 28, 2026, 3:35 AM ET / 07:35 UTC.

ClawSweeper review

What this changes

The branch adds a localized Change model action for installed Local AI models that opens the existing full onboarding setup flow.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this collaborator-authored PR open for normal maintainer handling. The reviewed patch is a narrow, correctly routed repair with direct current-head native UI proof and no introduced correctness or security defect found.

Priority: P3
Reviewed head: 7769ea95bbdabc916748b880d9aa1ec31a8444f6

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies exact isolated current-head Windows steps and copied after-fix accessibility diagnostics showing the active control, installed state, and resulting shared setup window.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies exact isolated current-head Windows steps and copied after-fix accessibility diagnostics showing the active control, installed state, and resulting shared setup window.
Evidence reviewed 5 items State-gated shared route: The introduced command is available only for verified or loaded models when idle, and dispatches the pre-existing onboarding command rather than creating another setup path.
Existing setup owner: The onboarding command opens the normal setup window at its standard entry point; the window manager also deduplicates an already-open setup window by bringing it forward.
Focused regression coverage: New tests cover verified and loaded models, absent and unknown models, runtime-busy disabling, the chosen onboarding route, and the accessible XAML wiring.
Findings None None.
Security None None.

Live Verification

Command: pwsh -NoProfile -ExecutionPolicy Bypass -File ./build.ps1

Result: FAIL (failed) — execution before step 1 expect_output: sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.24.0.tgz | [ERR_PNPM_NO_LOCKFILE] Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"

sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.24.0.tgz | [ERR_PNPM_NO_LOCKFILE] Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"

Assertions:

  • FAIL expect_output: All builds succeeded!

How this fits together

The tray app’s Local AI page projects installed-model and runtime state, then sends user actions to app-level commands. The new action routes an installed model back through the shared setup window, which retains gateway-replacement confirmation.

flowchart LR
A[Installed local model] --> B[Local AI status page]
B --> C{Model installed and idle}
C -->|Yes| D[Change model action]
C -->|No| E[Retry setup action]
D --> F[Shared onboarding window]
E --> F
F --> G[Replacement confirmation]
Loading

Before merge

  • Add real behavior proof - Sufficient (live_output): The PR body supplies exact isolated current-head Windows steps and copied after-fix accessibility diagnostics showing the active control, installed state, and resulting shared setup window.
  • Resolve merge risk (P1) - The contributor reports that the full Tray suite reached 2,281 tests before an unrelated native-listener inspection hang; focused Local AI and localization tests passed, while required CI remains in progress.
  • Complete next step (P2) - No repair lane is needed because the proposed patch has no actionable review finding; it remains for normal collaborator and CI review.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and regression coverage production +27, tests +185/-2 The implementation is small relative to focused coverage for installed, missing, unknown, and busy states.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the shared onboarding route as the single model-change implementation and merge after the required checks complete or the existing test-host hang is dispositioned.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the shared onboarding route as the single model-change implementation and merge after the required checks complete or the existing test-host hang is dispositioned.

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

Yes, source-reproducible: the base page offered Retry setup only for absent or unknown models, while an installed verified or loaded model had no model-setup action. The introduced state-gated action closes that exact gap.

Is this the best way to solve the issue?

Yes: reusing the existing onboarding route is the narrowest solution and preserves the setup window’s existing singleton behavior and replacement confirmation.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a localized Local AI page discoverability repair with limited blast radius.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies exact isolated current-head Windows steps and copied after-fix accessibility diagnostics showing the active control, installed state, and resulting shared setup window.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: needs maintainer proof decision: A ClawSweeper-authored PR needs a maintainer proof capture or override decision. Sufficient (live_output): The PR body supplies exact isolated current-head Windows steps and copied after-fix accessibility diagnostics showing the active control, installed state, and resulting shared setup window.

Label justifications:

  • P3: This is a localized Local AI page discoverability repair with limited blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: needs maintainer proof decision: A ClawSweeper-authored PR needs a maintainer proof capture or override decision. Sufficient (live_output): The PR body supplies exact isolated current-head Windows steps and copied after-fix accessibility diagnostics showing the active control, installed state, and resulting shared setup window.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies exact isolated current-head Windows steps and copied after-fix accessibility diagnostics showing the active control, installed state, and resulting shared setup window.

Evidence

What I checked:

Likely related people:

  • Joel: Introduced the managed Local AI feature, including the original page and retry setup action, in the current feature history. (role: introduced the Local AI feature; confidence: high; commits: ccd64bbb7d68; files: src/OpenClaw.Tray.WinUI/Presentation/LocalAiPageViewModel.cs, src/OpenClaw.Tray.WinUI/Pages/LocalAiPage.xaml)
  • Barbara Kudiess: Introduced the WindowManager-owned onboarding route that this patch deliberately reuses. (role: introduced the shared setup-window owner; confidence: high; commits: 3a097bc85f7b; files: src/OpenClaw.Tray.WinUI/Services/WindowManager.cs)

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.

@shanselman
shanselman merged commit a14dc72 into main Aug 28, 2026
24 checks passed
@shanselman
shanselman deleted the shanselman-local-ai-installed-setup branch August 28, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: needs maintainer proof decision A ClawSweeper-authored PR needs a maintainer proof capture or override decision.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change Local AI setup after installed

1 participant