Skip to content

refactor(ui): port portable Lit consumers to Solid - #169725

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

steipete merged 13 commits into
mainfrom
solid2/w-portable

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Finishes portable Lit renderers whose consumers have moved to Solid, removing superseded helpers while preserving host tags, CSS classes, selectors, routes, and lazy boundaries.

User Impact

Terminal chrome, portable cards, and four board widgets render in Solid. Terminal engines retain their DOM island; plain TypeScript controllers retain ownership of sessions, refresh, errors, retry, and connection state. Reader styles become CSS, and opaque plugin templates retain their existing interop boundary.

Implementation

Portaled cards own their Solid root independently of temporary caller scopes. Focus restoration runs after Solid settles and leaves newer focus untouched. Terminal headers explicitly clean up listeners when their DOM moves. The integration retains main's transient-container resolver and Solid owner fallback. The native terminal viewport no longer needs main's Web Awesome tab-panel registration. After the shell cutover landed, the sole browser-document type conflict was resolved by retaining the Solid props alias; the removed Lit template adapter stays removed, and the shell's HTMLElement escape link remains supported. No dependency, configuration, protocol, or SDK change is introduced by this PR.

A CI-discovered sidebar fixture race is also repaired: the pages catalog stays unavailable throughout its negative snapshot check, while normal roster responses remain available. The full file failed before the correction and passes afterward; all behavior and snapshot assertions remain unchanged.

Production LOC across changed paths: 8,112 → 8,336 (+224). Tests/support: 3,432 → 3,501 (+69). Tooling: 2,211 → 2,211. Remaining growth is expanded JSX and explicit terminal-header DOM custody/cleanup; domain ownership stays unchanged.

Evidence

Head: 8922cbfdc7a7c235cec4ac065fab9bcf69b66e8c. Integrated main: ba8025d18e970b340db4628b18fab605e69a7a2b.

Proof Result
Focused migration proof 89 touched-directory/sibling files passed (1,642 s wall); affected integration rechecks passed 69 cases in 10 files (349.14 s).
Focus and portal regression proof 148 sidebar, 10 portal lifecycle, and 11 person-reference E2E cases passed before the latest main integration.
Sidebar fixture correction Full two-case file passed after correction, 289.58 s wall; independent P0–P2 review clean.
Previous integration tests Portal 8/8, terminal accessibility 7/7, hosted tabs 9/9 passed. Vitest shard walls: 103.62 s, 60.26 s, 32.65 s.
Shell integration tests All 11 Solid-content ownership cases passed (97.09 s command wall); the focused browser stale-chunk recovery E2E case passed (204.71 s command wall, 20 unrelated cases skipped).
Latest local checks UI types, formatting, build, and strict performance passed; planner-selected scoped lint passed.
Browser behavior Terminal docking/embedded/upload, report, all 11 progress-widget cases, all 7 Systems cases, and people-card hover/focus passed in focused proof.
Visual proof Initial migration: three Activity/Systems/reader-tabs scenes pixel-identical; eight inspected synthetic before/after images below.
Startup performance Same Mac and Node 26: 342,315 → 342,397 B gzip (+82 B), 1 CSS request each. Both builds and strict gates pass, below the 450,000 B transition budget. Base/head build walls: 119.40/108.60 s.
Independent review Fresh full integrated diff scoped-clean through P2; no actionable findings.
Full CI ci:full retained for all UI unit, E2E, extension, and real-Gateway shards. Run 38330809273 completed on 8922cbf: 55 successful jobs, 22 skipped, one inherited failed root plus the aggregate gate. Both real-Gateway shards passed. Run wall: 841 s; total job time: 14,456 s. Failed checks remain red; exact attribution below supports the native inherited-failure route.

Current CI failure attribution

