Repository navigation
refactor(ui): render migrated pages through the Solid outlet - #170571
Conversation
Keep page imports lazy and retain local state through route-loader updates. Replace the plugin page Lit task host and retire duplicate view helpers. Preserve the temporary Lit outlet adapter until the Solid shell lands.
# Conflicts: # ui/src/app/app-shell-view.tsx
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
There was a problem hiding this comment.
💡 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, {}), |
There was a problem hiding this comment.
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 👍 / 👎.
# Conflicts: # ui/src/types/solid-elements.d.ts
There was a problem hiding this comment.
💡 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, { |
There was a problem hiding this comment.
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 👍 / 👎.
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.
|
Merged via squash.
|
…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.
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
a13cee64d9910ce8b00f533e400c9b82f2c33dda67fd16b2c4146b16b840223aedmerged cleanly; UI patch ID unchanged; UI types passed; exact-headci:fullpassed (1171 s wall): all nine mocked UI E2E and both real-Gateway shardsci:full: all UI unit, Control UI E2E, browser-extension, and real-Gateway shardsLocal 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
a6a8754962217and headce8b00f533e40with 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
classNameprop, and two initial artwork lifecycle cases. The fixes move renderer props to an import-free leaf, useclass, 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 at5c69645a021e2. 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.
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
a6a8754962217to 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 IDeb3ee36d65173eb281a115e17bf3877e6ad89a3aunchanged and passes UI types.