Skip to content

refactor(ui): render migrated pages through the Solid outlet - #170571

Merged
steipete merged 26 commits into
mainfrom
solid2/w-routes
Oct 13, 2026
Merged

steipete merged 26 commits into
mainfrom
solid2/w-routes

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Completes the page-host and route migration for 27 routes whose content now uses Solid, on top of the landed Solid shell.

User Impact

Lazy pages retain their paths, host tags, selectors, and loading boundaries. Focused drafts survive loader refreshes and retryable errors; navigation retires the page and joins MCP teardown. No user action is required.

Why This Change Was Made

The 24 existing lazy route modules now supply native Solid renderers. The outlet preserves renderer identity while supplying live loader and presentation props, with inline errors in a separate rendering region. Replaced Lit page classes and temporary outlet/pairing adapters are removed. Domain state and cancellation stay in plain TypeScript owners.

Native routes inherit the shell layout owner, including while the shell is assembled detached. Containment identifies the owner without timing workarounds. Native hub headers share the existing tab focus owner, and pairing remains lazy.

Retained Lit seams have current callers: sidebar/avatar/roster rendering, the chat skill reader, the shared wizard template contract, and structured plugin settings. These can be removed with their remaining callers.

Evidence

Check Result
Native outlet, retained Chat, MCP teardown, Cron cold load 25 tests passed; 64.39 s
Routes/navigation and shell pairing 55 tests passed; 55.23 s
Plugin routing/settings and sessions consumers 62 tests passed; 55.03 s
Shell layout, detached mounting, pairing access, outlet lifecycle 32 tests passed; 36.24 s
Pairing after main test-file rename 9 tests passed; 47.79 s Vitest / 111.22 s wrapper
Main plugin owner integration 7 consent/image tests (29.66 s), 12 catalog browser tests (5.12 s), UI types passed
Final native artwork and outlet regressions 7 unchanged artwork tests passed (21.10 s wrapper), outlet passed (12.39 s wrapper); UI types passed
Failed architecture/lint checks after repair Madge: zero cycles; targeted oxlint passed
Native tab selection and reorder 1 test passed; 10.96 s
WebKit tab styling, focus transfer, closed-shadow moves 4 tests passed; 6.64 s
Final pairing lifecycle 2 browser tests passed; 206.20 s
Final route captures 28 browser tests passed; 154.31 s
Independent review Clean through P2, including detached layout, the route leaf contract, and final native artwork lifecycle
Previous integrated UI typecheck/build Passed; prior app-test typecheck also passed
Previous integrated head a13cee64d9910 UI typecheck passed; exact-head CI passed, including both real-Gateway shards
CI regression cases Logs teardown: 1 passed (84.86 s wrapper); sidebar overflow: 1 passed (71.91 s); plugin enablement/reconnect: 2 passed (144.31 s)
Previous refreshed head ce8b00f533e40 Main merged for persistent UNKNOWN admission; UI code patch ID unchanged; UI types/build/performance passed; exact-head CI completed with three inherited mocked-chat shards and one attributable Automations catalog failure
Automations cache-order regression New case failed before repair; all 31 lifecycle tests passed after repair (191.55 s wrapper); UI types and P2 autoreview passed; regression moved verbatim to a separate file for max-lines lint and passed there (90.77 s wrapper); targeted lint, formatting and diff checks passed
Previous repaired head 0c9b82f2c33dd UI types, 31 lifecycle cases, moved regression, targeted lint/format and P2 review passed; full CI: all test assertions passed, but the last real-Gateway job was cancelled after its 17-file passing summary
Final refresh same-runner startup comparison Both builds and strict check passed: JS 343,377 B gzip, CSS 49,246 B gzip / 1 request; chat/new JS requests unchanged at 31/28
Interrupted-CI refresh a67fd16b2c4146 Main b16b840223aed merged cleanly; UI patch ID unchanged; UI types passed; exact-head ci:full passed (1171 s wall): all nine mocked UI E2E and both real-Gateway shards
PR CI ci:full: all UI unit, Control UI E2E, browser-extension, and real-Gateway shards

