Skip to content

feat(ui): add Solid chat render lifecycle - #168657

Merged
steipete merged 2 commits into
mainfrom
solid2/p2-chat-1-main
Oct 10, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/p2-chat-1-main

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Provides the renderer boundary needed to port retained chat panes to Solid while preserving commit ordering and hidden-pane parking.

User Impact

Internal migration foundation with no user-visible change. Existing Lit consumers, host tags, CSS classes, and selectors are unchanged. The new lifecycle is exercised through test-only Solid consumers and does not depend on the Lit-to-Solid bridge.

Why This Change Was Made

Adds commit generations and afterCommit, parked projections that stop observing sources while hidden and catch up on reveal, and a separate animation-frame afterLayout phase. Callback cleanup is owned through completion, cancellation, parking, and disposal. Domain owners remain plain TypeScript.

Wiring the Solid outlet's parked-pane path follows once P2-SHELL lands (#168612). This additive change is based directly on main and includes no bridge or other retired integration-branch work.

Evidence

Check Result
pnpm test ui/src/pages/chat/solid-render-lifecycle.test.tsx --maxWorkers=1 on this main-based branch 9/9 passed; 91.23 s command wall time (67.46 s Vitest, approximately 48 ms in tests; worker startup dominated)
Previous isolated Node proof of the unchanged lifecycle patch 9/9 lifecycle tests; 429/429 chat/transcript gates, including all three WeakRef retention suites
Previous isolated typecheck, focused Solid lint, Lit ratchet, inventory, and UI build Passed; no dependency changes; no Lit/WA growth
Previous full chat E2E on the lane and its merge base Identical: 1,149 passed and 4 catalog-bootstrap read-count failures across 220 files on each revision
Catalog-bootstrap focused A/B All 8 cases passed in isolation on both revisions; full-run extra-read failures remain an inherited follow-up
Independent Codex autoreview Clean; cherry-picked patches verified identical with git range-diff

The previous full E2E comparison used lane head fccfe15a2f38 and base 035089ed0bb81 on the same isolated Linux host. Both also reported the same existing startup-JS warning (368.2 KiB against 366.1 KiB). These are prior-base results; current-head types, lint, ratchets, UI unit, and chat E2E proof comes from this PR's CI.

No visual route or state is changed, so there are no before/after screenshots for this additive foundation.

LOC Before After
New production lifecycle/projection files 0 193
New lifecycle tests 0 242
Documentation addition 0 28

Release-note context: additive Solid chat migration infrastructure; no change to the existing Lit chat behavior.

Add parked owner projections, commit generation fences, and a separate layout frame boundary while existing Lit consumers retain their adapter. Cover setup, reveal, reentrant commits, cancellation, and cleanup through Solid consumers.
@clawsweeper

clawsweeper Bot commented Oct 10, 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds Solid chat commit callbacks, parked presentation snapshots, and a separate animation-frame layout phase.

Example: No product-facing scenario changes yet.

  • Before: Existing chat panes use the Lit lifecycle adapter.
  • After: Existing panes behave identically; the Solid lifecycle is available for subsequent ports.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A coherent, useful foundation with focused in-process coverage and no identified defect; shipped consumer proof is deferred, and current-head CI remains incomplete.
Proof confidence 🦐 gold shrimp (3/6) The supplied maintainer-authored internal foundation is outside the ordinary contributor proof gate; its declared evidence exercises test-only Solid consumers, and related shell screenshots do not prove this lifecycle.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes
User problem: The planned Solid chat port needs to preserve committed-DOM ordering and avoid observing hidden retained panes.
Reason: The existing feature owner supplies a focused implementation of the documented migration boundary without changing current product behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides distinct, owner-directed Solid migration infrastructure absent from current main, with no actionable correctness or security finding.

Priority: P2
Reviewed head: ae2d1b54e2cedf33dc095563d81d5abcee9494d9

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The planned production pane integration is outside this additive foundation and has not been exercised here.
Agent review details

How this fits together

The lifecycle sits between synchronous chat state owners and Solid rendering, accepting snapshots, presentation state, and callbacks and producing retained DOM data plus commit and frame notifications.

flowchart TD
  A[Chat state owners] --> B[Owner projections]
  B --> C[Parked snapshot]
  D[Pane presentation] --> C
  C --> E[Solid DOM commit]
  E --> F[Commit callbacks]
  F --> G[Animation frame callbacks]
