Repository navigation
refactor(ui): project chat rendering state from its owners - #174940
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 maintainer review before merge. What this changesThis PR replaces manual chat-rendering subscriptions and revision counters with owner-scoped Solid projections. Example: Microphone activity changes from 0.2 to 0.8 while Talk mode is active.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this useful maintainer-authored refactor preserves existing owners and rendering contracts, with no actionable introduced defect found; the failing ratchet check also fails on the pinned base. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherControl UI chat components consume synchronous Gateway, configuration, submission, and microphone owners and project their notifications into rendered controls. flowchart LR
A[Synchronous domain owners] --> B[Owner projections]
B --> C[Solid chat components]
C --> D[Chat controls and voice bars]
A --> E[Ordered lifecycle events]
E --> F[Synchronous image release]
Technical reviewBest possible solution: Use the shared projection adapter for rendering while retaining synchronous domain ownership and direct ordered lifecycle subscriptions. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor rather than a reported product bug; source inspection confirms the manual rendering subscriptions it replaces. Is this the best way to solve the issue? The change follows the existing projection contract, removes superseded rendering wiring, and keeps event-driven custody with its synchronous owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against acd27635ccdc. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -2, Tests +18. Total +16 across 5 files. Added test files: 0. 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, 9:54 PM ET / October 17, 2026, 01:54 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Chat renderers still manage subscriptions and revision counters solely to redraw synchronous owner state.
User Impact
No intended visual or behavioral change. Voice bars, companion attachments, native file actions, and pending-session drafts keep their current tags, styles, and owner contracts.
Why This Change Was Made
Use owner-scoped projections for upload configuration, native Gateway state, microphone levels, and pending-session owners. Microphone levels now update the existing bar bindings without walking DOM children. Pending-session image custody still closes synchronously on Gateway/create events; image changes no longer rebuild the whole pending-session view. Request, stream, reconnect, and ordered lifecycle subscriptions remain direct.
The simplify pass keeps the existing domain owners and removes three effects. For the four touched production files: 1,507 → 1,505 LOC;
.subscribe(7 → 1;createEffect(7 → 4;untrack(0 → 0;createSignal2 → 1. Render effects, manual owner capture, native listener registrations, and production flush calls remain zero. Tests add 18 lines to the existing microphone test for source replacement, DOM identity, and disposal.Evidence
pnpm tsgo:uiNo startup files or lazy boundaries change. Per the campaign's local compute limit, no local production build, startup-byte measurement, or browser suite was run. CI owns the broad performance/build checks. No appearance change is intended; no screenshots are needed for this subscription-only refactor.
The completed CI run is red only because the mock-factory ratchet rejects
src/cli/update-cli/update-command-service-maintenance-native.test-support.ts:52. That fixture, the scanner, and the baseline ledger are byte-identical between the tested merge and its main parent8919729f0484. Running the checker against that exact baseline reproduces the same diagnostic. The CI merge changes only these five chat files. This is recorded for the authorized inherited-failure landing route; the failed check is not claimed green.