Repository navigation
fix: prevent false errors during successful plugin uninstall - #157728
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: needs maintainer review before merge. Reviewed September 25, 2026, 12:34 AM ET / 04:34 UTC (Revision 3). ClawSweeper reviewWhat this changesThe Control UI Plugins page keeps selected plugin details stable during uninstall, then reconciles inventory and feedback after removal settles, with lifecycle regression tests. Merge readiness✅ Ready for maintainer review Current main still permits the transient uninstall error. The branch addresses the race through the existing Control UI detail path, with convincing visual proof and focused regression coverage; I found no introduced blocker. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI Plugins page receives inventory and change events from the Gateway and loads details for the selected plugin. It sends uninstall requests and renders the resulting details, install actions, and feedback. flowchart LR
A[Plugin route] --> C[Plugins page]
B[Gateway inventory and events] --> C
C --> D[Detail loading]
C --> E[Uninstall request]
E --> F[Gateway result]
F --> C
D --> G[Visible details and feedback]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +83, Tests +285. Total +368 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the Gateway as the inventory authority while ensuring an in-progress removal cannot publish a stale missing-plugin error and genuine failures remain visible. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows that a Gateway change event can reload details while the selected plugin is disappearing, and the supplied baseline screenshot shows the false banner; this read-only review did not execute the path. Is this the best way to solve the issue? Yes. The patch fences transient reads at the existing page and detail-loader owners, then reconciles against Gateway inventory without changing plugin APIs or stored state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bfa7e8dff071. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
9b8f122 to
e13b351
Compare
|
Merged via squash auto-merge.
|
…w#157728) * fix: prevent false errors during successful plugin uninstall * fix: retain available local plugin details during refresh
What Problem This Solves
Fixes a brief “Plugin not found” error while an uninstall is still running, even when removal succeeds.
User Impact
The selected plugin stays stable while removal finishes, then becomes installable again when available in the catalog. A removed local-only plugin returns to Plugins. Genuine removal failures and warnings remain visible, including failures reported after the files have already been removed.
Why This Change Was Made
Uninstall publishes plugin changes before its response completes. Those changes previously triggered inspection of the disappearing plugin. The page now retires earlier reads, defers inspection and inventory replacement for the selected removal, and reconciles after the operation settles. Installed and catalog detail request ownership share the existing detail loader; duplicate page loading paths were removed.
This is independent of the installation recovery PR. No configuration, storage, or protocol changes.
Evidence
Matching Calendar Plus fixture, light theme, 1440 × 1000 viewport; screenshots crop the same content area. Real Control UI against an isolated mock Gateway. Screenshot baseline:
23f89eecc93; candidate:9b8f12275cf. The before video was captured atf8e2fb2f52c, whose uninstall code is identical to the screenshot baseline; the after video uses this PR’s candidate.Before — click Uninstall, confirm, observe the false error, then successful removal:
before.mp4
After — the same sequence completes without the error:
after.mp4
The work Gateway has not been deployed or restarted by this change.
One-worker test costs (macOS arm64, Node 24.19.0, head
9b8f12275cf):plugins-page.lifecycle.test.ts4.32s wall / 3.18s Vitest (12 passed);plugins-lifecycle.e2e.test.ts16.66s wall / 15.66s Vitest (7 passed, including a 7.95s production build). Each ran separately with--maxWorkers=1. The initial CI run deferred all UI lanes for release priority, so it produced no UI test duration; a full rerun was requested after that priority cleared.CI regression repair
The full catalog browser suite caught an available local plugin being mistaken for a removed installation. The detail loader now requires the Gateway-recorded prior
installedfact before redirecting a missing local selection. This is one production condition; the existing disabled-install scenario is the regression test. The identical full-file order failed before (14 passed, 1 failed; 51.22s wall) and passed after. All 34 catalog, uninstall-browser and lifecycle-unit cases passed together in 24.91s wall, including actual removal, failed removal, available official plugins, navigation and Gateway replacement. A fresh P0–P2 AutoReview was scoped-clean.Also incorporated the existing main fixture repair 229ab8a1fe9 for the unrelated guest-question timeout, along with main through
63d299c31b0. The two plugin commits are patch-identical across that rebase. Current CI is bound toe13b351738e288d8a79bef83e7eae0c6c170ad5e. The previous hosted lifecycle unit suite passed all 12 cases in 0.388s test time (0.774s including module start/finish).