Repository navigation
refactor(ui): simplify plugin and new session ownership - #174946
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 consolidates plugin cleanup, derives dashboard presentation state, and replaces New Session DOM searches with owned references. Example: A user selects Research and collapses a dashboard before its snapshot advances from revision 1 to revision 2.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: the ownership refactor is coherent, the CI correction preserves its assertions, and no actionable defect was found; exact-head CI remains pending. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherControl UI views consume session and plugin owners, render their projections, and release mounted content, listeners, and assets when their respective lifetimes end. flowchart LR
A[Gateway snapshots] --> B[Session and plugin owners]
B --> C[Solid projections]
C --> D[Dashboard presentation]
B --> E[New Session views]
E --> F[Owned DOM references]
B --> G[Plugin runtime asset cleanup]
C --> H[Mounted view cleanup]
Technical reviewBest possible solution: Retain the single-owner refactor and complete the existing exact-head CI gate before landing. Do we have a high-confidence way to reproduce the issue? This refactor has no standalone bug reproduction; source and supplied tests identify the dashboard-selection, picker-focus, and plugin-cleanup contracts. Is this the best way to solve the issue? The implementation consolidates responsibilities at existing owners and migrates internal callers without adding public APIs, configuration, or persisted formats. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f2556399319a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -3, Tests +180, Other -1. Total +176 across 39 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 HistoryReview history (1 earlier review cycle)
Reviewed October 16, 2026, 10:29 PM ET / October 17, 2026, 02:29 UTC (Revision 2). |
|
@clawsweeper re-review The CI corrections are pushed at e2312d6. The dashboard still asserts revision 2 while waiting safely for its optional snapshot, and the obsolete assertion allowance is removed. All 10 dashboard tests, the UI-other test-typecheck, and the assertion-safety ratchet pass. Production behavior and the prior build/performance proof are unchanged. |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Plugin dashboard selection copied reactive state through an effect, settings presentation duplicated asset disposal already owned by the plugin runtime, and New Session menus searched their own markup to restore focus. Selection now derives from its inputs, the runtime owns settings assets through its abort lifetime, and the mounted view owns only its own disposer. New Session pickers, path inputs, and folder options use owned refs with cleanup.
The Draft and Capabilities modules now use the names of their existing synchronous owners. All callers move together, the old paths are deleted, and the boot manifest is regenerated. No compatibility aliases or new state owners are introduced.
User Impact
Existing focus, cancellation, veto, origin, and authority checks remain. Tags, classes, routes, and selectors are unchanged. No intended appearance change; before/after visual screenshots are not applicable.
Evidence
ci:fullrequested for menus, focus, and shared plugin renderingThe 13 B gzip increase is a small compression change while raw startup code decreases. No new eager library or lazy-boundary change is introduced; startup remains below the strict checked budget.
Solid Refactor Checklist
The PR touches 39 logical files, including three file renames. Remaining effects synchronize imperative plugin views; owner capture mounts Solid inside foreign plugin regions. The two remaining DOM queries inspect foreign content rather than markup rendered by the querying owner.
CI Correction
Run 38992065856 found a possibly undefined snapshot access in the dashboard test and an obsolete assertion-safety allowance for
draft-place-browser.ts. The test still requires revision 2; it now waits safely for the optional snapshot. The allowance is deleted because the refactor removed the assertion. All 10 dashboard cases pass on the correction; the exact UI-other test-typecheck and assertion-safety ratchet both pass.The same old run also reported a mock-export violation in
src/cli/update-cli/update-command-service-maintenance-native.test-support.ts, outside this diff and still present on main when inspected. The replacement CI run remains authoritative; no failed run is called green.Final CI attribution
Current-head CI run 38994725052 completed with all UI unit, UI E2E, real-Gateway, typecheck, performance, and security checks passing. It remains failed solely on the unrelated CLI mock-export rule at
src/cli/update-cli/update-command-service-maintenance-native.test-support.ts:52. The fixture, checker, and mock baseline are byte-identical between the actual CI baselinef2556399319aand tested merge83c68c97d0d2. Landing uses the native inherited-failure exception; the failed run is not reported as green.