Skip to content

feat: start fresh Tauri installs with a local Gateway - #169512

Merged
steipete merged 6 commits into
mainfrom
steipete/tauri-zero-config-first-run
Oct 12, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/tauri-zero-config-first-run

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fresh Tauri installs require manual local-Gateway setup before users can reach their assistant, and the shared setup card needs working native actions in Tauri.

User Impact

Fresh Linux and Windows installs now prepare a local Gateway automatically and open custodian onboarding. Existing configurations and saved Gateways keep their startup behavior; nearby Gateways are never joined automatically. A setup failure returns to the manual local/remote choices with its error visible.

The shared card identifies the local Gateway as This computer and saved remote Gateways by name. Use a different Gateway, Review permissions, and Open AI setup use the existing native owners. Stale or out-of-base documents cannot perform those actions; failures appear in the native dashboard notice.

Why This Change Was Made

Automatic startup reuses the explicit-local installer, bundled runtime, and CLI service owners, including the landed Windows implementation. Tauri installs window.__OPENCLAW_NATIVE_SETUP__ before the Control UI boots; it adapts the existing device-settings transport rather than adding a second bridge or selection store. The shared card from #169568 is integrated. Gateway inference selection remains dependent on #169628; the native proof supplies a synthetic setup result.

The Linux switching fixture now opens menus through the native lifecycle and refreshes an item only after libdbusmenu explicitly rejects its stale ID before dispatch. It does not skip the fixture or retry an accepted click.

Release-note context: fresh Tauri desktop installs automatically prepare a local Gateway and enter custodian onboarding, with visible manual recovery and working shared-card native actions.

Evidence

  • Rust: cargo test --locked --all-targets — 328 passed on macOS (cold build plus suites 473.58 s, main suite 23.46 s, power suite 0.36 s). CI also runs Windows Rust runtime/installer/first-run boundaries.
  • Startup UI: node scripts/run-vitest.mjs test/linux-dashboard-recovery.test.ts --maxWorkers=1 — 20 passed, including Windows; 42.66 s wrapper wall time, 4.64 s Vitest duration.
  • Native JavaScript boundaries: 17 passed, 0.45 s wall time. Python native fixtures: 12 passed, 1.12 s wall time. The stale-menu-ID regression fails on the previous helper and passes after the repair.
  • The production setup card and automatic-setup owner build and pass a Chromium boundary smoke: 10.01 s build, 4.36 s smoke. All three native actions are exercised with a synthetic host capability.
  • Passed max-lines, line-cap, assertion-safety, database-worker/dialect, timeout-race, mock-export, config-docs, plugin-inventory, protocol, native-schema, focused lint, scripts lint, and workflow checks.
  • Exact-head Linux App proof: Linux and macOS passed. The real Linux Tauri app launched directly into the production card, with the capability installed before UI boot; all three card actions, reloads, and rejection outside the Gateway base passed. Windows runtime/installer/first-run Rust tests and its installer build passed. The Linux switching plus onboarding step took 81 s, Linux Rust 185 s, macOS Rust 143 s, and Windows runtime/desktop tests 27 s.
  • Independent Codex autoreview: scoped-clean, no actionable P0–P2 findings on efbf523281a6dc3c00866f4dd3e5064d325d76e8.

The native Linux scenario uses the real Tauri app, bundled Bun launcher, WebKit, and production setup card with a synthetic installer, CLI/service, and provider result. It proves the native boundary, not real service installation or provider activation. No real Windows desktop session is claimed. Latest-stable packaged upgrade preservation is not exercised here; existing configuration, saved profiles, and runtime preservation are covered by the owner tests and native Gateway switching proof, with any additional packaged-upgrade proof left to the lead.

Diff size relative to the integrated main base: production +178 / −11, tests and test support +623 / −133 (including inline Rust tests), docs +65 / −18, CI +1 / −0.

The native locale check reports eight missing native.apple.* translations in unchanged main-owned locale artifacts. This lane does not change Apple source or locale files.

Before: manual setup opens Model Setup (synthetic native fixture from the previous baseline).

Before: manual Tauri setup opens Model Setup

