Repository navigation
refactor(ui): retire the chat pane host lifecycle - #174538
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR replaces chat’s simulated host lifecycle with a Solid-owned publication and commit lifecycle. Example: Open /chat when the optional link-preview module cannot load.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness⛔ Needs changes before merge - 2 items remain Keep open: this maintainer-directed refactor is useful, but the lifecycle cutover leaves test consumers broken. Priority: P3 Before merge
Findings
Agent review detailsHow this fits togetherThe Control UI chat pane combines synchronous session and resource owners with Solid rendering; bridge properties and domain notifications enter it, and rendered content, commit completion, and resource cleanup leave it. flowchart TD
A[Pane bridge properties] --> B[Synchronous chat runtime]
C[Gateway and Board events] --> B
B --> D[Solid pane lifecycle]
D --> E[Parked render projection]
E --> F[Chat DOM]
F --> G[Commit effects and completion]
Technical reviewBest possible solution: Complete the test-consumer cutover while keeping publication in Solid and synchronous session resources in their existing owners. Do we have a high-confidence way to reproduce the issue? No current-main user bug is claimed; exact-head CI annotations independently confirm the introduced test-consumer failures. Is this the best way to solve the issue? The ownership split follows the established Solid migration direction, but its test callers must migrate with the removed host methods. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fdc6a76b835c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -30, Tests +80. Total +50 across 46 files. Added test files: 0. View PR surface stats
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 Reviewed October 16, 2026, 2:54 PM ET / 18:54 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* refactor(ui): own chat pane publication in Solid * test(ui): adapt pane lifecycle fixtures to owner methods * refactor(ui): preserve the existing chat preview provider * test(ui): retain collaborator terminal diagnostics
What Problem This Solves
Solid rendered chat while
ChatPaneBasestill simulated a Lit host with a controller registry, decorated fields, a changed-properties map, and DOM forwarding methods. That left two rendering lifecycles around the same synchronous chat owners.createChatPanenow owns readiness, coalesced publication, and the commit-completion fence.ChatPaneStateOwnerkeeps synchronous facts and resources with explicit start/dispose operations. The genericControllerHostandviewStateexports are deleted; chat has no remaining host-adapter dependency.User Impact
Session switching, reconnect, retained reader position, Board leases, realtime/media teardown, composer focus, tags, classes, and layouts retain their existing contracts. The existing hovercard provider and lazy page boundary are preserved.
The guest-session fixture waits for the effort picker to become enabled after model selection. Capturing
sessions.patchis not completion of model reconciliation; clicking the disabled summary could silently do nothing. Product picker behavior is unchanged.Ownership And Cutover
Startup attaches the synchronous domain owners and drains publication before mounting children. Four explicit input transitions replace the generic changed-properties map. Board subscriptions refresh outside parked rendering. Session replacement retires old state effects before attaching the next state. Reconnect starts the retained transcript owner. Disposal releases Board/media/realtime custody and settles commit waiters. Commit still clears the current fence before post-render work, commits chat effects, then resolves the captured waiter.
All 41 former decorated fields were audited. The state constructor receives the runtime's session identity explicitly, independently of custom-element properties. This preserves each split pane's initial layout and the prior absence of width-based fitting at that boundary.
The shared
solid-controller-host.tstype contract remains for six non-chat production consumers in sidebar, dock layout, session-data, session-organizer types, and subscriptions. By the final main census another lane had removed its last runtime user, so the module is now type-only. Chat has no production import of that contract. The landed controller guard rejects new consumers; remaining chat lifecycle aliases are test fixtures.Evidence
pnpm tsgo:ui--maxWorkers=1pnpm ui:buildand strict performanceci:fullon this PR; final production-head CI 38952923970 passed all UI units, types, lint, performance and 8/9 UI E2E shards. Remaining failures are detailed below. A test-only diagnostic update gets fresh CI.The first integrated lifecycle run caught a lost constructor session key: passing only the element selected another split pane's saved layout. Both existing regression cases passed after supplying explicit identity, and both pass in the final 26-test run. A separate audit preserved the old width behavior. Host tags, markup, and styles are unchanged.
Size And Idiom Census
Across 25 touched production files: 11,656 → 11,623 LOC (−33). Controller-pattern references 96 → 16; the remaining references are synchronous domain publication callbacks.
createEffect2 → 2;untrack2 → 3 (one documented lifetime-stable runtime identity); native listeners 8 → 8. Literal DOM-query references 8 → 9 because the constructor's explicit query callback replaces the former bound host facade; it adds no query to the user flow.The 50 changed paths include mechanical test adaptations and the generated boot manifest. The production cut removes the registry, decorators, facade, and duplicated lifecycle ownership without flattening the synchronous domain hierarchy or introducing another store.
CI Follow-through
The first full run exposed missed test-only consumers of the removed host lifecycle: obsolete
performUpdatestubs, acommitRenderspy, retained-presentation assertions against removed changed-property arguments, and a private probe adapter still looking uprequestUpdateon the domain runtime. These now exercise the explicit owner operations; geometry retains its before-paint and render-count assertions. The fixture proxy also uses local mapped keys instead of reassigning parameters. Independent review of the repair found no actionable P0–P2 findings. No production behavior or production LOC changed in this repair.The optional-hovercard cleanup was removed from this PR after full E2E found cold-upgrade regressions. The final code preserves the merge base’s
LinkReaderHovercardcomponent and bindings. Its existing optional-chunk failure remains a separately reproduced main issue, outside this lifecycle cutover.Final production-head failure attribution and diagnostics
CI 38952923970 tested
0c7f095a708625c460e0863da9888327367ec859merged into base746a52a3618edfaf6890262ceaf23593b5470c7f(edf8bd35697cd840964dd134b79c7724ed5867dd).keeps title hints when the optional hover runtime cannot loadalso fails with the identical line-238 missing-link signature in scheduled main 38948575054. Original provider and bindings remain intact.keeps same-id owners separate with an empty current sessionleaves two Gateway work roots during browser cleanup; later variants cascade. The exact base reproduced expected 0/actual 2 at the same cleanup boundary. Its first cold-start case also timed out locally; that separate timeout is not claimed as the CI failure. This path visits/usage, not chat.preserves reader intent through remote queue, stream, and persistenceonce left the writer's Stop button visible inreading-typed; both exact-base and production-head local runs subsequently passed all four modes. No missed-publication path was found in the independent lifecycle audit. Passing replays are not claimed as a fix or proof of inheritance. Ordinary PR CI omitted the raw protocol artifact needed to distinguish terminal delivery from stale state. The test-only follow-up now writes synthetic send IDs and terminal state/sequence metadata to logs before teardown, retaining all existing assertions. Its changed-file run passed all four modes, with typecheck, lint and independent review clean.No production source changed in the diagnostic follow-up.
Landing evidence
Final run 38960070918 on
d16011a1c0d45423bbb287fd232c7e9b5b375963completed. Both real-Gateway shards (including collaborator scroll and usage), all UI unit shards, types/lint, performance, and the other eight UI E2E shards passed. The only failing test is the inherited optional-hover fallback named above; the aggregate CI gate is downstream of that one job. Native recovery uses the authorized inherited-failure exception and does not mark that failed check green.Verified closeout
Merged as
e4f73867c4eb39fd8b5e00bba23cd43ac96fb647. Verified reachable from mainb8bea44d143f2af90ddb6f81cd0af517b4e6e2d8; reconstructing the merge from its actual final parent and the reviewed head yields the exact landed tree. Native recovery completed and posted its receipt. The final main census using the Solid checklist filters reports controller refs 231, effects 329, render effects 15, untrack 303, native listeners 547, and DOM-query lines 167. The checklist includes test-support files; excluding those leaves six non-chat production consumers of the type-only legacy host contract.