Loading

Technical review

Best possible solution:

Land the focused foundation after required checks complete, retaining product integration in its planned migration follow-up.

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

This is an additive migration foundation rather than a reported bug; source inspection confirms the missing Solid boundary, and no target code was executed.

Is this the best way to solve the issue?

The implementation fits the recorded migration contract by preserving authoritative owners and separating DOM commit from frame settlement.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 92a5349b3d91.

Provenance checked

  • Reactive projection ownership documentation keeps the original intent (e09de50: Expose existing owners to Solid without transferring Gateway state, mutations, or lifecycle authority into the renderer.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit e09de50 adds ui/src/lib/reactive/README.md:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e09de50421ef; files: ui/src/lib/reactive/README.md)

PR surface

Source +193, Tests +242, Docs +28. Total +463 across 4 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 2 193 0 +193
Tests 1 242 0 +242
Docs 1 28 0 +28
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 463 0 +463

Review metrics

Metric Value Why it matters
Production versus test LOC Production +193; tests +242 Growth supplies the missing Solid lifecycle boundary and focused coverage for ordering, parking, and resource ownership.

Labels

Label changes:

  • add P2: Useful planned migration infrastructure with no demonstrated urgent user-facing regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Useful planned migration infrastructure with no demonstrated urgent user-facing regression.
  • 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.

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.

Reviewed October 10, 2026, 5:28 PM ET / 21:28 UTC.

@steipete
steipete merged commit de691c1 into main Oct 10, 2026
80 checks passed
@steipete
steipete deleted the solid2/p2-chat-1-main branch October 10, 2026 21:33
@steipete

Copy link
Copy Markdown
Contributor Author

Landed as de691c1ec3c0f4e84e449a7b9d1991504fd9daed and verified on origin/main.

Exact-head proof: CI run 38087527732, head ae2d1b54e2cedf33dc095563d81d5abcee9494d9.

Check Result
Production/test types, lint, guards, baseline ratchets Passed
All three selected UI unit shards Passed: 1,653 files, 22,698 tests; 6 existing skips
New lifecycle suite in CI 9/9 passed under Bun; 0.033 s test execution, 0.440 s module event duration
Local Node lifecycle suite 9/9 passed; 91.23 s command wall time
Selected Control UI E2E shard 5 files / 12 tests passed, including chat ACK ownership and desktop/mobile route readiness; 24.50 s Vitest duration
Control UI performance and i18n Passed
Aggregate CI gate and security checks Passed

CI did not select the broad chat E2E inventory, real-Gateway E2E, WebKit, or native/platform lanes for this additive change. Prior full chat A/B evidence and its inherited catalog-bootstrap failures remain documented in the PR body; no extra CI runs were dispatched.

Aggressive landing per Peter: ClawSweeper review was still pending and had posted no findings at merge time. It is advisory. The normal pinned squash merge succeeded without an admin override or auto-merge.

Production LOC: 0 → 193; tests: 0 → 242; documentation: +28. Existing Lit consumers are unchanged. Solid outlet parking integration remains the follow-up after #168612.

steipete added a commit that referenced this pull request Oct 11, 2026
… entries

#168576 (shared presentation primitives) and #168657 (Solid chat render
lifecycle) land before their page and chat consumers, so Knip reported
18 files and their exports as unused in scheduled run 38095292949.
Register them as ui production entries with the existing removal
condition (drop each with its first production importer), and stop
exporting SettingsSegmentedOption, which is only used in-module.

Both deadcode:full passes now report only GatewayApprovalEventPublisherV2,
which belongs to #168482.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
* feat(ui): add Solid chat render lifecycle

Add parked owner projections, commit generation fences, and a separate layout frame boundary while existing Lit consumers retain their adapter. Cover setup, reveal, reentrant commits, cancellation, and cleanup through Solid consumers.

* fix(ui): declare render lifecycle callbacks receiver-free
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
… entries

openclaw#168576 (shared presentation primitives) and openclaw#168657 (Solid chat render
lifecycle) land before their page and chat consumers, so Knip reported
18 files and their exports as unused in scheduled run 38095292949.
Register them as ui production entries with the existing removal
condition (drop each with its first production importer), and stop
exporting SettingsSegmentedOption, which is only used in-module.

Both deadcode:full passes now report only GatewayApprovalEventPublisherV2,
which belongs to openclaw#168482.
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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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