Skip to content

fix(github-picker): show reconnect action on GitHub accounts error#3403

Open
guitavano wants to merge 1 commit into
mainfrom
fix/github-picker-reconnect-error-state
Open

fix(github-picker): show reconnect action on GitHub accounts error#3403
guitavano wants to merge 1 commit into
mainfrom
fix/github-picker-reconnect-error-state

Conversation

@guitavano
Copy link
Copy Markdown
Contributor

@guitavano guitavano commented May 20, 2026

Summary

  • When the GitHub import modal fails to load accounts (e.g. expired OAuth token), it now shows a proper error state with a "Reconnect GitHub" button that triggers re-authentication, instead of just a plain red error message
  • Adds a "Retry" fallback for transient errors that don't require re-auth
  • Matches the existing AutoInstallGitHubUI error design for visual consistency

Test plan

  • Open the GitHub import modal with an expired/invalid GitHub OAuth token
  • Verify the error state shows the GitHub icon, helpful message, and reconnect button
  • Click "Reconnect GitHub" and verify the OAuth flow opens
  • After successful re-auth, verify the installations list loads
  • Click "Retry" and verify it refetches without triggering OAuth

🤖 Generated with Claude Code


Summary by cubic

Shows an actionable error state in the GitHub import modal when accounts fail to load, with a “Reconnect GitHub” flow and a “Retry” option to recover without manual steps. Improves UX for expired/invalid OAuth tokens and matches the existing error design.

  • Bug Fixes
    • Added reconnect flow using authenticateMcp, persists tokens via the connection OAuth endpoint, then refetches installations.
    • Added “Retry” to refetch without re-auth.
    • Updated error UI with GitHub icon and reconnect progress state.

Written for commit 7b52b87. Summary will update on new commits. Review in cubic

When the GitHub installation picker fails to load accounts (e.g. expired
OAuth token), the modal now shows a helpful error state with a
"Reconnect GitHub" button that triggers re-authentication instead of
just a plain red error message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Copy Markdown
Contributor

Release Options

Suggested: Patch (2.334.1) — based on fix: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.334.1-alpha.1
🎉 Patch 2.334.1
❤️ Minor 2.335.0
🚀 Major 3.0.0

Current version: 2.334.0

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: patch).

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/mesh/src/web/components/github-repo-picker.tsx">

<violation number="1" location="apps/mesh/src/web/components/github-repo-picker.tsx:598">
P2: Reconnect swallows token-save failures, which can leave the connection unauthenticated without clear user feedback.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

}),
},
);
if (!response.ok) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Reconnect swallows token-save failures, which can leave the connection unauthenticated without clear user feedback.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/src/web/components/github-repo-picker.tsx, line 598:

<comment>Reconnect swallows token-save failures, which can leave the connection unauthenticated without clear user feedback.</comment>

<file context>
@@ -562,6 +564,55 @@ function InstallationPicker({
+              }),
+            },
+          );
+          if (!response.ok) {
+            console.error("Failed to save OAuth token:", await response.text());
+          }
</file context>

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.

1 participant