The actual CI checkout was e46790bcafa19fa348578359259ed99a1dac90b5, with ordered parents main 648d4ab8f31534629ebb3d096567a53541b3500a and PR 8922cbfdc7a7c235cec4ac065fab9bcf69b66e8c. UI E2E 2/9 is the only failed root job. Both cases match previous scheduled main run 38331230273, job 115081406328, by exact name and assertion:

  • Control UI new-session page mocked Gateway E2E > keeps cloud startup visible through failure (false, disconnect: true, replacement: false, cold scope: false)
  • Control UI new-session page mocked Gateway E2E > keeps cloud startup visible through failure (false, disconnect: true, replacement: true, cold scope: false)

Both runs receive null where the stale test expects the composer notice to contain “1 in this conversation’s outbox.” at line 281. The latest scheduled main run 38334375513, job 115091146653, now passes this shard: main commit 5e1752da6a78e corrected the expectation after the duplicate offline composer band was deliberately removed.

To establish inheritance against the actual CI inputs, the same two cases were run on exact main parent 648d4ab8 in an independent checkout with its own frozen install: 2 failed identically, 6 unrelated skipped; 294.02 s command wall, Node 24.21.0. Command: pnpm test:ui:e2e ui/src/e2e/new-session-page.cloud-startup-failure.e2e.test.ts --maxWorkers=1 -t 'keeps cloud startup visible through failure \(false, disconnect: true'. All five owning test/page source blob or tree objects match between that main parent and the tested merge. The earlier differently failing scheduled run is not used for current attribution. No product, security, or enforced-review failure is waived.

Historical CI failure attribution (prior head fb4de93)

Run 38323759808 completed with 52 successful jobs, 22 skipped, and three inherited root failures plus the aggregate gate. Two native attempts stopped before dispatch as main advanced, followed by a real browser-document conflict from the shell cutover. That conflict is now resolved and proved on the new head; none of these failed prior checks is relabeled green.

The CI checkout was 8f250dc9b2e69dec5fafaed45db31fce8216b389, with ordered parents main e4f463159d0ae54c4858bf2ab22ba79600fe23cb and PR fb4de93af62c557893831a98f1fef4813fef8a2e. Run wall time: 766 s; total job time: 13,534 s.

All three failed cloud-startup cases match scheduled main run 38322669274, job 115054341573, by exact name and assertion:

  • Control UI new-session page mocked Gateway E2E > keeps cloud startup visible through failure (false, disconnect: true, replacement: false, cold scope: false)
  • Control UI new-session page mocked Gateway E2E > keeps cloud startup visible through failure (false, disconnect: true, replacement: true, cold scope: false)
  • Control UI new-session page mocked Gateway E2E > keeps cloud startup visible through failure (false, disconnect: false, replacement: false, cold scope: true)

The disconnect cases receive “1 in this conversation’s outbox.” instead of “The initial message is unresolved.” The cold-scope case receives null instead of the recovery notice.

Control UI mocked Gateway E2E > keeps every sidebar session stable while selecting sessions and supports sort modes passed in that scheduled run but fails identically on the exact CI main parent: active font weight 600 versus inactive 500 at line 789 (172.53 s command wall). Main commit 01b7ffe0841bd changed active labels to 600 after the scheduled baseline; the old equality assertion remains. The same case passes on this PR branch (176.61 s Vitest). Two preliminary baseline attempts stopped during dependency setup; the attributed run uses its own frozen install and reaches the actual assertion.

The real-Gateway 1/2 job fails before tests, while runtime-postbuild reads a UI staging asset that the concurrent UI build has published and removed. Scheduled main failed a different real-Gateway case, so shard redness is not used as evidence. A deterministic regression on the exact CI main parent reproduces the same writeUpdateCompatibilityChunks ENOENT at line 562 (94.25 s command wall). A separate focused owner repair excludes recognized UI output directories; the unchanged regression and 10 compatibility sibling cases pass, and independent P0–P2 review is clean. The focused repair is #170455; it merged as aab809dbe0c867320f1d46cf6354a8340ac5027c, verified on origin/main. Its exact CI-profile build passed (601.55 s), with 35 successful CI jobs, 27 skipped and no failures.

The gate classification compared an older main run and called the latter two roots new. Exact-parent reproductions establish their inheritance. No product, security, or required review failure is being waived.

Focused tests ran one file at a time with --maxWorkers=1. PR CI owns broad validation. Before this integration, head a7115b5 passed all 57 active jobs, including all 14 UI/Gateway shards (855 s run wall; 15,430 job seconds). This is historical proof, not current-head admission evidence.

Historical local failure retained: on a7115b5, presentation primitives > Lit preserves presentation contracts in light desktop timed out waiting for the first fixture (1 failed, 7 passed; 213.54 s). The inspected synthetic capture was blank, with no page errors, unhandled rejections, completed resource loads, or mounted fixture. The exact case passed on its integrated main base (67.14 s) and later on 413f5f5 (11.56 s Vitest). Source-server delay is plausible but unproven; passing replays do not prove inheritance or repair. No assertion, retry, or timeout changed. The uncertainty remains in native review evidence.

The initial lint invocation used the UI tsconfig and timed out preparing unrelated SDK declarations; the exact changed-file planner command uses the core lint config and passed.

Testbox stopped before allocation; no lease exists. Local and CI proof use synthetic Gateway data and isolated fixtures. No live Gateway state was changed.

The images below are synthetic and were inspected before upload.

Before: overflowing reader tabs

After: overflowing reader tabs

Before: docked terminal chrome

After: docked terminal chrome

Before: native report widget

After: native report widget

Before: person activity card

After: person activity card

Preserve lazy page and widget boundaries, terminal DOM islands, registered tags, and selectors. Reuse the progress-card controller for refresh, error, and retry ownership; remove superseded renderers and consume native primitives. Keep opaque plugin templates at the existing legacy content boundary.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 12, 2026
@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 blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: XL labels Oct 12, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 12, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime labels Oct 12, 2026
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation gateway Gateway runtime labels Oct 12, 2026
@steipete
steipete merged commit 4a05c7c into main Oct 13, 2026
144 of 147 checks passed
@steipete
steipete deleted the solid2/w-portable branch October 13, 2026 03:11
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

