Repository navigation
fix(ui): preserve plugin selection and restart progress - #143671
Conversation
Keep the newest plugin inspection and installation choice when older catalog requests finish. Bind preparation to the existing wizard lifecycle and share the catalog refresh path.
|
🦞👀 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 10, 2026, 1:43 AM ET / 05:43 UTC (Revision 2). ClawSweeper reviewWhat this changesPreserves the latest plugin selection and inspection results, keeps installation progress through an interrupted restart acknowledgement, and adds regression coverage and documentation. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main retains the affected paths, and no actionable introduced defect was found. The linked merged test fix does not supersede this work. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI plugin page combines Gateway inventory with optional ClawHub metadata and guides installation, configuration, and enablement. Its wizard tracks the selected plugin through restart and checks the returning Gateway inventory before displaying completion. flowchart TD
A[Plugin selection] --> C[Current request check]
B[Inventory and catalog responses] --> C
C --> D[Review and installation]
D --> E[Gateway restart]
E --> F[New boot and inventory confirmation]
F --> G[Ready or visible retry]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +21, Tests +538, Docs +2. Total +561 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep selection and restart progress owned by the existing wizard lifecycle, with completion gated on refreshed inventory and a new Gateway boot. Do we have a high-confidence way to reproduce the issue? Yes, from source: delayed catalog responses can overwrite newer inspection or selection state, and a restart socket close reaches the unconditional error path on current main. The supplied regressions target those interleavings; this review did not execute them. Is this the best way to solve the issue? Yes. Reusing existing request identity, wizard ownership, boot confirmation, and timeout handling repairs the owning boundaries without adding configuration, automatic mutation retries, or a parallel installation path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e17752535e22. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Keep the committed installation waiting for its existing reconnect and boot confirmation when the restart closes its socket before acknowledgement. Preserve explicit Gateway rejections and the existing timeout. Extend the setup flow regression and explain reconnect behavior in the plugin guide.
|
Merged via squash.
|
) * fix(ui): preserve plugin request ownership Keep the newest plugin inspection and installation choice when older catalog requests finish. Bind preparation to the existing wizard lifecycle and share the catalog refresh path. * fix(ui): retain plugin installation progress through restart Keep the committed installation waiting for its existing reconnect and boot confirmation when the restart closes its socket before acknowledgement. Preserve explicit Gateway rejections and the existing timeout. Extend the setup flow regression and explain reconnect behavior in the plugin guide.
What Problem This Solves
Fixes plugin-page requests that can overwrite a newer choice: delayed ClawHub metadata could restore an old inspection after autosave, and a slow first Install request could replace the second plugin's review or active installation dialog. Also fixes the install dialog reporting failure when the Gateway restarts before acknowledging a committed plugin change.
Why This Change Was Made
Keep the same request identity through local inspection and optional catalog enrichment. Reserve the existing wizard attempt before loading installation details, so later selection, close, route changes, and connection retirement invalidate stale work while a busy installation keeps its owner. Reuse one catalog refresh method and remove redundant checks.
During a committed restart, transport loss leaves the wizard waiting for its existing boot and inventory confirmation. Explicit server rejections still show an error, and the existing deadline still offers a retry if the restart stalls. No mutation is retried automatically and no shared client or restart policy changes. The complete change adds 21 production lines.
User Impact
Current settings and the latest selected plugin remain visible. An active installation retains its dialog and can finish after the expected Gateway reconnect, even when that restart interrupts its acknowledgement.
Evidence
An earlier CI run also exposed an unrelated catalog request-order assertion, fixed separately in #143710. Its existing restart test timed out without a diagnostic artifact; the controlled browser reproduction establishes a valid lost-acknowledgement failure, not the unknown interleaving in that CI run.
The screenshots show the selection and metadata repairs using synthetic data. Restart recovery is covered by browser assertions. No real package installation, live Gateway, or provider was used.