Summary
On the MCP connect modal (ConnectAuthModal), after starting browser OAuth ("Sign in with browser"), there is no way to cancel — the modal is stuck in "Waiting for sign-in…" until the poll times out, ~3 minutes later.
Problem
The browser-OAuth flow polls /oauth/mcp/callback for up to 3 minutes via a recursive setTimeout. During that wait the modal is busy, and every dismissal path — the Cancel button, and the backdrop click — is gated on busy. So a user who starts the sign-in and then abandons it in the browser (closes the tab, changes their mind, picks the wrong account) is trapped in the modal with no way out until the 180s timeout fires.
Starting the browser sign-in is not a committed action — it can be abandoned — so the wait should be abortable.
- Platform: desktop.
- File:
app/src/components/channels/mcp/ConnectAuthModal.tsx.
Solution (optional)
Make the wait abortable: track the pending poll setTimeout and a "cancelled" flag so Cancel / backdrop can stop the pending tick and bail any in-flight request, reset busy/waiting, and drop the timer on unmount. Enable Cancel and backdrop-dismiss during the wait.
Acceptance criteria
Related
Fix is ready on the same fork branch as the custom-servers feature; the PR closes both.
Summary
On the MCP connect modal (
ConnectAuthModal), after starting browser OAuth ("Sign in with browser"), there is no way to cancel — the modal is stuck in "Waiting for sign-in…" until the poll times out, ~3 minutes later.Problem
The browser-OAuth flow polls
/oauth/mcp/callbackfor up to 3 minutes via a recursivesetTimeout. During that wait the modal isbusy, and every dismissal path — the Cancel button, and the backdrop click — is gated onbusy. So a user who starts the sign-in and then abandons it in the browser (closes the tab, changes their mind, picks the wrong account) is trapped in the modal with no way out until the 180s timeout fires.Starting the browser sign-in is not a committed action — it can be abandoned — so the wait should be abortable.
app/src/components/channels/mcp/ConnectAuthModal.tsx.Solution (optional)
Make the wait abortable: track the pending poll
setTimeoutand a "cancelled" flag so Cancel / backdrop can stop the pending tick and bail any in-flight request, resetbusy/waiting, and drop the timer on unmount. Enable Cancel and backdrop-dismiss during the wait.Acceptance criteria
.github/workflows/ci-lite.yml).Related
Fix is ready on the same fork branch as the custom-servers feature; the PR closes both.