After: a fresh Linux Tauri launch reaches the shared setup card without setup clicks. Both captures below show the real native app with synthetic provider data.

After: automatic Tauri first run opens the shared card

Unavailable provider: the shared card exposes native AI setup

Native proof command (run by the normal Linux App workflow):

xvfb-run -a -s '-screen 0 1440x1080x24' dbus-run-session -- \
  /usr/bin/python3 apps/linux/tests/first_run.py \
  apps/linux/src-tauri/target/debug/openclaw-desktop --gateway-onboarding \
  --artifacts-dir "$RUNNER_TEMP/linux-gateway-switch/onboarding"

The PR is ready, and exact-head main CI including openclaw/ci-gate passed. ClawSweeper reports no code findings on this head; its proof-only hold predates the attached native results. One re-review was requested, and no refreshed review arrived within the 15-minute wait. Latest-stable packaged-upgrade proof remains unrun and is left to the lead's merge decision. No merge requested; the lead owns landing.

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: linux plugin: linux-node size: M labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR automatically prepares a local Gateway for fresh Linux and Windows Tauri installs and connects the shared setup card to native desktop actions.

Example: Launch the Linux Tauri app with no openclaw.json and no saved Gateway profiles.

  • Before: The user chooses a local Gateway and installs it manually before reaching Model Setup.
  • After: The app prepares the local Gateway and opens custodian onboarding, returning to visible local and remote choices if setup fails.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and has no actionable finding; native boundary evidence is useful, but packaged stable-upgrade compatibility is not established.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected native captures and the successful exact-head workflow support automatic Linux navigation and setup-card actions through real Tauri/WebKit with synthetic installer, service, and provider results, without claiming real Windows desktop installation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Fresh desktop users must perform local Gateway setup before reaching their assistant, and the shared setup card needs working Tauri actions.
Reason: The maintainer-approved change removes first-run setup clicks while preserving existing configuration, remote choices, explicit manual model setup, and visible failure recovery.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it provides distinct, maintainer-approved desktop onboarding work, and review found no actionable code defect.

Priority: P2
Reviewed head: efbf523281a6dc3c00866f4dd3e5064d325d76e8

Before merge

  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Show a packaged upgrade from v2026.10.2 preserving saved local and remote configuration, Gateway profiles, and runtime selection.
Agent review details

How this fits together

The Tauri startup owner reads existing configuration and saved profiles, delegates provisioning to the existing installer and CLI service owners, and opens the Gateway-served Control UI; setup-card callbacks use the existing authenticated native settings transport.

flowchart TD
  A[Tauri launch] --> B[Config and saved profiles]
  B --> C[Existing connection owner]
  B --> D[Fresh local setup]
  D --> E[Installer and CLI service]
  E --> F[Custodian setup card]
  F --> G[Authorized native settings]
  D --> H[Manual recovery choices]
Loading

Technical review

Best possible solution:

Land the existing-owner implementation after validating stable-upgrade preservation, with inference selection remaining in its separate Gateway-owned change.

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

This is an intentional feature change; fetched-main source confirms that fresh startup currently returns manual setup rather than invoking the new provisioning wrapper.

Is this the best way to solve the issue?

The implementation fits the existing ownership model: it reuses local setup and canonical CLI service operations, preserves configured installs, and adapts the existing native settings bridge.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Fresh startup and bundled-runtime consent changes intended behavior with a stated reason (d9ccc49: The bundled-runtime change kept startup and upgrades observational to preserve existing operator-selected runtimes; this PR deliberately adds provisioning only for absent config and profiles.)
  • Manual Model Setup routing changes intended behavior with a stated reason (e70faf7: Manual setup required explicit provider choice and retained recoverable activation; this PR preserves that path and introduces a separate automatic first-run route.)
  • Saved connection and native document ownership keeps the original intent (0fcaa5c: Saved remote recovery and committed presentation must not implicitly start a local Gateway or replace healthy sessions; the fresh-install guard preserves those paths.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ce5c1cb adds apps/linux/src-tauri/src/native_browser_bridge.rs:137 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ce5c1cb1b1d3; files: apps/linux/src-tauri/src/native_browser_bridge.rs)
  • Vincent Koc: Raw commit 0fcaa5c adds apps/linux/src-tauri/src/main.rs:688 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0fcaa5c27a73; files: apps/linux/src-tauri/src/main.rs)

