Repository navigation
refactor(ui): own chat context subscriptions in Solid - #174289
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 moves chat presentation subscriptions and picker cleanup into Solid while consolidating model-auth events into the existing Gateway listener. Example: A retained chat pane is hidden while navigation changes navCollapsed from false to true.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this PR open: the focused ownership refactor is worthwhile, but its replacement input-owner subscription drops a render invalidation and can leave composer presentation stale. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherControl UI chat runtimes consume application capabilities and ordered Gateway events, maintain synchronous conversation state, and publish frames to retained Solid views. flowchart LR
A[Application capabilities] --> B[Synchronous chat runtime]
C[Gateway events] --> B
A --> D[Solid projections]
B --> E[Parked render lifecycle]
D --> E
E --> F[Chat pane and composer]
Technical reviewBest possible solution: Keep the Solid ownership cutover and restore the pane render notification after synchronous input-owner reconciliation. Do we have a high-confidence way to reproduce the issue? Source tracing establishes that input-region changes no longer invalidate rendered active-dependent props; no target code was executed during this read-only review. Is this the best way to solve the issue? The ownership split fits the existing architecture, provided the direct input subscription preserves both synchronous reconciliation and rendering notification. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ca009ba036a8. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource -12, Tests +121. Total +109 across 6 files. Added test files: 1. 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 Reviewed October 16, 2026, 10:26 AM ET / 14:26 UTC. |
What Problem This Solves
Chat kept context subscriptions in a host controller alongside the mounted Solid presentation. Configuration and theme notifications duplicated existing watches, while model-auth events had their own Gateway listener beside the pane's ordered event owner.
The mounted runtime now owns plugin/navigation projections and picker-dismissal cleanup. Input ownership, approval reconciliation, and runtime-configuration callbacks remain synchronous and use the existing chat-state cleanup lifetime. Model-auth invalidation joins the existing Gateway listener. The context object is exposed to its rendering consumer; no new store or context fallback is introduced.
The context controller and duplicate watches are removed. Native-Gateway observation and the Board lease controller remain unchanged: the native helper belongs to an overlapping active migration, and Board lease selection must keep its synchronous hidden-pane custody. Tags, markup, styles, routes, selectors, and lazy boundaries are unchanged.
Evidence
pnpm tsgo:uigit diff --checkci:fullrequestedNo local full suites, E2E or build: rendering output and startup imports do not change. PR CI owns broad and performance proof.
Size and idiom census
Four touched production files: 2,280 → 2,268 LOC (−12). Chat-owned subscription controller objects 3 → 2. Literal controller-pattern references 19 → 21 because previously hidden notification calls become explicit synchronous callbacks;
createEffect1 → 1,untrack1 → 1, native listener references 8 → 8.Final CI result
Run 38913602480 passed with full UI, browser-extension and real-Gateway coverage. Startup JavaScript measured 339,383 B gzip across 7 requests, with 1 CSS request / 38,786 B. The lazy chat-route bundle grew 170 B gzip for the owner-bound projections; startup boundaries are unchanged. Merged as
b203feaf4d4af207f4d77862e5ed5da418ce168f.