Repository navigation
refactor(ui): render chat tools and attachments with Solid - #168739
Conversation
Replace the tool output, CI, ClawHub, HTML, SVG, and session-diff Lit elements with Solid owners and bridge remaining Lit callers. Preserve lazy expansion, request generations, retained native controls, and object URL lifetimes. Keep unported stateless helper contracts until their callers migrate.
|
🦞👀 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 chat tools, attachment previews, CI controls, and Review panels with Solid components. Example: Expand the completed edit to src/second.ts.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this is a useful Solid migration, the previous MCP fixture finding is resolved, and no new actionable defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI components consume transcript records, attachment sources, and Gateway results, then render tool disclosures, file previews, CI controls, and session diffs. flowchart TD
A[Transcript records] --> C[Chat rendering adapters]
B[Gateway domain owners] --> D[Solid components]
C --> D
D --> E[Tool and Review panels]
D --> F[Attachment previews]
Technical reviewBest possible solution: Land the reviewed Solid cutover through the native workflow, keeping the unchanged MCP fixture repair as a separate follow-up. Do we have a high-confidence way to reproduce the issue? This is a refactor; source confirms the remaining Lit implementations on current main, and no target code was executed during this review. Is this the best way to solve the issue? The port follows the existing Solid bridge contract, removes replaced Lit elements, and preserves plain TypeScript domain owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dd053f96aa30. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1293, Tests +546, Docs +1, Other +245. Total +2085 across 78 files. Added test files: 5. View PR surface stats
Review metrics
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 (12 earlier review cycles; latest 8 shown)
Reviewed October 11, 2026, 6:09 AM ET / 10:09 UTC (Revision 13). |
Keep Lit-owned child containers stable while collapsed content stays disconnected. Restore empty outcome adapters, tighten JSX types, and align coupled tests with bridge commits. Extend synthetic parity captures and record identical base/head checks for inherited CI failures.
|
Synthetic tool-card parity: Lit merge base The broader capture continues below after the attachment fixture is corrected; no real Gateway or private data is involved. |
Restore display: contents for SVG and HTML preview hosts. Keep sandbox capture compatible with Playwright service-worker instrumentation and compare metadata E2E behavior on base and head.
|
Synthetic desktop-light parity: Lit base Pairs below are ordered collapsed tool, expanded tool, SVG, HTML preview, and Review diff; each pair is before then after. Reused tool-ID uniqueness is covered by the unit contract, not this visual scene. |
|
Synthetic mobile-light parity: Lit base Pairs below are ordered collapsed tool, expanded tool, SVG, HTML preview, and Review diff; each pair is before then after. Reused tool-ID uniqueness is covered by the unit contract, not this visual scene. |
Remove the completed temporary capture workflow and unused attachment callbacks. Preserve transcript attachment-source assertions in a focused sibling suite so the message test file shrinks below its inherited line count.
Use the modal fixture frame boundary before checking return focus after removal. Preserve the existing dismissal and focus assertions across deferred Web Awesome cleanup.
|
Aggressive landing per Peter: using the inherited-failure exception for The remaining failure is the main-owned MCP fixture context mismatch introduced by the MCP Solid migration. Running the same The actionable raw-details fixture finding is fixed in |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…168739) * refactor(ui): render chat tools and attachments with Solid Replace the tool output, CI, ClawHub, HTML, SVG, and session-diff Lit elements with Solid owners and bridge remaining Lit callers. Preserve lazy expansion, request generations, retained native controls, and object URL lifetimes. Keep unported stateless helper contracts until their callers migrate. * ci: capture chat tool visual parity * fix(ui): preserve lazy chat children across the Solid bridge Keep Lit-owned child containers stable while collapsed content stays disconnected. Restore empty outcome adapters, tighten JSX types, and align coupled tests with bridge commits. Extend synthetic parity captures and record identical base/head checks for inherited CI failures. * chore(ui): retire Lit assertion allowances and fix SVG capture source * fix(ui): preserve preview host layout across the Solid bridge Restore display: contents for SVG and HTML preview hosts. Keep sandbox capture compatible with Playwright service-worker instrumentation and compare metadata E2E behavior on base and head. * refactor(ui): finish chat migration proof cleanup Remove the completed temporary capture workflow and unused attachment callbacks. Preserve transcript attachment-source assertions in a focused sibling suite so the message test file shrinks below its inherited line count. * test(ui): await table dialog focus restoration Use the modal fixture frame boundary before checking return focus after removal. Preserve the existing dismissal and focus assertions across deferred Web Awesome cleanup. * fix(ui): reuse shared dropdown JSX contract * ci(ui): compare interrupted chat shard on base and head * test(ui): provide application context for raw MCP details
First-parent upstream 069a5b8..75df19c (17 commits, including openclaw#169043 entry lifecycle queries, openclaw#169034, openclaw#169058 memory index facts, openclaw#168950, openclaw#169019 telegram queued history replies, openclaw#168790/openclaw#168756/ openclaw#168759/openclaw#168739 Solid UI ports, openclaw#168813 codex metadata/startup lifecycles, openclaw#168981, openclaw#168992 agent preparation SQLite work). Only conflict: worker-access inventory, regenerated (631 files, 2436 calls). Auto-merged files carrying our overlay, reviewed: snapshot.ts (upstream's block-reply reconcile reads through index-1; our per-part continuation-marker strip in extractAssistantStreamSnapshot unchanged), codex side-question.ts (upstream's request-scoped client lease; our disableContinuationTools and the extracted dynamic-tool-call helper unaffected), subagent-registry-restore.ts, session-sharing-store.native.ts. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
























What Problem This Solves
The Control UI's tool results, attachment previews, and review panels still depended on Lit during the Solid 2 cutover.
User Impact
No intentional visual or behavioral change. Tool details stay lazy, reused tool IDs retain independent tabs, full-output reads reject stale results, and HTML/SVG resources keep their owning lifetimes.
Why This Change Was Made
Replace eight registered Lit elements and the tool-card rendering helpers with Solid. Existing Lit callers use the bridge; stateless PR/publication and composer attachment helpers remain with their unported callers. Domain state remains plain TypeScript. Remaining Web Awesome tags consume the shared JSX declarations. The shared dropdown adapter also preserves main’s connectivity-only focus behavior after integration.
Direct Solid mounting exposed initial loader effects running during a parent render and SVG observation starting before host attachment. The port separates those imperative effects, preserves source/connection fences, and proves direct mounting. Session-diff requests also retain their original dependency equality, so unrelated action callbacks do not refetch. Mixed Lit/Solid child content uses a stable Lit-owned container, preventing expansion from losing children captured before insertion while retaining collapsed laziness. Visual comparison caught the old Lit base’s implicit
display: contents; the SVG and HTML hosts now preserve it through scoped CSS.Evidence
Independent Codex review completed with no actionable P0/P1 findings. A late CI run exposed two focus-timing assertions in unchanged Markdown-table tests; integrating main’s canonical modal/test fix resolved that overlap without retaining a competing implementation. Focused lint, formatting, i18n baseline verification, and whitespace checks passed.
1d03345d56b9The isolated early tests used the exact shared primitive source while its PR was in flight; the primitive is now on the branch's main base. PR CI supplies final-head proof. Testbox stayed queued for 15 minutes without a runner and was stopped; no alternate provider or local E2E was used.
The temporary GitHub-hosted capture workflow has been removed after publishing its evidence. No Docker or E2E ran on the shared Mac.
Screenshots
Inspected and verified original PNGs are embedded in the desktop proof and mobile proof, and attached in the originating chat. Each contains before/after pairs for collapsed tools, expanded tools, SVG attachments, sandboxed HTML previews, and Review diffs. Base
31b1db627305and candidate57340250db2ehave zero changed pixels and zero raster-noise pixels across all ten comparisons. Eight unique tab IDs for reused calls are proved by the unit contract; the screenshots show one visible tool result.Current UI shard interruption
On
0407dc0cc3bbfa54542fcf3938b49bab2405618c,checks-ui (2/3)was interrupted twice by runner shutdown/SIGTERM (attempt 1, attempt 2). The attempts recorded 556 and 549 passing modules respectively, with no failed module summary. Both also loggedREACTIVITY_HALTEDduringsessions-page.scope-race.test.ts; that is a real diagnostic, not passing coverage. The originating exception is absent from the logs. Theretire: falsecase reports success afterward, while the file never completes. The later borrower cleanup error follows the runner shutdown.The sessions test, modal, bridge, and helpers are unchanged from merge base
d4e9d09e9422. The same focused reproduction passed all eight cases on candidate (55.74s) and pinned base (111.04s):The matched hosted shard comparison completed successfully: base
d4e9d09e9422passed 557 files / 7,236 tests in 249.33s; head9fdf399b836cpassed 558 files / 7,239 tests in 319.89s, with three existing skips each. Both completed the sessions file and emitted zeroREACTIVITY_HALTEDdiagnostics. This does not explain the earlier runner shutdowns; it supplies complete shard coverage on both revisions. No assertions were weakened. The temporary diagnostic workflow was removed.The subsequent main integration (
c3c01dfbabc1) added a synchronous chat-bubble assertion that failed immediately after expanding the now-Solid tool card. The exact failure reproduced locally. The existingwaitForSolidhelper now awaits the visible tool contents before the same assertion; both bubble tests pass. No production behavior changed for this fixture repair. Final head:1d03345d56b91576fad675abb9f395d50e093f71.Inherited MCP context fixture failures on current main
After integrating main
c3c01dfbabc1, CI run 38128106248 exposed missing application providers in unrelated chat renderer fixtures. Main's MCP migration 91fd61deb4a4 makesMcpAppCatalogContentandMcpAppViewconsume the required ApplicationContext. Production has that provider; plain-div test mounts do not.The same owning fixture command on both base
c3c01dfbabc1and candidate0027c35f8380produces 146 passing assertions and 24 identical unhandledContextNotFoundErrorerrors, exit 1, rooted inMcpAppCatalogContent:Base Vitest duration: 8.25s; candidate: 7.42s. The MCP renderers, chat-view test, catalog test, and responsive browser test are byte-identical to the base. The CI browser failure
keeps inline MCP App reloads transparent without changing dashboard surfacesreports the same missing-context cause. No application-context contract was relaxed.Our own raw-details fixture was affected too; it now uses the canonical
createApplicationContextProvider(createInitializationContext()). Its single-file reproduction went from one passing assertion with one unhandled error to a clean pass (7.69s before / 10.23s after). That fixture repair is included in1d03345d56b9. On this final head, UI shards 1 and 3 pass; shard 2 records the same missing-context browser failure plus 280 related unhandled errors, with 559 other files passing. Types, lint, ratchets, and all nine UI E2E shards pass. The unrelated base-owned fixtures remain a follow-up; the aggregate CI gate is red solely because shard 2 is red. Landing uses Peter’s explicitly authorized inherited-failure exception. Final failed shard.Earlier inherited E2E failure
The same command was run on captured base
31b1db627305and candidate57340250db2ein the hosted proof job:Both returned 6 failed / 10 passed, with the same six request-count assertions. Each already displays the updated model but expects three
models.listcalls where the simplified main cache performs two. Metadata counts match. The test and its cache/refresh owners are unchanged by this PR; main's display-bookkeeping simplification is retained. The unrelated core lint, export-name, and SDK-surface checks all pass on both this base and candidate. The A/B logs and result JSON are in the run's artifact.Size
Touched production: 8,228 → 9,521 LOC (+1,293, counting whole touched production files including CSS). Tests/support: 12,203 → 12,749 LOC (+546). The large message test shrinks by 62 counted lines through extraction of three unchanged attachment-source cases; unused callback-only test API was removed. Growth comes from explicit reactive components and typed temporary bridge adapters; no new package dependency or domain owner was added.