PR surface

Source +305, Tests +352, Docs +47, Config +1. Total +705 across 22 files. Added test files: 4.

View PR surface stats
Area Files Added Removed Net
Source 9 323 18 +305
Tests 10 478 126 +352
Docs 2 65 18 +47
Config 1 1 0 +1
Generated 0 0 0 0
Other 0 0 0 0
Total 22 867 162 +705

Review metrics

Metric Value Why it matters
Native setup contract 1 added request type with 3 fixed destinations The existing device-settings transport gains Gateway management, permissions, and AI setup requests without another credential or selection store.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Label justifications:

  • P2: This is a bounded desktop onboarding improvement with retained manual setup and recovery.
  • merge-risk: 🚨 compatibility: Fresh startup changes from manual setup to automatic local provisioning; the direction is maintainer-approved, while preservation of existing configurations, profiles, and runtime choices across stable upgrade remains unverified.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Demonstrate the v2026.10.2 packaged upgrade with existing configuration, profiles, and runtime selection intact.

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.

History

Review history (5 earlier review cycles)
  • reviewed 2026-10-12T01:47:51.199Z sha 565da4c :: blocked before merge. :: [P2] Update the startup boundary guard for automatic first run
  • reviewed 2026-10-12T02:18:13.330Z sha 6c5d8e9 :: blocked before merge. :: none
  • reviewed 2026-10-12T02:42:54.451Z sha af2ced2 :: blocked before merge. :: none
  • reviewed 2026-10-12T03:08:39.791Z sha af2ced2 :: blocked before merge. :: none
  • reviewed 2026-10-12T21:13:32.847Z sha efbf523 :: blocked before merge. :: none

Reviewed October 12, 2026, 5:56 PM ET / 21:56 UTC (Revision 6).

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 12, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 12, 2026
@steipete
steipete marked this pull request as ready for review October 12, 2026 21:16
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 12, 2026
@steipete
steipete merged commit 3036e13 into main Oct 12, 2026
198 checks passed
@steipete
steipete deleted the steipete/tauri-zero-config-first-run branch October 12, 2026 22:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 12, 2026
## What Problem This Solves

Knip treats three live files as unused because two documented executable roots are absent from its entry manifest. The Control UI cold-load benchmark added in #170033 (`5559404e2da9`) statically imports its probe helper. The Linux onboarding Vite configuration added in #169512 (`3036e1376019`) builds the card consumed by the Python onboarding fixture.

## Why This Change Was Made

Register each executable in the existing `repositoryScriptEntries` list. The benchmark import makes its probe helper reachable automatically. This adds no ignore rule or separate helper entry, and preserves the normal dependency and export checks.

## User Impact

Restores Knip's account of documented maintainer commands. Application behavior, benchmark behavior, and onboarding behavior are unchanged. Scope: one configuration file, four added lines; one focused commit per missing root.

## Evidence

- [Run 38315479055, job 115031514632](https://github.com/openclaw/openclaw/actions/runs/38315479055/job/115031514632) passed production unused-file checks and reported the benchmark and its probe helper in the full-tree scan.
- [Scheduled main run 38317311743, job 115037166371](https://github.com/openclaw/openclaw/actions/runs/38317311743/job/115037166371) failed the production scan on `apps/linux/tests/fixtures/vite.onboarding.config.ts`. The subsequent full-tree scan did not run.
- Source verification follows the commands in `scripts/bench-control-ui-cold-load.md` and `apps/linux/README.md`, the benchmark's static probe import, and the card requirement in `apps/linux/tests/gateway_switch.py`.

Formatting, basic oxlint, and whitespace checks passed for both additions. Each entry passed one isolated Codex review with no actionable P0–P2 findings (two reviews total). The exact-head release-gate run [38318772519](https://github.com/openclaw/openclaw/actions/runs/38318772519) checked out candidate `3bd92c43d6419637c5ac2c21c76c5ebef9c7aa50` and passed Knip and topology. All applicable types, lint, source contracts, baseline ratchets, guards and topology checks passed. The extra release-gate extension-package and SDK-report jobs remain pending; this manifest-only change touches no SDK, runtime API, or plugin implementation. They are not claimed as passed and are outside this repair scope. These manifest-only changes require no browser or runtime benchmark execution, SQL measurements, SDK diff, or update cell.

The dependency job ran `pnpm deadcode:full`: production/all-export checks passed; both production/full-tree unused-file scans reported zero entries; script/production/full-tree unused-export scans each reported zero entries. The topology job reported zero runtime import cycles, zero Madge cycles, and passing Kysely guardrails. Ordinary PR CI was also green (31 successful, 28 skipped), but it intentionally omitted dependencies; the separate exact-head run supplies the actual Knip evidence.

Prelanding source comparison against main `a55e956fe3613a5ae3962903accf75c1a7464ee7` confirms the Knip configuration preimage remains unchanged. Direct-main publication previously hit repository protection, so the emergency repair uses the authorized exact-head PR squash fallback.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
* feat: start fresh Tauri installs with a local Gateway

* test: align Tauri startup proof with automatic local setup

* test: rely on native proof for automatic Tauri startup

* feat: connect Tauri first run to shared native setup card

* test: align native setup card fixture with lint rules
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…aw#170347)

## What Problem This Solves

Knip treats three live files as unused because two documented executable roots are absent from its entry manifest. The Control UI cold-load benchmark added in openclaw#170033 (`e35494d3fdfc`) statically imports its probe helper. The Linux onboarding Vite configuration added in openclaw#169512 (`ab19c2279b78`) builds the card consumed by the Python onboarding fixture.

## Why This Change Was Made

Register each executable in the existing `repositoryScriptEntries` list. The benchmark import makes its probe helper reachable automatically. This adds no ignore rule or separate helper entry, and preserves the normal dependency and export checks.

## User Impact

Restores Knip's account of documented maintainer commands. Application behavior, benchmark behavior, and onboarding behavior are unchanged. Scope: one configuration file, four added lines; one focused commit per missing root.

## Evidence

- [Run 38315479055, job 115031514632](https://github.com/openclaw/openclaw/actions/runs/38315479055/job/115031514632) passed production unused-file checks and reported the benchmark and its probe helper in the full-tree scan.
- [Scheduled main run 38317311743, job 115037166371](https://github.com/openclaw/openclaw/actions/runs/38317311743/job/115037166371) failed the production scan on `apps/linux/tests/fixtures/vite.onboarding.config.ts`. The subsequent full-tree scan did not run.
- Source verification follows the commands in `scripts/bench-control-ui-cold-load.md` and `apps/linux/README.md`, the benchmark's static probe import, and the card requirement in `apps/linux/tests/gateway_switch.py`.

Formatting, basic oxlint, and whitespace checks passed for both additions. Each entry passed one isolated Codex review with no actionable P0–P2 findings (two reviews total). The exact-head release-gate run [38318772519](https://github.com/openclaw/openclaw/actions/runs/38318772519) checked out candidate `3bd92c43d6419637c5ac2c21c76c5ebef9c7aa50` and passed Knip and topology. All applicable types, lint, source contracts, baseline ratchets, guards and topology checks passed. The extra release-gate extension-package and SDK-report jobs remain pending; this manifest-only change touches no SDK, runtime API, or plugin implementation. They are not claimed as passed and are outside this repair scope. These manifest-only changes require no browser or runtime benchmark execution, SQL measurements, SDK diff, or update cell.

The dependency job ran `pnpm deadcode:full`: production/all-export checks passed; both production/full-tree unused-file scans reported zero entries; script/production/full-tree unused-export scans each reported zero entries. The topology job reported zero runtime import cycles, zero Madge cycles, and passing Kysely guardrails. Ordinary PR CI was also green (31 successful, 28 skipped), but it intentionally omitted dependencies; the separate exact-head run supplies the actual Knip evidence.

Prelanding source comparison against main `7830520c6e458cdabc91dfcde917b7bbdf617e35` confirms the Knip configuration preimage remains unchanged. Direct-main publication previously hit repository protection, so the emergency repair uses the authorized exact-head PR squash fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: linux docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: linux-node proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant