Skip to content

refactor(ui): migrate chat transcript rows to Solid 2 - #168887

Merged
steipete merged 13 commits into
mainfrom
solid2/w-chat-3
Oct 11, 2026
Merged

steipete merged 13 commits into
mainfrom
solid2/w-chat-3

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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.

Proof Result
Six files previously failing after integration All pass after targeted owner/fixture repairs
Full chat-view file 148 cases passed after final boundary repair; 12.63 s
Transcript invalidation, A→B→A cache, parked/retained rows 24 cases passed after final boundary repair; 9.08 s
Native group/media identity and shared legacy-content boundary 2 / 6 / 7 cases passed; eager root-replacement regression failed before repair
Comment-pin attachment and draft-only layout 1 case passed; 5.89 s
Reply navigation and highlight lifetime 27 cases passed; 6.11 s
Static avatar hats Focused file passed; 4.64 s
Session identity fixture and asynchronous subscription cleanup 21 cases passed, no unhandled errors; 7.85 s
Message/tool/canvas, duration, native transcript rendering 97 / 8 / 42 cases passed; single-commit announcement regression failed before repair
Position rail and touch isolation 20 cases passed in earlier unchanged-owner proof
Focused lint, formatting, diff check, i18n verification Passed
Independent review Final integrated candidate and both fixture follow-ups clean at P0–P2
Types, ratchets, UI unit/E2E shards, quantitative focus/typing, three WeakRef retention suites Exact-head CI passed

Tests use node scripts/run-vitest.mjs <file> --maxWorkers=1 to 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-safe package 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 candidate 6a6b6b3f6621ea95da57e6aa82e983dfbc19fcc6, 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.

Before: transcript and active-run indicator on main

After: Solid transcript and active-run indicator

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.
@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.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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 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.

  • Before: Lit preserves the focused control and displayed image during the update.
  • After: The keyed Solid view preserves the same control and image while updating the label.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The approved migration has relevant browser evidence, meaningful retained-owner coverage, passing exact-head CI, and no remaining actionable finding.
Proof confidence 🐚 platinum hermit (4/6) The ordinary contributor proof gate does not apply to this maintainer-authored refactor; inspected browser screenshots show the migrated transcript and active-run state, while mounted-owner tests and passing selected UI E2E support identity and lifecycle behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Chat focus, playback, disclosures, navigation, and cached sessions must retain their behavior during the renderer migration.
Reason: Maintainer authorship establishes the direction, and the change completes a distinct migration stage while retaining existing behavioral owners.

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
Reviewed head: fa0ac641f2820a81322c9384b257c11d72d956d6

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway 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
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit de691c1 adds ui/src/pages/chat/solid-render-lifecycle.ts:25 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: de691c1ec3c0; files: ui/src/pages/chat/solid-render-lifecycle.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • 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: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a planned renderer migration with normal improvement value and no demonstrated urgent user-facing outage.
  • 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: 📸 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 execution lanes are retired.

History

Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-11T06:21:30.262Z sha 172b5f7 :: needs changes before merge. :: [P2] Retain work and activity components across guard invalidation | [P2] Declare the poster mock's isolation contract
  • reviewed 2026-10-11T08:38:15.709Z sha 2ab257b :: needs changes before merge. :: [P1] Render streaming media through the shared message owner | [P2] Retain work and activity components across guard invalidation | [P3] Carry the existing minute refresh into native timestamps
  • reviewed 2026-10-11T10:50:56.516Z sha f8b3ce3 :: needs changes before merge. :: [P1] Render streaming media through the shared message owner | [P3] Carry the existing minute refresh into native timestamps
  • reviewed 2026-10-11T11:12:18.422Z sha 1cdbf97 :: needs changes before merge. :: [P1] Render streaming media through the shared message owner | [P3] Carry the existing minute refresh into native timestamps
  • reviewed 2026-10-11T12:02:28.714Z sha 18e7afc :: needs changes before merge. :: [P1] Render streaming media through the shared message owner | [P3] Carry the existing minute refresh into native timestamps
  • reviewed 2026-10-11T12:41:16.853Z sha 18e7afc :: needs changes before merge. :: [P1] Render streaming media through the shared message owner | [P3] Carry the existing minute refresh into native timestamps
  • reviewed 2026-10-11T17:25:45.788Z sha 15de8a2 :: needs changes before merge. :: [P2] Adapt attachment status assertions to native text nodes
  • reviewed 2026-10-11T18:19:33.232Z sha 6a6b6b3 :: needs changes before merge. :: [P2] Supply the session fixture subscription contract

Reviewed October 11, 2026, 3:13 PM ET / 19:13 UTC (Revision 12).

@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 11, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Oct 11, 2026
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.
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 11, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 11, 2026
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.
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 11, 2026
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.
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 11, 2026
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.
@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
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 20, 2026
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]>
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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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