Skip to content

refactor(ui): render MCP apps and canvas widgets with Solid - #168833

Merged
steipete merged 6 commits into
mainfrom
solid2/w-cmp-4
Oct 11, 2026
Merged

steipete merged 6 commits into
mainfrom
solid2/w-cmp-4

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Moves the remaining MCP app, MCP server, and canvas widget components from Lit to Solid 2 while keeping their existing tags, classes, and user flows.

User Impact

App frames retain their identity across ordinary updates, and app retirement remains awaited before a replacement appears. Server settings, app discovery, resource selection, and canvas behavior retain their current contracts. No dependencies or public configuration change.

Why This Change Was Made

Each registered tag now has one Solid implementation, reached by existing Lit callers through the bridge. Discovery and frame protocol state remain with synchronous TypeScript owners. The MCP panel retains both the child root and its accepted launch while teardown runs; metadata updates remain live without relaunching or resetting app-reported height.

The small coupled bridge changes preserve public property setters and native moveBefore lifetimes. Shared wizard templates and confirmation templates remain with their unported Lit consumers; the new renderers reuse those decision owners.

Evidence

Proof Result
Focused MCP, canvas, bridge, and retirement tests 133 passing across 13 single-file runs; details below
Synthetic component screenshots Inspected before/after; baseline and candidate PNGs are byte-identical
Independent Codex autoreview Whole port, post-main integration, and CI-repair P0–P2 reviews are scoped-clean
Focused lint and whitespace Passing
Final-head types, lint, ratchets, i18n, performance Passed on a7bcd99e8fd6
Final-head UI suites / E2E UI shards 1 and 3 and selected E2E passed; hosted UI shard 2 interrupted by runner shutdown on all three attempts
Local fallback for UI shard 2 183 tests passed across all 13 touched files assigned to that shard, one file/worker at a time; 1,078.44s total wall time

The screenshots use synthetic configured servers, app discovery, a static canvas document, and a deliberately reconstructed/error app state. They were captured in an isolated single-file Chromium component test; no local application E2E, Docker, or OrbStack was run.

Changed UI production source: 4,260 → 5,094 lines (+834). Changed tests/helpers: 15,995 → 16,594 (+599), including the existing composer/sidebar fixtures updated to provide application context. Counts compare changed source paths with merge base 8c9999b298c4. Growth is primarily explicit JSX/bridge property declarations and the retained shared wizard/form renderers; the seven registered Lit implementations are deleted.

Focused proof used pnpm --dir ui test <single-file> --project <unit|unit-mock-registry> --maxWorkers=1. Final runs: canvas 33/33 (14.33s), bridge 11/11 (10.69s), MCP view 27/27 (50.84s), protocol bridge 4/4 (19.74s), catalog 11/11 (233.54s including transform), resources 3/3 (21.26s), server card 27/27 (18.27s; main removed two obsolete display-refresh cases), panel 1/1 (7.32s), settings 1/1 (3.83s), context strip 3/3 (13.17s), Solid retirement 2/2 (15.65s), legacy shell gate 4/4 (7.63s), and chat handoff 6/6 (31.20s). Most command time was transform/startup; the added subscription, selection, and presentation assertions run in milliseconds. The first CI run exposed JSX attribute/type issues, assertion/i18n ratchet updates, and standalone composer/sidebar fixtures missing application context; these are corrected in d4f98398412a. Repair checks passed: MCP view 27/27 (22.23s), retirement 2/2 (13.34s), settings 1/1 (2.55s), context strip 3/3 (6.89s), composer overflow 19/19 (7.13s), microphone 14/14 (30.98s), sidebar file editor 20/20 (8.48s), and sidebar scroll 4/4 (2.67s). Focused lint, assertion ratchet, and keyless i18n verification also pass. The second run passed production types, core lint, i18n, UI performance, and E2E shard 1, but exposed additional standalone fixture mounts and fixture types. 6f314281454e supplies context at those mounts, completes the agent-selection and hello fixtures, and fixes a redundant CSS declaration/mock-isolation annotation. All 73 focused tests covering those corrections pass; no runtime fallback or test suppression was added. The final fixture corrections explicitly type the supplied capability slice and create the isolated mock frame without JSX tag registration. Production types and all other type shards passed before that last test-only correction; the panel regression passes again (5.42s). Final CI on a7bcd99e8fd6 passed all type shards, lint, ratchets, i18n, performance, UI shards 1 and 3, and selected E2E. UI shard 2 was terminated by a runner shutdown before finishing, with no assertion failure in either complete job log. Two targeted retries repeated that shutdown; the last was explicitly requested by the migration coordinator. Run: https://github.com/openclaw/openclaw/actions/runs/38118935216. The coordinator authorized local fallback and the native interrupted-job exception. Local fallback passed all 183 tests in the 13 touched shard-2 files (determined from the CI plan and completed shard-1/3 logs), each run individually with --maxWorkers=1. This does not relabel the hosted interruptions as passing CI. The first two attempts used different Azure regions and stopped after more than 230 passed module records. Actions runner 2.337.0 reports this message from its runner shutdown path; the borrower/scratch cleanup warnings follow that signal. No repository-originating signal or supported source fix was identified, and no further hosted retries are planned after the requested retry and successful local proof.

Red/green regressions covered cancelled retirement retaining the same child root, same-owner metadata without relaunch, frozen retiring session identity, discovery reorder preserving resource ownership, metadata preserving app-reported height, context listener cleanup, and unrelated Gateway updates preserving sign-in.

A proposed live provider-context replacement protocol was declined: production app-root.ts publishes a new context only from connectedCallback, at a full application-tree epoch. The shell owns that outer retirement call site; this lane preserves the component-side gate without adding an unused replacement protocol.

Before: MCP and canvas components

After: MCP and canvas components

Before: expanded server and resource controls

After: expanded server and resource controls

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: XL labels Oct 11, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces Lit rendering for MCP apps, server controls, and canvas widgets with Solid while retaining their existing interfaces.

Example: Update the title of an open Parts library app after it reports a height of 900 pixels.

  • Before: The Lit view updates the title while keeping the iframe and its reported height.
  • After: The Solid view preserves the same iframe and 900-pixel height while updating the title.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A coherent, owner-directed migration with useful visual and lifecycle coverage and no concrete introduced defect found.
Proof confidence 🦐 gold shrimp (3/6) The host identifies this as maintainer-authored, so the ordinary contributor proof gate does not apply; inspected screenshots establish synthetic component parity, while the prior optional request for a shipped-Control-UI launch and replacement trace remains unfulfilled.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: The established area owner is carrying the approved Solid migration, and this PR completes a coherent component family while preserving existing product behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it advances the approved Solid migration and preserves the existing MCP and canvas contracts. No actionable introduced defect was found; the interrupted required CI check remains a native landing concern.

Priority: P3
Reviewed head: a7bcd99e8fd6f534ddccedf847b3c9ac45847707

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not show a shipped Control UI app launch, interaction, and awaited replacement; the body reports red/green lifecycle regressions that this read-only review did not rerun.
Agent review details

How this fits together

Control UI components consume application capabilities and Gateway responses, render server controls and sandboxed frames, and route app actions through existing protocol and conversation owners.

flowchart LR
  A[Application context] --> B[Solid bridge]
  B --> C[Solid components]
  C --> D[Discovery and frame owners]
  D --> E[Gateway requests]
  D --> F[Sandboxed app frames]
  F --> G[Confirmation and conversation owners]
Loading

Technical review

Best possible solution:

Complete the Solid cutover with the existing protocol owners and use the native landing workflow to resolve the interrupted required check.

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

This is a renderer refactor rather than a reported product defect; the review inspected source and supplied evidence without executing target code.

Is this the best way to solve the issue?

The port follows the approved bridge architecture, removes the registered Lit implementations, and keeps discovery, protocol resources, and mutation decisions with their existing owners.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • MCP app discovery, settings, resources, and context keeps the original intent (6046d4f: Support interactive MCP plugin apps across conversations and workspace files using existing session and requester boundaries.)
  • Awaited app retirement keeps the original intent (7d62a27: Keep outgoing app frames connected until bounded resource teardown completes.)
  • Authenticated canvas loading and retained content keeps the original intent (428e479: Load managed widget HTML through the authenticated Gateway and isolated sandbox rather than navigating into an authentication proxy.)
  • MCP server management and connector sign-in keeps the original intent (2a48569: Reuse the credential owner and wizard controls for connector sign-in from Settings.)
  • Lit and Solid interoperation keeps the original intent (eca633a: Provide one Solid implementation per registered tag while preserving existing Lit callers and their property contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit eca633a adds ui/src/lit/solid-bridge.ts:66 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: eca633a8801b; files: ui/src/lit/solid-bridge.ts)
  • Jason (Json): Raw commit 7d62a27 adds ui/src/components/mcp-app-unmount.ts:82 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7d62a277fffe; files: ui/src/components/mcp-app-unmount.ts)
  • Ayaan Zaidi: Raw commit 2a48569 adds ui/src/components/wizard-login-controller.ts:65 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2a48569bfbb8; files: ui/src/components/wizard-login-controller.ts)

PR surface

Source +848, Tests +601, Other +24. Total +1473 across 77 files. Added test files: 4.

View PR surface stats
Area Files Added Removed Net
Source 32 3634 2786 +848
Tests 43 1028 427 +601
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 25 1 +24
Total 77 4687 3214 +1473

Review metrics

Metric Value Why it matters
Production versus test growth UI production +834 lines; tests and helpers +599 lines Verified from the introduced diff, including production CSS; growth is explained by JSX, bridge declarations, and explicit lifecycle ownership.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is an internal renderer migration with no intended change to user capabilities, configuration, or defaults.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Optionally add a shipped-Control-UI recording or trace showing app launch, interaction, and awaited replacement, with IPs, keys, phone numbers, and non-public endpoints redacted.

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 (7 earlier review cycles)
  • reviewed 2026-10-11T02:49:35.527Z sha 496abd5 :: needs changes before merge. :: [P2] Mark the panel mock's intentional isolation
  • reviewed 2026-10-11T03:00:03.723Z sha 496abd5 :: needs changes before merge. :: [P2] Mark the panel mock's intentional isolation
  • reviewed 2026-10-11T03:54:35.706Z sha 3fe9f5a :: needs changes before merge. :: [P2] Mark the panel mock's intentional isolation | [P2] Regenerate the raw-copy baseline for the Solid form
  • reviewed 2026-10-11T06:06:10.204Z sha d4f9839 :: needs changes before merge. :: [P2] Mark the panel mock's intentional isolation | [P2] Provide application context to the remaining chat fixtures
  • reviewed 2026-10-11T06:28:28.635Z sha 6f31428 :: needs changes before merge. :: none
  • reviewed 2026-10-11T07:02:09.925Z sha a7bcd99 :: needs changes before merge. :: none
  • reviewed 2026-10-11T07:40:25.381Z sha a7bcd99 :: needs maintainer review before merge. :: none

Reviewed October 11, 2026, 4:18 AM ET / 08:18 UTC (Revision 8).

@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. labels Oct 11, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@steipete
steipete merged commit 91fd61d into main Oct 11, 2026
306 of 313 checks passed
@steipete
steipete deleted the solid2/w-cmp-4 branch October 11, 2026 09:10
@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 12, 2026
…#168833)

* refactor(ui): render MCP apps and canvas widgets with Solid

* fix(ui): complete MCP migration type and fixture contracts

* fix(ui): provide context across standalone MCP consumer tests

* fix(ui): type disconnected fixtures by their provided capabilities

* test(ui): create the isolated MCP panel frame without JSX registration
steipete added a commit that referenced this pull request Oct 14, 2026
The Solid migration in 91fd61d
(#168833) replaced the runtime consumer but retained the unused Lit
renderer. Scheduled main CI reports renderMcpServerForm as unused.
Extract only the independently proven MCP cleanup from #171558.

Keep the shared form type and register fallback English at the active
Solid form owner. Retire the old renderer test, retain cold validation
fallback coverage and existing active-form tests, and remove exactly the
three obsolete baseline entries. No markup, security, or SQL change.

Proof: source-identical PR CI passes all UI shards, i18n, baseline,
production-type, lint, and boundary checks (38562174707). Reused run
38555182940 confirms 27 active-card cases (301 ms) and the retained
locale case (17 ms); that run also passes test types. The latest unrelated
Worker/MessagePort test-type regression is separately owned. Changed-file
format/lint and diff checks pass; one Codex P2 review is clean.
LOC: production +3/-86, test +11/-24, baselines -15.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 15, 2026
The Solid migration in f8469cd
(openclaw#168833) replaced the runtime consumer but retained the unused Lit
renderer. Scheduled main CI reports renderMcpServerForm as unused.
Extract only the independently proven MCP cleanup from openclaw#171558.

Keep the shared form type and register fallback English at the active
Solid form owner. Retire the old renderer test, retain cold validation
fallback coverage and existing active-form tests, and remove exactly the
three obsolete baseline entries. No markup, security, or SQL change.

Proof: source-identical PR CI passes all UI shards, i18n, baseline,
production-type, lint, and boundary checks (38562174707). Reused run
38555182940 confirms 27 active-card cases (301 ms) and the retained
locale case (17 ms); that run also passes test types. The latest unrelated
Worker/MessagePort test-type regression is separately owned. Changed-file
format/lint and diff checks pass; one Codex P2 review is clean.
LOC: production +3/-86, test +11/-24, baselines -15.
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 18, 2026
First-parent upstream d9eba8a..facdd3c (13 PRs, including openclaw#168847
reply session coordination, openclaw#168833 Solid MCP apps, openclaw#168770 runtime
lifecycle consolidation, openclaw#168840 Solid settings pages).

Conflict:
- src/auto-reply/reply/commands-system-prompt.ts: upstream dropped the
  try/catch around createOpenClawCodingToolsAsync; took upstream's form
  and re-applied our only delta (buildInventoryContinuationToolOpts spread).

Auto-merged files carrying continuation overlay, reviewed:
- transcript-redact.ts: upstream's sanitizedField restructuring leaves our
  sanitizeTranscriptToolCallBlock projection in front of the walker intact.
- embedded-agent-utils.ts / subscribe snapshot, update, stream-rendering:
  upstream factored createAssistantStreamBlockState; display-text
  sanitization untouched.
- session.ts: upstream's rollover simplification is disjoint from our
  clearReplacedSessionRuntimeState call (continuation reset authority).
- session-updates.ts: upstream dropped the skill-snapshot expectedSession
  guard; our newSessionId/sessionKey compaction projection args kept.

Refs #1475

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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