You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Queue approval requests instead of replacing the open one #790
Severity: P1. A click can approve a statement the user never read.
What happens
The mock serialises approval requests (src/dev/mock/handlers/agent.ts, ask() chains on queue), so ?mock=connected cannot show this. The real path does not:
An agent (in-app or on the MCP endpoint) calls run_write, and the approval dialog opens with statement A.
While it is open, a second run_write (a parallel tool call, or another client) arrives with statement B.
The dialog's SQL, row count and connection change in place to B. A user who read A and clicks Apply approves B.
Request A is never answered. Its transaction stays open until DECISION_TIMEOUT, and its agent stays blocked.
src-tauri/src/mcp/window.rs (approve → bridge.ask) does not serialise approval asks.
src/components/agent/ApprovalDialog.tsx:57: the dialog is not keyed on the request id, so the swap happens inside one mounted dialog.
Fix
Hold approvals in a FIFO queue in the store, show the head, and say "1 of N" when more are waiting. Key the dialog on approval.id so each request remounts it.
Activity
fix(agent): queue approvals instead of replacing
release: 1.4.0 (#871)