Skip to content

chore(ui): enable Solid 2 alongside Lit - #168305

Merged
steipete merged 3 commits into
mainfrom
solid2/p0a-toolchain
Oct 10, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/p0a-toolchain

Conversation

@steipete

@steipete steipete commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

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 .tsx and .jsx. performanceTracks: false suppresses 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/compiler at 2.0.0-rc.13; @solidjs/vite-plugin at 3.0.0-next.47; @solidjs/testing-library at 1.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.
  • Boot-manifest generation with candidate and baseline configurations: identical captures; no Solid boot modules. The checked-in manifest was preserved.
  • pnpm test:ui on Node: 1,597 files passed; 22,131 tests passed and six existing skips (429.91 s wall).
  • Explicit Bun execution through the package runner: smoke plus existing Lit option-card suite passed (five tests, 3.48 s wall).
  • Added smoke: pnpm test ui/src/solid-smoke/solid-smoke.test.tsx --maxWorkers=1 passed 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.
  • Full pnpm lint: passed with 13 existing max-lines warnings. Final changed-file lint, pnpm tsgo:ui, and pnpm tsgo:test:ui: passed.
  • Native performance comparison passed. Independently measured startup JS gzip: base 373,784 B, candidate 373,784 B, delta 0 B. The absolute startup-budget warning reproduces on the base; no budgets were changed.
  • Codex autoreview through P2: clean.

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 706dcac89f6921b5f450e211e9142cf13f2e1c17 merges main at 72eafadc01a01781cd4ac114f9397c02af9b367f, 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.
  • Solid smoke plus existing Lit option-card suite: 5 tests passed; 2.06 s wall.
  • pnpm tsgo:ui: passed; 42.28 s wall.
  • pnpm ui:build: passed on head (11.83 s) and base (11.20 s).
  • The unchanged ui/src/pages/chat/components/chat-attachment-image.worker.ts builds 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.
  • Codex autoreview through P2: clean before publication.

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:

  • Dashboard/publication: the four cases reproduce on main and in the paired run above.
  • Architecture: all fourteen Kysely guard violations reproduce on CI's exact main parent cdeb1e37adc6ecfba8db436f5372c37799d2f931; the affected SQLite owners and checker are unchanged by this PR.
  • Live preferences: the old test sends keyboard input before the popup is visible. Main already fixes that readiness race in 910fd7b15154f. Baseline replay passes the case while exposing other existing E2E failures; no passing replay is claimed as a fix.

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.

@clawsweeper

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

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Oct 10, 2026
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 706dcac89f6921b5f450e211e9142cf13f2e1c17
  • Maintainer: @steipete
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-lock.yaml
  • ui/package.json

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This 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.

  • Before: The UI toolchain lacks Solid compilation and canonical TSX test discovery.
  • After: The fixture renders Entry 1 and Entry 2 and updates the Lit option card to Count: 2.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused integration is coherent and previous findings are resolved; strongest changed-behavior evidence remains harness-based, with two CI causes still unattributed.
Proof confidence 🦐 gold shrimp (3/6) Maintainer-owned internal tooling is outside the external-contributor proof gate; the body records Solid/Lit execution and builds, and inspected exact-head checks confirm UI shards, builds, and performance coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Partial
User problem: UI developers need to compile and validate Solid components before migrating existing Lit views.
Reason: The maintainer-directed plan explicitly calls for this additive foundation, and Related correctly avoids claiming the full migration is complete.

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
Reviewed head: 706dcac89f6921b5f450e211e9142cf13f2e1c17

Before merge

  • Complete next step - Inspect the architecture failure and live-preferences timeout from the reviewed head, repairing any diff-caused defect or documenting evidence that the failure is inherited.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Non-browser discovery and scoped intersections keeps the original intent (aa9d51a: Retain browser-import unit helpers while preserving separate browser execution ownership.)
  • Safe directory intersection keeps the original intent (2ff1f93: Preserve setup and exact-once discovery when routing scoped test ownership.)
  • UI isolation and runtime partitions keeps the original intent (fix(ui): prevent cross-file mock leakage in Control UI tests #111554: Prevent cross-file mock leakage without imposing broad isolation; subsequent Bun routing preserves specialized Node owners.)
  • WebKit browser project keeps the original intent (7c0d407: Validate overlay and focus contracts in WebKit while retaining explicit expected-failure ownership.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit aa9d51a adds test/vitest/vitest.include-patterns.ts:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: aa9d51a24fa5; files: test/vitest/vitest.include-patterns.ts)
  • Vincent Koc: Raw commit 4424daf adds ui/vite.config.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 4424dafe64a9; files: ui/vite.config.ts)

PR surface

Source +138, Tests +117, Config +12, Other +510. Total +777 across 23 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 4 147 9 +138
Tests 15 144 27 +117
Docs 0 0 0 0
Config 3 12 0 +12
Generated 0 0 0 0
Other 1 510 0 +510
Total 23 813 36 +777

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: This enables a planned renderer migration and preserves validation coverage, with no direct user-facing runtime change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-10T07:17:17.297Z sha 62b14a6 :: needs changes before merge. :: none
  • reviewed 2026-10-10T07:51:51.515Z sha c25e1a2 :: needs changes before merge. :: [P2] Preserve scoped directory intersection when adding TSX globs | [P2] Include the TSX smoke in the canonical CI runtime inventory
  • reviewed 2026-10-10T08:18:29.509Z sha c25e1a2 :: needs changes before merge. :: [P2] Preserve scoped directory intersection when adding TSX globs | [P2] Include the TSX smoke in the canonical CI runtime inventory

Reviewed October 10, 2026, 5:06 AM ET / 09:06 UTC (Revision 4).

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 10, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Oct 10, 2026
@steipete
steipete merged commit a9c6920 into main Oct 10, 2026
137 of 142 checks passed
@steipete
steipete deleted the solid2/p0a-toolchain branch October 10, 2026 09:35
@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 10, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
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.
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 dependencies-changed PR changes dependency-related files P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant