Skip to content

feat(plugins): support Solid Control UI views - #168408

Merged
steipete merged 6 commits into
mainfrom
solid2/p0c-plugin-solid
Oct 10, 2026
Merged

steipete merged 6 commits into
mainfrom
solid2/p0c-plugin-solid

Conversation

@steipete

@steipete steipete commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Native Control UI plugins could not compile Solid TSX through the canonical plugin builder. The X replies page now provides a complete Solid 2 consumer behind the unchanged view contract.

User Impact

Plugin authors can use their own bundled Solid renderer. X replies preserves its controls, administrative access checks, and layout. Solid dependencies use the seven-day-eligible 2.0.0-rc.13 pins. Existing non-Solid JSX compilation remains supported.

Why This Change Was Made

The shared esbuild adapter selects Solid only when the source's leading @jsxImportSource pragma or explicit builder option names @solidjs/web. Other TSX files retain esbuild's existing compiler. This fixes ClawSweeper's P1 compatibility finding; a regression first failed against the unconditional adapter, then passed after the fix. Workboard's mock builder uses the same adapter.

Solid's browser entry includes an unused hydration loader. Import validation now checks emitted JavaScript with Acorn and the esbuild metafile: dead loaders can disappear, but every retained browser import must resolve to an emitted asset. Retained non-literal dynamic imports and external browser imports fail. Existing backend builtin/host exceptions and require guards remain. acorn was already a root dependency.

The coordinator reviewed this security contract. This path is not in the CODEOWNERS hard-security tier; the exact-head openclaw/security-sensitive-review and openclaw/dependency-review checks still gate landing.

Evidence

  • Canonical X build passed: JavaScript 32,601 → 79,432 bytes, unchanged CSS 3,681 bytes, total 36,282 → 83,113 bytes. Limits remain 4 MiB per asset and 8 MiB per plugin.
  • Focused X/backend/builder run: 265 tests passed, 123.84 seconds. After the compatibility fix, the builder's 18 tests passed in 11.12 seconds overall / 9.77 seconds Vitest.
  • The actual X bundle passed native mock-host E2E: list/add/remove, guest mode, account selection, retained row identity, scope loss, disposal, and stale responses. Final local run: 27.24 seconds including the host build, 5.68-second test body. Linux CI on the preceding renderer-identical head: 3.77 seconds; builder tests under Bun: 2.58 seconds.
  • Desktop/mobile before-and-after captures were inspected. The mobile comparison is exact. The final compiler-selection change preserves the existing X asset bytes.
  • Autoreview is clean at P0–P2, including the compatibility repair. Formatting and git diff --check pass.

Testbox tbx_01m4jnf71xhtbejy4dpyf5gyj3 never received a runner. AWS cbx_9ea7a6b45ea2 and Hetzner cbx_cf9e22667a19 stalled in source synchronization. All three leases are stopped; no test command ran there. Local focused proof follows the campaign's capacity-failure fallback; PR CI supplies the remaining remote gates. No local containers or extra CI reruns were used.

Final-head ClawSweeper is ready with no actionable findings; openclaw/dependency-review and openclaw/security-sensitive-review pass on 7476c8a7e59e5726e9673acf17f552064874e49a. CI run 38051331563 completed with six inherited failed jobs: UI shards 2, 3, 4, 6 and 8 (native-conversation, collaborator-scroll, mobile-shell-geometry, instant-thread and position-rail), plus the fake-compiler run-tsgo SIGTERM-during-spawn timeout. The UI cases match independent scheduled-main run 38048680925; the watchdog matches 38038570610. Their tests and relevant host/process owners are unchanged in the actual tested merge. The coordinator approved the native inherited-failure landing path; CI is recorded as failed, with no reruns. Production types, lint, UI unit, changed-node and boundary checks pass. Real-Gateway, performance, WebKit/native-shell and release-only lanes were not selected.

Release-note context: support Solid-authored native plugin views and move X replies to Solid without changing the SDK contract.

Before: Lit X replies at desktop size

After: Solid X replies at desktop size

Before: Lit X replies at mobile size

After: Solid X replies at mobile size

Compile plugin TSX with the author-owned Solid compiler and bundle the renderer. Validate retained imports after tree-shaking so dead hydration loaders do not reject client-only views while unbundled runtime imports remain forbidden.

Port the X replies page behind the existing view contract and document Solid plugin authoring. Security-relevant builder validation requires owner review before landing.
Key account and allowlist rows by stable identities, preserve inline spacing, and record the generated browser asset revision. Exercise the real X bundle and complete the navigation fixture.
@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: 7476c8a7e59e5726e9673acf17f552064874e49a
  • Maintainer: @steipete
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-lock.yaml
  • extensions/x/package.json

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui cli CLI command changes scripts Repository scripts channel: x size: XL labels Oct 10, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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 maintainer review before merge.

What this changes

This PR adds opt-in Solid TSX compilation to the plugin builder and converts the X replies page to Solid.

Example: A plugin authors view.tsx with /** @jsxImportSource @solidjs/web */.

  • Before: The canonical builder does not invoke Solid's native compiler.
  • After: The builder compiles and bundles the plugin's Solid renderer while leaving unmarked JSX on esbuild's existing path.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused capability with inspected visual proof and meaningful builder/browser coverage; the previous compatibility blocker is resolved.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before-and-after desktop/mobile captures show the Solid X page running in the Control UI; the supplied browser scenario exercises the built bundle through the native host, including controls, scope loss, disposal, and stale responses.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Plugin authors cannot compile Solid-authored native views through the canonical plugin builder.
