Repository navigation
refactor(ui): migrate chat transcript rows to Solid 2 - #168887
Conversation
Keep transcript caching and virtualizer ownership in the existing TypeScript owners while rendering keyed message, stream, media, and position views in Solid. Preserve retained DOM, focus, playback, and disclosure state across updates through stable Lit interop boundaries.
|
🦞👀 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 moves chat transcript rows, streaming replies, attachment presentation, and conversation navigation from Lit to Solid 2. Example: An image label changes from Before to After while its open-image button has keyboard focus.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed migration remains distinct from main, the previous fixture blocker is fixed, and exact-head CI passes; no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway messages enter existing TypeScript transcript and session owners, pass through the virtualizer, and render as retained Solid rows with adapters for remaining Lit content. flowchart TD
A[Gateway messages] --> B[TypeScript transcript owners]
B --> C[Transcript projections]
C --> D[Session virtualizer]
D --> E[Retained Solid rows]
E --> F[Legacy content owner]
E --> G[Browser transcript]
F --> G
Technical reviewBest possible solution: Land the retained Solid transcript renderer while preserving the existing domain, virtualizer, and media-admission owners. Do we have a high-confidence way to reproduce the issue? This is a planned refactor; source, mounted-owner coverage, and supplied browser captures establish the changed rendering path without asserting a current-main product defect. Is this the best way to solve the issue? The staged cutover appropriately preserves plain TypeScript authority and existing media contracts, with one shared lifecycle boundary for remaining Lit content. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a81bb54f094f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. 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 (11 earlier review cycles; latest 8 shown)
Reviewed October 11, 2026, 3:13 PM ET / 19:13 UTC (Revision 12). |
Keep Lit rendering behind one retained interop owner and restrict the migration exception to that exact module. Preserve poster mock exports, stop rail touch input before native history listeners, and align reveal assertions with layout settlement.
Integrate bubble-mode rendering while retaining native message, activity, stream, and work-summary components. Preserve canvas widget identity across equivalent message snapshots and keep focused work toggles mounted through expansion updates.
Resolve current-main integration by using the canonical link prefetch owner from native markdown refs. Preserve MCP after-commit restart ordering and merge current tooltip property contracts.
Adopt the landed SVG bridge and tool settling while preserving transcript focus and cleanup. Run legacy template commits outside the caller Solid owner so avatar directives can publish their own state without halting rendering.
Resolve renderer import cycles and Solid JSX types, retain async question callbacks, share streaming media rendering, and preserve exact JSON text. Keep entry refs, image footer controls, moved transcript roots, empty restoration, and row memoization under their existing owners. Exercise real mounted Solid boundaries in the retained regression fixtures.
First-parent upstream e63e209..0b0c2f2 (93 commits, including openclaw#169144 subagent work across gateway restarts, openclaw#169251 worker write transaction overhead, openclaw#169306 question-answer custody, openclaw#169305 fallback ordering, openclaw#169339 owner-state rechecks, openclaw#169235/openclaw#168887 Solid UI ports). Stops before openclaw#169315 (fp#248, agent schema), which is step 59 on its own. Conflicts: - embedded-agent-runner/run/payloads.ts: upstream gates the assistant-texts branch on !assistantForPayload (an empty canonical terminal stays authoritative); kept our per-hop raw-answer split for earlier continuation signals ahead of it. - session-reset-cleanup.test.ts: upstream's retainEmbeddedSessionPromptState disposable; kept our async clearSessionResetRuntimeState call. - plugin-sdk-surface-report.mts: upstream 3674/2135, ours +11/+4. - config-baseline counts/sha256 and worker-access inventory regenerated on the merged tree (core +17 fork config entries, as before). Auto-merged files that carry continuation overlay (19, incl. attempt-execution, agent-runner-fallback-candidate, session.ts, status-message, stream/update handlers) keep the overlay byte-for-byte. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What Problem This Solves
Moves transcript rows, streaming messages, attachments, and the position rail onto Solid 2 while preserving the chat behavior and existing selectors during the staged Control UI migration.
User Impact
Settled rows, focused controls, expanded disclosures, media players, and cached sessions retain their identity across updates. Reply navigation, live tool output, plugin tool replacements, comment pins, and avatar artwork keep working through the mixed Solid/Lit rendering boundary.
Why This Change Was Made
The transcript keeps the existing plain TypeScript domain owners, virtual-core virtualizer, and session cache. Each session has one retained Solid root; keyed native rows consume projections. Remaining Lit callers use adapters, and a single legacy-content owner controls mounting, connection, and disposal. No dependencies or public configuration changes are introduced.
Integration repairs preserve current main's bubble mode and landed Solid leaf/tool components. They also restore plugin context, use the existing waiting-subagent adapter, defer comment-pin attachment until its host is inserted, keep static loading content during draft updates, insert inert avatar artwork before cloning it, update a hidden outlet’s node handoff before insertion, and read live announcements after the row owner records them. Shared Markdown action types live in a plain TypeScript leaf, with ambient tag contracts in the shared declaration owner, so SDK declarations do not pull renderers. Image options are captured with each keyed slot to prevent retiring children from reading replacement policy. Legacy tool-view registration is loaded with the chat route; this accepts its existing bundle cost without adding a second asynchronous registration lifecycle.
Evidence
Final CI passed: all three UI unit shards, both selected UI E2E shards, WebKit component tests, all type lanes, lint, ratchets, architecture and performance. The three WeakRef retention suites passed. UI unit shards took 285/314/338 s; selected E2E shards 223/217 s.
Candidate:
fa0ac641f2820a81322c9384b257c11d72d956d6.Tests use
node scripts/run-vitest.mjs <file> --maxWorkers=1to avoid shared-worktree install reconciliation. Existing assertions were retained while fixtures now mount and settle the actual Solid output. Test times above include the local wrapper; CI seconds are supplied by each exact-head job. Earlier valid proof is reused only for unchanged inputs. A post-merge test-startup failure from the newly required@openclaw/proc-safepackage reproduced identically on main. Reusing its exact already-cached 0.2.0 package in this task’s private install resolved that tooling failure without reinstalling shared dependencies. A nonfatal nested legacy flush diagnostic remains; the owning outer flush completes the render.The one Testbox attempt (
tbx_01m4kyc9f454278jh5617zbrar) admitted no host within 15 minutes and ran no checks. It is stopped, with no host. Heavy proof uses PR CI per the work order; no alternate provider, local build, local E2E, Docker, or OrbStack was used.Changed-file LOC against integrated main
6e4d1d5f2a75e24733e655257b4624f8a90c9234: UI production 11,366 → 13,875 (+2,509; 73 paths), tests and support 22,807 → 23,904 (+1,097; 47 paths), ratchet tooling 164 → 168 (+4). Generated i18n metadata is excluded. The increase is the cost of native views and explicit lifetimes alongside required interim adapters; this PR does not claim a net reduction.Visual proof
Before: main
6e4d1d5f2a75e24733e655257b4624f8a90c9234, Mantis run 38158546646. After: runtime candidate6a6b6b3f6621ea95da57e6aa82e983dfbc19fcc6, Mantis run 38162417331. Both browser flows passed 2/2. The final commit fixes the missing session-fixture subscription and waits for the existing hover animation; it changes only test fixtures; a scoped Git diff verified identical UI production inputs, so this capture is reused.Both screenshots are inspected and synthetic. They show the same active-run state (the changing working phrase is expected), not a completed reply. Host restrictions prohibit local
ui:parity; these are browser-flow screenshots, not a pixel-diff parity claim.