Repository navigation
chore(ui): enable Solid 2 alongside Lit - #168305
Conversation
|
🦞👀 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: needs changes before merge. What this changesThis PR enables Solid 2 compilation, JSX typechecking, and interoperability tests alongside the existing Lit Control UI. Example: Run ui/src/solid-smoke/solid-smoke.test.tsx and click Increment twice.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this is a maintainer-directed migration prerequisite, and both previous discovery findings are fixed; remaining CI failures need attribution before landing. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe Control UI toolchain takes TypeScript, TSX, and test selections into Vite, Vitest, and compiler shards, producing browser assets and validation results. flowchart LR
A[UI source and TSX] --> B[Vite configuration]
B --> C[Solid compiler]
C --> D[Browser assets]
E[Test selections] --> F[Shared discovery owner]
F --> G[Vitest projects]
B --> G
G --> H[Solid and Lit assertions]
Technical reviewBest possible solution: Retain the shared compiler and discovery integration, then settle the unattributed CI failures through the existing landing workflow. Do we have a high-confidence way to reproduce the issue? This is additive toolchain work; source inspection establishes the missing Solid integration on main, and no target code was executed during this review. Is this the best way to solve the issue? Extending the existing Vite and discovery owners is appropriate, and the interoperability fixture exercises reactive updates without entering the application boot graph. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cdeb1e37adc6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +138, Tests +117, Config +12, Other +510. Total +777 across 23 files. Added test files: 1. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed October 10, 2026, 5:06 AM ET / 09:06 UTC (Revision 4). |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
check-dependencies (pnpm deadcode:full) has been red on hourly main since the Solid 2 groundwork landed: - #168305 added the ui/src/solid-smoke compiler/interop fixture and #168405 the ui/src/lib/reactive state-owner projections as internal foundation that only their tests import. Knip reported all 14 files as unused and @solidjs/signals (imported only by those projections) as an unused ui dependency. Register them as ui production entries with a removal condition: drop the entries with the first production importer. - src/cli/plugins-build-solid.ts resolves @solidjs/compiler with createRequire from the plugin author's package.json (docs/plugins/feature-plugins.md), so Knip's unlisted-dependency finding is a dynamic-require false positive; the host never ships it. Ignore it next to the existing createRequire entry. - The all-exports pass (masked while the first pass failed) reported two stubs in sessions-channel-fixture.test-support.ts as unused exports after #162316 moved their consumers; they are only used in-module, so drop the exports. Proof: both Knip passes from deadcode:full now report only the canvas a2ui-app and worker-deploy entry-root findings that the CI campaign's FIX3 lane is fixing separately; the fixture's two importing suites pass (67 tests); oxfmt, oxlint, and boundary-guard lint are clean on the changed files.
check-dependencies (pnpm deadcode:full) has been red on hourly main since the Solid 2 groundwork landed: - openclaw#168305 added the ui/src/solid-smoke compiler/interop fixture and openclaw#168405 the ui/src/lib/reactive state-owner projections as internal foundation that only their tests import. Knip reported all 14 files as unused and @solidjs/signals (imported only by those projections) as an unused ui dependency. Register them as ui production entries with a removal condition: drop the entries with the first production importer. - src/cli/plugins-build-solid.ts resolves @solidjs/compiler with createRequire from the plugin author's package.json (docs/plugins/feature-plugins.md), so Knip's unlisted-dependency finding is a dynamic-require false positive; the host never ships it. Ignore it next to the existing createRequire entry. - The all-exports pass (masked while the first pass failed) reported two stubs in sessions-channel-fixture.test-support.ts as unused exports after openclaw#162316 moved their consumers; they are only used in-module, so drop the exports. Proof: both Knip passes from deadcode:full now report only the canvas a2ui-app and worker-deploy entry-root findings that the CI campaign's FIX3 lane is fixing separately; the fixture's two importing suites pass (67 tests); oxfmt, oxlint, and boundary-guard lint are clean on the changed files.
Related: #168114
What Problem This Solves
The Control UI needs to compile and test Solid 2 components alongside Lit before the renderer migration can begin.
User Impact
Internal toolchain change; no user-facing behavior changes. Release-note context: none user-facing.
Why This Change Was Made
Adds the native Solid compiler to the Vite and Vitest entry points, including the private E2E server, and enables Solid JSX in the UI typecheck graphs. The mock dev server inherits the canonical Vite configuration. A standalone smoke component exercises signals, memoization, lists, conditional rendering, events, and an object property binding to an existing Lit element.
Solid transforms are limited to
.tsxand.jsx.performanceTracks: falsesuppresses automatic page-wide Chrome Performance recorder injection; Solid development builds, warnings, owner diagnostics, and HMR retain their defaults. Vitest inlines Solid and Testing Library together to avoid splitting their reactive owner graph. It resolves Solid to its development client runtime while preserving Node export conditions for the existing Node-pragmas in mixed UI projects.Exact pins:
solid-js,@solidjs/signals,@solidjs/web, and@solidjs/compilerat2.0.0-rc.13;@solidjs/vite-pluginat3.0.0-next.47;@solidjs/testing-libraryat1.0.0-beta.3. All meet the seven-day cooldown. Upgrade the matched RC packages to rc.14 and the plugin to next.49 only after October 15/16, 2026, respectively.Evidence
Prior-head proof at
62b14a6ae1502e675b3b9fff28613e278c037c26, on AWS/Linux with Node 24.19.0 and Bun 1.4.0:pnpm ui:build: passed.pnpm test:uion Node: 1,597 files passed; 22,131 tests passed and six existing skips (429.91 s wall).pnpm test ui/src/solid-smoke/solid-smoke.test.tsx --maxWorkers=1passed in 4.52 s wall (0.136 s test time in the preceding focused run). Hosted CI seconds will be available after PR CI runs.pnpm lint: passed with 13 existing max-lines warnings. Final changed-file lint,pnpm tsgo:ui, andpnpm tsgo:test:ui: passed.The initial integration exposed duplicate Solid runtime instances and a browser export condition leaking into Node-pragmas; the configuration fixes are covered by the smoke and full UI run. This change adds TSX discovery to the UI configs; exact-head CI identified remaining shared-discovery work described below.
Current-head validation and inherited failures
Head
706dcac89f6921b5f450e211e9142cf13f2e1c17merges main at72eafadc01a01781cd4ac114f9397c02af9b367f, preserving asset-retention removal and the new WebKit project. The CI-confirmed discovery defects are fixed at their existing owners: the canonical runtime inventory includes TSX, and scoped matching preserves extension-specific selection and non-browser ownership. The Vitest runtime override now applies only to a serve command in test mode with a Vitest test configuration; normal production and private E2E builds do not activate it. Solid development diagnostics remain enabled.On Testbox lease
tbx_01m4jf5eqdy3b8rzpqc56dyqtg(run 38038333547):pnpm test test/vitest/vitest.pattern-file.test.ts --maxWorkers=1: 32 tests passed; 2.05 s Testbox wall.pnpm test test/vitest-ui-package-config.test.ts --maxWorkers=1: 25 tests passed; 9.81 s Testbox wall.pnpm tsgo:ui: passed; 42.28 s wall.pnpm ui:build: passed on head (11.83 s) and base (11.20 s).ui/src/pages/chat/components/chat-attachment-image.worker.tsbuilds to the same file and SHA-256 on both revisions:7b5c08370df32bd7b022cb4f4e70e012861066ca3a2c43d05dc0e3533af32a1e. Whole-build hashes contain different advisory Git dirty metadata in the transported candidate and the base; they are not claimed identical.Focused wall times above are measured on Testbox. Exact per-file hosted CI timings were unavailable from the inspected job logs.
The three requested E2E files were run together through their real bundled entry point on both revisions, on the same lease. Both runs have exactly the same five failed cases and seven passes (head 106.72 s; base 108.14 s): dashboard pin clicks are intercepted by the Details gutter; guest GitHub publication does not expose the expected Publish PR button; the cold-load proof waits on composer progress that moved to Details. The same groups failed on scheduled main CI 38035030681 at
8832904b171a34dd5b134f9985208d2ecabea24f. These are inherited failures, not passing E2E proof.Exact-head CI run 38039314427 passed UI units, production/test types, lint, builds, performance, and security. ClawSweeper confirmed the two discovery findings are fixed and found no new code defects. The remaining CI failures are retained under the native inherited-failure policy:
cdeb1e37adc6ecfba8db436f5372c37799d2f931; the affected SQLite owners and checker are unchanged by this PR.The source-bearing JavaScript assets match after accounting for advisory Git metadata and derived hashed import filenames; the unchanged worker above matches byte-for-byte. Native preparation retains the exact CI merge checkout, failed logs, baseline qualifications, and scoped passing proof. No auto-merge is armed.