Repository navigation
refactor(ui): render MCP apps and canvas widgets with Solid - #168833
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 maintainer review before merge. What this changesThis 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.
Review scores
ProductKind: Refactor · Worth it: Yes 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherControl 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +848, Tests +601, Other +24. Total +1473 across 77 files. Added test files: 4. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 (7 earlier review cycles)
Reviewed October 11, 2026, 4:18 AM ET / 08:18 UTC (Revision 8). |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…#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
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.
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.
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]>
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
moveBeforelifetimes. Shared wizard templates and confirmation templates remain with their unported Lit consumers; the new renderers reuse those decision owners.Evidence
a7bcd99e8fd6The 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 ind4f98398412a. 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.6f314281454esupplies 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 ona7bcd99e8fd6passed 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.tspublishes a new context only fromconnectedCallback, 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.