fix: keep queued approval prompts visible#98380
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 11:57 PM ET / 03:57 UTC. Summary PR surface: Source +7, Tests +103. Total +110 across 6 files. Reproducibility: yes. source inspection gives a medium-confidence reproduction for the modal reuse subcase: current main can keep the same custom element mounted while its internal opened flag prevents reopening a closed underlying dialog. I did not run a browser repro for the full click path, so real behavior proof is still needed. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land a narrow Control UI fix that keeps the reused approval modal visible for queued approvals and uses the existing approval-list refresh path, after real browser proof is attached. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a medium-confidence reproduction for the modal reuse subcase: current main can keep the same custom element mounted while its internal opened flag prevents reopening a closed underlying dialog. I did not run a browser repro for the full click path, so real behavior proof is still needed. Is this the best way to solve the issue? Yes, the proposed shape is the best observed boundary: the shared modal primitive owns reopening a reused dialog, and the gateway hello change reuses the existing approval queue refresh helper. The remaining gap is proof, not an alternate implementation path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 21d1e1f0fc9d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +7, Tests +103. Total +110 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
ef98bd1 to
869bfe3
Compare
|
Closing after live verification on current main ( I exercised the real Control UI path with a mocked Gateway queue containing two exec approvals. The newer approval rendered first with a pending count; clicking Allow once sent The proposed modal regression test manually calls Supported behavior already works on main. A new report would be useful if it includes a live recording or browser trace showing which real interaction closes the underlying dialog while another approval remains queued. |
Closes #98379
AI-assisted: Yes (Codex)
What Problem This Solves
Fixes an issue where users resolving one Control UI approval could lose the approval window when another exec/plugin approval was still queued. The remaining approval could stay pending but no longer be visible in the active modal flow.
Why This Change Was Made
The shared modal primitive now reopens its underlying
<dialog>when the same custom element instance is reused after the dialog was closed, so queued approval content remains modal-visible after the active item changes. The approval action buttons are explicitly non-submit buttons, and the gateway hello path refreshes pending exec/plugin approval lists so reconnects recover missed approval events.User Impact
Users can approve or deny a stack of pending Control UI approvals without the prompt disappearing after the first decision. Reconnects also repopulate pending plugin approvals from the authoritative gateway lists.
Evidence
Rebased on
origin/mainat21d1e1f0fand revalidated:corepack pnpm exec vitest run --config vitest.config.ts --project unit src/ui/components/modal-dialog.test.ts src/ui/app.exec-approval.test.ts src/ui/views/exec-approval.test.ts --reporter=verbosecorepack pnpm exec vitest run --config vitest.config.ts --project unit-node src/ui/app-gateway.node.test.ts --reporter=verbosegit diff --checkcorepack pnpm ui:buildcodex review --base origin/mainwas attempted but could not run in this environment becausecodex.exereturnedAccess is denied.