Local browser evidence above predates the lighter proof instruction; only the four failed CI cases were subsequently replayed locally; no E2E battery or parity run was repeated. The initial Testbox attempt queued and its lease was stopped; no lease remains.

The pre-repair same-machine comparison built incorporated main a6a8754962217 and head ce8b00f533e40 with one installed toolchain and identical fixed build metadata (pnpm ui:check-performance:base <base>). Both builds and strict checks passed. Its startup JavaScript is 343,442 B gzip and startup CSS is 49,153 B gzip / 1 request, below the restored 374,285 B / 1 CSS request budget. Chat/new boot JS request counts remain 31/28 on both sides; total route-boot gzip grows 399/438 B respectively. The existing advisory CSS warning remains, with 2,047 B of hard-ceiling headroom. No dependency was added or independently upgraded.

Physical lines across changed UI source paths and the coupled Vitest config against incorporated main b16b840223aed: production/config source 13,414 → 13,464 (+50); tests/support 4,373 → 4,931 (+558). The small production increase preserves native route/error/layout lifecycle, reconciles late tile insertion, and observes catalog-owner invalidation after removing the Lit adapters.

CI found three attributable failures on the initial integrated head: a type cycle through the route registry, the deprecated artwork className prop, and two initial artwork lifecycle cases. The fixes move renderer props to an import-free leaf, use class, and remove the plugin page bridge. One scoped DOM observer reconciles tile insertion alongside state changes; the existing owner deduplicates requests and retires resources. The unchanged artwork cases failed before and passed on main and after the repair.

The subsequent full CI run exposed four fixture/lifecycle cases. Logs now leaves through the application router before asserting polling stops. Sidebar geometry waits for the existing frame-published scroll mask; every geometry assertion remains. The plugin fixtures supply typed inspection responses for Local Calendar and Matrix, which previously fell through to an invalid empty object. Logs and both plugin failures reproduced before repair; all four cases pass after repair. These changes touch tests only and passed independent P2 review.

That run also hit main’s incomplete disposable preflight-reader test migration at base ba1dd61a4e250. Upstream fixed it in #170619, now incorporated by merging main at 5c69645a021e2. The only merge conflict retained this lane’s two JSX host declarations alongside main’s Lobster pet declaration.

Visual comparison

Synthetic data only, inspected before upload. The 27 desktop-light route scenes include browser fallback states for Terminal and native device settings. Twenty-five match exactly. Models and its setup background have a consistent 4 px vertical section shift; controls, labels, grouping, and route behavior are intact. This small difference is accepted without compensating CSS. All 14 mobile/desktop pairing lifecycle captures match exactly.

The before/after route sheets and pairing sheets follow.

Routes before migration, sheet 1

Routes after migration, sheet 1

Routes before migration, sheet 2

Routes after migration, sheet 2

Routes before migration, sheet 3

Routes after migration, sheet 3

Pairing before migration

Pairing after migration

The native credit-preview ambiguity was resolved using the supported explicit squash message; source credit remains validated by the native owner. Admission then refused because GitHub reported mergeability and merge state UNKNOWN after three observations. A local merge-tree check found no source conflict. This refresh merges main at a6a8754962217 to trigger a new calculation and include relevant mainline inputs. UI TS/TSX/CSS stable patch IDs are identical before and after the refresh. No merge intent or auto request exists on the previous head.

The refreshed full CI run exposed an Automations model-warning ordering defect: a native page can receive the raw Gateway event before the shell invalidates the shared catalog cache. The page then adopts the old ready result and misses the acquisition warning. The repair observes the existing catalog owner’s invalidation notification, matches the current selected-agent scope, and retires its subscription on connection reset or disposal. A focused lifecycle regression reproduced the missing warning before the repair; all 31 cases in that changed file pass afterward. Local replay of the real-Gateway case was refused before test execution by the managed-artifact fence; no container or guard bypass was attempted. Current full CI confirms the original real-Gateway case.

The mocked-chat failures on run 38361587305 match scheduled main run 38359584345 by test name and error: collapsed reply reveal (screenshot timeout), Subagents Details (dialog timeout), dark/light position rail (test timeout), and reply-preview recovery (click timeout). These are recorded as inherited, independently of the attributable Automations failure.

Run 38368169661 proved the Automations acquisition-warning regression through the real Gateway in 16.688 s. All nine mocked UI E2E shards passed; all 17 files in the last real-Gateway shard passed before its 20-minute job budget cancelled the step during finalization. The run is retained as interrupted evidence, never called green. The prescribed recovery merges current main and pushes fresh evidence; no gh run rerun, local container, or gate bypass was used. The main refresh keeps the UI patch ID eb3ee36d65173eb281a115e17bf3877e6ad89a3a unchanged and passes UI types.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 13, 2026
@clawsweeper

clawsweeper Bot commented Oct 13, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T09:06:33.477369Z a67fd16 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

# Conflicts:
#	ui/src/pages/devices/view-pairing.test.tsx
# Conflicts:
#	ui/src/pages/plugins/catalog-results.browser.test.tsx
#	ui/src/pages/plugins/consent-dialog.test.tsx
#	ui/src/pages/plugins/consent-dialog.tsx
#	ui/src/pages/plugins/settings-view.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70d7114fd4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

import("./connection-page.tsx").then((module) => ({
header: true,
render: () => html`<openclaw-connection-page></openclaw-connection-page>`,
renderSolid: () => createComponent(module.ConnectionPage, {}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Start connection diagnostics after attaching the host

When an already-connected user navigates to Connection, this native route invokes the bridge renderer before its returned custom element is inserted into the document. ConnectionContent immediately handles the initial Gateway snapshot, but ConnectionDraft.syncDiagnosticsPolling() exits because host.isConnected is still false (connection-page.tsx:64-66,128-137), and insertion itself triggers no subsequent synchronization. Consequently, ping and system-info diagnostics remain empty until an unrelated focus, visibility, or Gateway event occurs; defer the initial synchronization until the host is attached, as the Cron route does.

Useful? React with 👍 / 👎.

@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Oct 13, 2026
@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Oct 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a13cee64d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return Boolean(props.data);
},
children: () => {
return createComponent(module.SkillsPage, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Defer Skills autofocus until the route host is attached

On a cold navigation to the Skills discovery route, this native renderer constructs SkillsPage before its bridge host is inserted into the outlet. The separate lifecycle in discovery-view.tsx:107-110 checks input.isConnected once during onSettled and exits while detached, with no later retry, so the intended input.focus({ preventScroll: true }) never runs and focus remains on the previous control or body in browsers that do not reapply dynamic autofocus. Schedule that focus after attachment, as the Cron migration does.

AGENTS.md reference: ui/AGENTS.md:L7-L7

Useful? React with 👍 / 👎.

@openclaw-barnacle openclaw-barnacle Bot removed gateway Gateway runtime agents Agent runtime and tooling labels Oct 13, 2026
Observe the catalog owner after it invalidates cached models, so native route subscription order cannot hide acquisition warnings. Retire the subscription with its connection. Add the reproduced page-before-shell regression in a focused test file.
@steipete
steipete merged commit 98a7b4a into main Oct 13, 2026
106 of 108 checks passed
@steipete
steipete deleted the solid2/w-routes branch October 13, 2026 10:05
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…w#170571)

Move 27 routes and their page hosts onto the native Solid outlet while preserving route paths, host tags, selectors, and lazy loading. Retain the page owner across loader updates and recoverable errors so drafts and focus survive; retire it through navigation and join MCP teardown. Remove replaced Lit classes and temporary adapters, retaining bridges only for remaining Lit callers.

Keep domain state in the existing plain TypeScript owners. Reconcile plugin artwork after native child insertion, and update the E2E fixtures to use route-owned teardown, frame-published scroll state, and valid plugin inspection responses.

Make Automations consume catalog-owner invalidation so native subscriber ordering cannot hide model acquisition failures. The regression reproduced before repair and passed after it.

Validation: exact-head ci:full run 38373075175 passed on a67fd16, including all nine mocked UI E2E and both real-Gateway shards. UI types, focused regressions, targeted lint/format, and isolated P2 review passed. Inspected synthetic before/after screenshots are embedded in the PR. Both same-runner builds and strict performance passed with 343,377 B startup JS gzip and one startup CSS request.
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 ci:full Keep ordinary native-locale CI selection on the next PR run. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant