Repository navigation
refactor(ui): align page resources with Solid lifetimes - #176397
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 aligns Control UI resources with Solid lifetimes, replaces DOM lookups with refs, and shares stream-follow behavior. Example: Expand the main agent's AGENTS.md preview, close it, and reopen it.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-directed refactor open: the pinned diff provides useful simplification, and source review found no actionable introduced defect; failing CI still needs attribution. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherControl UI components consume synchronous Gateway owners and plugin registrations, then manage rendered DOM, subscriptions, media, and browser listeners within their mounted lifetimes. flowchart TD
A[Gateway owners] --> B[Reactive projections]
B --> C[Solid page lifetimes]
D[Plugin registrations] --> C
C --> E[Rendered DOM and refs]
C --> F[Subscriptions and browser resources]
C --> G[Owned cleanup]
Technical reviewBest possible solution: Keep resource cleanup with each Solid lifetime while preserving existing synchronous domain owners and user behavior. Do we have a high-confidence way to reproduce the issue? This is a refactor rather than a bug report; review used the pinned source and supplied validation without executing target code. Is this the best way to solve the issue? The approach fits the existing ownership model: keyed scopes retire resources, refs replace owned-DOM searches, and the shared follow owner replaces duplicate scheduling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 01a806546943. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -88, Tests +56. Total -32 across 27 files. Added test files: 1. 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 18, 2026, 4:27 PM ET / 20:27 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Activity, agent previews, Debug, and Logs still retained duplicate resource lifetimes, tracking escapes, and DOM lookups after the Solid migration. Use mounted resource lifetimes, refs, and the existing stream-follow owner. Its reset operation preserves follow intent when the activity/log source changes; agent preview reopen resets fullscreen state and ARIA together.
Synchronous owners keep request authority, cancellation, and retained state. Tags, classes, routes, lazy imports, and appearance remain unchanged. Main independently landed the app/lib portion in #176420; this replacement adopts those nine files exactly from main and removes our competing proposal.
Evidence
ci:fullrun 39173437510 passes all UI units, browser, real-Gateway, lint/type/performance/security jobs. Sole failing test:src/gateway/server.session-row-deltas.integration.test.ts > capable and legacy sockets produce identical session payloads and consumer state; the exact name also times out on completed scheduled main 39172446197. Its timeout leaves a downstream temporary namespace claim. Native inherited-failure route is requested for that core failure and its aggregate only; CI is not described as green.Refactor checklist
Sixteen production files against integrated main
2eccba0e7b6cd25170aad9df916da0580dcbdf40; two coupled test files are separate.createEffectcreateRenderEffectuntrackThe retained snapshot is
activity/session-activity-view.tsx:126, namedinitialContext. Effects remain at Activity presence expiry (activity-page-view.tsx:207), media integration (session-activity-media.tsx:344), live catalog selection (agents-home/claws-catalog-dialog.tsx:575), agent route admission (agents-page.tsx:11), and Debug source/dialog synchronization (debug-overlay-content.tsx:148,debug-overlay.tsx:104). These are explicit follow-ups, not a claim that the lane-wide effect target is complete. No feature render effect, own-DOM query, or raw DOM listener remains in this touched scope.No remote leases were created. External proof/checkouts remain for coordinator cleanup under the campaign's metadata-I/O rule.