Reason: The maintainer-directed capability has a concrete bundled consumer and preserves the existing renderer-neutral lifecycle contract.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the previous JSX compatibility finding is resolved, and no new actionable defect was found in the maintainer-directed Solid support.

Priority: P2
Reviewed head: 7476c8a7e59e5726e9673acf17f552064874e49a

Before merge

None.

Findings

None.

Agent review details

How this fits together

The plugin builder converts author-owned sources and dependencies into immutable browser assets that the Control UI mounts through its existing view lifecycle contract.

flowchart LR
  A[Plugin browser sources] --> B[Canonical plugin builder]
  B --> C[JSX compiler selection]
  C --> D[Emitted import validation]
  D --> E[Immutable browser assets]
  E --> F[Control UI view host]
  F --> G[X replies page]
Loading

Technical review

Best possible solution:

Retain the opt-in compiler selection and existing view contract, with normal required gates governing landing.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the missing Solid compiler path; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Selecting the author's renderer contract in the shared builder addresses the capability gap while preserving existing JSX semantics and synchronous X request ownership.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ac2c756da388.

Provenance checked

  • Framework-neutral browser compilation keeps the original intent (6a97159: Native plugin UI uses author-owned browser dependencies behind a framework-neutral view contract.)
  • Post-tree-shaking import validation changes intended behavior with a stated reason (6a97159: Plugin artifacts must remain self-contained; the PR explains moving dynamic-import validation after removal of unused hydration loaders while retaining rejection of unresolved output imports.)
  • X replies renderer and request lifecycle keeps the original intent (9666c02: Provide administrator-managed X replies with account selection, request generations, stale-result rejection, and disposal.)
  • Immutable split browser generations keeps the original intent (a9d68ff: Support deferred plugin pages through complete immutable generations and preserved relative chunk loading.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 7e6fd5d adds src/cli/plugins-build-bundle.ts:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7e6fd5d1d362; files: src/cli/plugins-build-bundle.ts)
  • Vincent Koc: Raw commit a9d68ff adds docs/plugins/feature-plugins.md:320 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a9d68fff897f; files: docs/plugins/feature-plugins.md)

PR surface

Source +165, Tests +377, Docs +39, Config +5, Other +11. Total +597 across 12 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 5 655 490 +165
Tests 2 378 1 +377
Docs 1 40 1 +39
Config 2 8 3 +5
Generated 0 0 0 0
Other 2 14 3 +11
Total 12 1095 498 +597

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Useful plugin-authoring capability with a bounded builder and X presentation surface.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 (2 earlier review cycles)
  • reviewed 2026-10-10T11:13:14.056Z sha 4eb34b3 :: needs changes before merge. :: [P1] Preserve the existing JSX compiler for non-Solid plugins
  • reviewed 2026-10-10T11:56:49.636Z sha 97d877f :: needs changes before merge. :: [P1] Preserve the existing JSX compiler for non-Solid plugins

Reviewed October 10, 2026, 8:22 AM ET / 12:22 UTC (Revision 3).

Use typed native value and ARIA bindings, keep browser fixtures independent of plugin backend type graphs, and traverse emitted imports without type assertions. Preserve the author-installed compiler API assertion with its safety invariant.
Select the Solid compiler only for an explicit @solidjs/web JSX contract, leaving unmarked TSX on esbuild's existing renderer path. Cover the non-Solid regression and document the Solid pragma. The X asset generation is byte-identical.
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The non-Solid JSX compatibility finding is fixed: the native Solid compiler now runs only for an explicit @jsxImportSource @solidjs/web contract. Unmarked TSX retains esbuild's existing JSX semantics. The regression failed on the old handler and now passes; all 18 builder tests pass, including Solid mount/update/dispose. The X asset generation is byte-identical. Please review the current head for the approved landing.

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
@steipete
steipete merged commit 8f9e5ce into main Oct 10, 2026
144 of 152 checks passed
@steipete
steipete deleted the solid2/p0c-plugin-solid branch October 10, 2026 12:36
@steipete

Copy link
Copy Markdown
Contributor Author

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

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
* feat(plugins): support Solid Control UI views

Compile plugin TSX with the author-owned Solid compiler and bundle the renderer. Validate retained imports after tree-shaking so dead hydration loaders do not reject client-only views while unbundled runtime imports remain forbidden.

Port the X replies page behind the existing view contract and document Solid plugin authoring. Security-relevant builder validation requires owner review before landing.

* fix(x): retain Solid rows across reply updates

Key account and allowlist rows by stable identities, preserve inline spacing, and record the generated browser asset revision. Exercise the real X bundle and complete the navigation fixture.

* fix(plugins): satisfy Solid typing and import boundary checks

Use typed native value and ARIA bindings, keep browser fixtures independent of plugin backend type graphs, and traverse emitted imports without type assertions. Preserve the author-installed compiler API assertion with its safety invariant.

* chore(plugins): place compiler safety invariant beside assertion

* fix(plugins): preserve non-Solid JSX compilation

Select the Solid compiler only for an explicit @solidjs/web JSX contract, leaving unmarked TSX on esbuild's existing renderer path. Cover the non-Solid regression and document the Solid pragma. The X asset generation is byte-identical.

* style(plugins): make compiler fallback return explicit
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 channel: x cli CLI command changes dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant