Repository navigation
refactor(ui): use native plugin presentation state and lifecycle - #179352
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 replaces dashboard object-signal updates with a shallow derived store and pairs plugin focus registration with settled lifecycle cleanup. Example: Select the Research tab, collapse the dashboard, then receive board revision 2.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-directed refactor preserves existing ownership contracts, with no actionable source finding; current CI failures still need attribution. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI plugin presentation layer consumes scoped board-provider snapshots and plugin registrations, renders dashboard and replacement views, and releases mounted handles when their owner ends. flowchart LR
Gateway[Gateway snapshots] --> Provider[Board provider lease]
Provider --> Presentation[Dashboard presentation store]
Presentation --> Board[Board view]
Registry[Plugin runtime registrations] --> Host[Plugin view host]
Host --> Lifecycle[Settled setup and cleanup]
Technical reviewBest possible solution: Retain the focused store and lifecycle conversion while preserving provider authority, scope identity, manual choices, and teardown behavior. Do we have a high-confidence way to reproduce the issue? No broken user behavior is claimed; this is a behavior-preserving refactor, and no target code was executed during review. Is this the best way to solve the issue? The conversion uses existing Solid primitives and existing domain owners, with a complete seed and shallow scope identity rather than a parallel presentation implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 24ff45902f1c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +4. Total +4 across 2 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 Reviewed October 21, 2026, 6:23 AM ET / 10:23 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
Whole-scope Solid 2 census, base
2db57c72→ this head. Counts are before → after; unchanged values appear once. “Candidates” means local presentation work, excluding synchronous domain-owner APIs and deliberate foreign-DOM adapters.Whole-scope production LOC: 91,586 → 91,590 across 566 files. Plugin totals: 12 intrinsic handlers; cleanup calls 4 → 3; signals 10 → 9; stores 0 → 1; structured signals 3 → 2. The summary history signal is counted under the pending async read; settings props are opaque SDK data. No unsafe intrinsic binding was found. App/lib rows are inventory for the subsequent focused PRs, not claims that their open candidates are complete.
What Problem This Solves
Plugin dashboard presentation still copied its whole local state object for each tab or collapse change, and the plugin host kept component teardown separate from its settled lifecycle.
User Impact
Behavior is unchanged: refreshes retain local choices, replacement sessions initialize after their first snapshot, and retired plugin views release their handles. No routes, tags, selectors, CSS, or markup change.
Why This Change Was Made
Use a writable derived Solid 2 store for dashboard presentation, and pair plugin focus registration with teardown in
onSettled. The shallow store preserves the raw immutable scope identity; the existing provider remains authoritative for transport, permissions, and mutations.Production LOC in the two files: 675 → 679 (+4). Dashboard: 245 → 248; plugin view: 430 → 431. The explicit draft setters and complete store seed account for the small growth. Two object-spread mutation copies and one component-level cleanup disappear. No test code added.
Evidence
pnpm tsgo:ui(tsrs)scripts/run-vitest.mjs,--maxWorkers=1, pinned Bungit diff --checkpnpm ui:buildBoth strict checks report the pre-existing startup and Chat caps; the same-machine head comparison adds no growth to either over-budget surface. New Session remains under its cap. All 21 locale pairs remain under 307,200 B; the largest is 181,712 B, with 4 B maximum pair growth. No old campaign ceiling is used.
The first local test invocation accidentally used direct Vitest/Node; the required run through the pinned Bun launcher passed all 27 tests. No local E2E or parity suite ran. Existing tests exercise delayed first snapshot, replacement scope, manual collapse, permissions, reconnect, plugin update failure, delegated mounts, and callback retirement. This is a state/lifecycle refactor with no visual design change.
Remaining scope and deliberate exceptions
async-and-actions.mdis absent on this base; recipes PR refactor(ui): add Solid async recipes and cron reference #179123 remains open. Remaining local reads: app focus-dashboard route, MCP discovery, board-browser inspect, plugin session history. Local mutation controllers: app update confirmation, board-browser open/resume/stop, plugin contribution invocation. Plugin reload already usesactionand an optimistic saving flag. Conditional MCP session creation is a service-owned preparation write.createComponentcalls remain in the generic foreign-DOM bridge; converting its explicit.tsimport path would touch 102 production callers or require a compatibility facade. It remains the single renderer adapter, not a parallel view implementation.Loading/Erroredand retry-pending presentation.Reveal.Exact-name CI attribution
CI run 39581796376 fails only the following two test cases (plus the downstream CI gate), both reproduced by the latest completed scheduled main run 39578067192 at
94e1fbf31a1371ab4ebd5fbdc24c860f1169e67b:Control UI cross-channel automation management with a real Gateway > configured owners and admin chat manage a Telegram-created job while a non-owner cannot— outbound transport timeout atqa-transport.ts:178, called from test line 308.Control UI Markdown table interactions > contains content-sized tables after restoring a percentage reading width— containment assertion at test line 214.The exact names, assertion signatures, and test/helper blobs match main. All other substantive jobs, including
security-fast, passed. Landing uses the native documented inherited-failure route; these failures are not relabeled green.