Repository navigation
refactor(ui): reactive controller consolidations - #113647
Conversation
|
Parking this PR under train 3's substantive-failure escape hatch. Exact-head CI run 30157729281 fails the gateway source-replacement contract in both the Control UI lane and the compact core/runtime/UI shard:
The same run also reports a terminal readiness failure and dead-code export failures, but the gateway replacement regression is already enough to require controller-level investigation rather than a trivial lint, format, or snapshot repair. Per the work order, no prepare or merge was attempted; the branch remains at |
|
Codex review: needs real behavior proof before merge. Reviewed July 25, 2026, 8:21 AM ET / 12:21 UTC. ClawSweeper reviewWhat this changesThis PR replaces repeated Control UI state, event, resource, and lifecycle bookkeeping with shared Lit reactive controllers for dock panels, realtime cameras, gateway-backed pages, live-stream following, and dropdown menus. Merge readiness⛔ Blocked until real behavior proof is added - 5 items remain Keep this PR open for explicit maintainer review. It carries the protected Priority: P3 Review scores
Verification
How this fits togetherThe Control UI presents browser and terminal docks, realtime chat media controls, gateway-backed administrative pages, activity/log streams, and popup menus. These surfaces consume browser events and gateway snapshots, then render and persist UI state while cleaning up listeners, requests, and media resources. flowchart LR
Interaction[User interaction] --> Views[Control UI panels and pages]
Views --> Controllers[Reactive lifecycle controllers]
Controllers --> Browser[Browser events and media APIs]
Controllers --> Gateway[Gateway snapshots and requests]
Controllers --> State[Layout, menu, and stream state]
Browser --> RenderedUI[Rendered Control UI]
Gateway --> RenderedUI
State --> RenderedUI
Decision needed
Why: The repository policy keeps Before merge
Agent review detailsSecurityNone. PR surfaceSource -217, Tests +22. Total -195 across 25 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve the intended shared-controller design only after a maintainer reviews each migrated surface for lifecycle equivalence and the contributor supplies redacted after-fix proof of representative Control UI interactions. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is presented as a behavior-preserving refactor, not a report of a current failing user workflow. Is this the best way to solve the issue? Unclear: the controller consolidation is plausible, but a best-fix judgment requires comparing each existing caller, sibling implementation, and focused test against the shared lifecycle behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bdcc5d54a5dc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
d2435cb to
7971c7e
Compare
|
Rebased and repaired at Root cause: the async gateway-scope consolidation removed DebugPage's page-owned Proof: |
|
Current-head ClawSweeper rank-up moves are addressed for
Attempt 1's only remaining failure was unrelated tooling timing noise in |
|
Merged via squash.
|
* refactor(ui): consolidate dock panel layout * refactor(ui): centralize realtime camera lifecycle * refactor(ui): centralize async gateway scopes * refactor(ui): centralize stream auto-follow * refactor(ui): centralize dropdown menu lifecycle * Revert "refactor(ui): centralize async gateway scopes" This reverts commit 04f120b. * fix(ui): align controller refactor checks
What Problem This Solves
Five control UI areas each mixed reactive state with event, resource, or lifecycle bookkeeping, duplicating controller-shaped logic across pages and making cleanup and stale-request handling harder to reason about.
Why This Change Was Made
This consolidates dock layout, realtime camera ownership, gateway request scope across four pages, stream auto-follow, and dropdown lifecycle into focused reactive controllers. Sessions-page gateway scope remains intentionally out of scope.
User Impact
There is no intended user-visible behavior change. The same UI interactions now have clearer ownership for resize persistence, camera rollback and release, stale gateway responses, follow thresholds, focus restoration, and listener cleanup, with 195 fewer net lines.
Evidence
git diff --checkand the sessions-page fence are clean atd2435cb60ac71c1f3810be1f2addf6f2d1dbdc80.