steipete added a commit that referenced this pull request Oct 13, 2026
The Solid widget migration in `4a05c7c5d59d5768d10105b46cf131e05734f902` (#169725) removed the final three callers of `renderBoardWidgetError`, leaving its Lit adapter exported but unused. Scheduled main [38343322520/job 115119178402](https://github.com/openclaw/openclaw/actions/runs/38343322520/job/115119178402) fails the canonical export scans on that exact symbol.

Delete the obsolete adapter module and import `BoardWidgetPageMenu` directly from its existing owner in all four remaining type-only consumers. The type, Solid error component, error/retry behavior, and page-menu actions are unchanged. The superseded module is removed completely.

Exact candidate `6b6b0c21aa90d026e6ee7af0bbc00a34b052e5dd` passed all four complete browser, report, website, and board page-chrome test files: **22/22, no skips**, 7.48s Vitest / 11.16s command wall. The [focused run](https://github.com/openclaw/openclaw/actions/runs/38344141789) also passed all three canonical scans: `deadcode:dependencies` (173.37s), `deadcode:unused-files` (98.68s), and `deadcode:exports` (117.24s), with zero production/full-tree unused files or exports and zero script exports. No finding suppression was added.

[Ordinary CI](https://github.com/openclaw/openclaw/actions/runs/38344033939) completed with 35 successful jobs, 24 skipped, and two failed jobs: the commands test type leaf reports the separate preflight-reader TS2724, and the aggregate repeats it. All other selected types, lint, source contracts, and boundaries pass; Madge reports zero cycles. The database ratchets report T1 live 455→455, compatibility 9→9, and dialect 0→0. The [independent baseline job](https://github.com/openclaw/openclaw/actions/runs/38345114058/job/115124606702) checked out actual main `fcb89a331a1f59eedde59c4b3a338febdb199cb7` and naturally failed the identical commands TypeScript leaf with `config-preflight-snapshot.test.ts:41` TS2724 (exit 2). Only this exact inherited failure and its aggregate are waived under the red-main exception; this PR's ordinary CI is not claimed green. The separate preflight repair is tracked in #170619. Build, SDK diff, and update-cell jobs were unselected and are not claimed as fresh passes.

Local formatting, lint, whitespace checks, and native commit hooks passed. One scoped Codex P2 review completed clean with no findings.

Five files: +4/−15. No visual or runtime behavior change, new dependency, schema change, SQLite call, or removed authority check. SQL statements and requests are unaffected by scope; no SQL benchmark was run for this dead-code repair.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
* refactor(ui): port portable Lit consumers to Solid

Preserve lazy page and widget boundaries, terminal DOM islands, registered tags, and selectors. Reuse the progress-card controller for refresh, error, and retry ownership; remove superseded renderers and consume native primitives. Keep opaque plugin templates at the existing legacy content boundary.

* fix(ui): retain portaled Solid cards and delegated focus

* fix(ui): restore person card focus after Solid updates

* test(ui): keep native animation timers clearable in catalog checks

* test(ui): stabilize sidebar catalog failure proof
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
The Solid widget migration in `62f3a1a8e593bb65c657f2bb836e5eb5dc9bd921` (openclaw#169725) removed the final three callers of `renderBoardWidgetError`, leaving its Lit adapter exported but unused. Scheduled main [38343322520/job 115119178402](https://github.com/openclaw/openclaw/actions/runs/38343322520/job/115119178402) fails the canonical export scans on that exact symbol.

Delete the obsolete adapter module and import `BoardWidgetPageMenu` directly from its existing owner in all four remaining type-only consumers. The type, Solid error component, error/retry behavior, and page-menu actions are unchanged. The superseded module is removed completely.

Exact candidate `6b6b0c21aa90d026e6ee7af0bbc00a34b052e5dd` passed all four complete browser, report, website, and board page-chrome test files: **22/22, no skips**, 7.48s Vitest / 11.16s command wall. The [focused run](https://github.com/openclaw/openclaw/actions/runs/38344141789) also passed all three canonical scans: `deadcode:dependencies` (173.37s), `deadcode:unused-files` (98.68s), and `deadcode:exports` (117.24s), with zero production/full-tree unused files or exports and zero script exports. No finding suppression was added.

[Ordinary CI](https://github.com/openclaw/openclaw/actions/runs/38344033939) completed with 35 successful jobs, 24 skipped, and two failed jobs: the commands test type leaf reports the separate preflight-reader TS2724, and the aggregate repeats it. All other selected types, lint, source contracts, and boundaries pass; Madge reports zero cycles. The database ratchets report T1 live 455→455, compatibility 9→9, and dialect 0→0. The [independent baseline job](https://github.com/openclaw/openclaw/actions/runs/38345114058/job/115124606702) checked out actual main `54a9df02cc64f5f466490dc7b76ae6bc7f2b2690` and naturally failed the identical commands TypeScript leaf with `config-preflight-snapshot.test.ts:41` TS2724 (exit 2). Only this exact inherited failure and its aggregate are waived under the red-main exception; this PR's ordinary CI is not claimed green. The separate preflight repair is tracked in openclaw#170619. Build, SDK diff, and update-cell jobs were unselected and are not claimed as fresh passes.

Local formatting, lint, whitespace checks, and native commit hooks passed. One scoped Codex P2 review completed clean with no findings.

Five files: +4/−15. No visual or runtime behavior change, new dependency, schema change, SQLite call, or removed authority check. SQL statements and requests are unaffected by scope; no SQL benchmark was run for this dead-code repair.
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. scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant