Skip to content

fix: let MCP OAuth popup show result before closing - #842

Merged
govindavashishtha merged 2 commits into
mainfrom
fix/mcp-oauth-popup-close-delay
Sep 22, 2026
Merged

govindavashishtha merged 2 commits into
mainfrom
fix/mcp-oauth-popup-close-delay

Conversation

@govindavashishtha

Copy link
Copy Markdown
Contributor

Summary

  • Stop the MCP OAuth opener from calling popup.close() as soon as the callback broadcasts success/failure
  • Leave the popup open so PostMcpOauthScreen can show its result UI and close itself after the existing delay
  • Still close orphaned popups on hook unmount; add a patch changeset for @truefoundry/trueforge-ui

Test plan

  • Authorize an MCP connector and confirm the success screen stays visible briefly before the popup closes
  • Fail/deny OAuth and confirm the failure screen is visible before close
  • Unmount the authorizing UI mid-flow and confirm the popup is still cleaned up
  • pnpm --filter @truefoundry/trueforge-ui exec vitest run test/hooks/useMcpAuth.test.ts test/containers/McpOauthContainer/PostMcpOauthScreen.test.tsx

Made with Cursor

The opener was closing the popup as soon as the callback broadcast,
so the success screen never stayed visible. Close only the channel on
result and leave self-close to PostMcpOauthScreen.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a2b316c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@govindavashishtha
govindavashishtha enabled auto-merge (squash) September 22, 2026 10:59
@govindavashishtha
govindavashishtha merged commit 0da3794 into main Sep 22, 2026
9 checks passed
@govindavashishtha
govindavashishtha deleted the fix/mcp-oauth-popup-close-delay branch September 22, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants