fix(manage-ui): fix user-scoped MCP credential card refresh#2794
fix(manage-ui): fix user-scoped MCP credential card refresh#2794omar-inkeep merged 1 commit intomainfrom
Conversation
…ter connect/disconnect Fetch user-scoped credential server-side in page.tsx (matching the project-scoped pattern) instead of via a client-side React Query hook. This ensures router.refresh() after OAuth connect or credential delete re-fetches the credential data, so the "Your Connection" card updates without a manual page refresh. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 1ae64de The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
TL;DR — Fixes the user-scoped MCP credential card not updating after OAuth connect/disconnect by replacing a client-side React Query hook with server-side data fetching. The credential is now fetched in the RSC page and passed as a prop, so a Key changes
Summary | 4 files | 1 commit | base: Server-side credential fetching replaces client-side query
|
There was a problem hiding this comment.
Clean fix — moves the user-scoped credential fetch to the server component to match the existing project-scoped pattern, making router.refresh() work correctly for both connect and disconnect flows. The deleted query file has no remaining consumers. No issues found.
There was a problem hiding this comment.
PR Review Summary
(0) Total Issues | Risk: Low
This is a clean, well-scoped fix that aligns the user-scoped MCP credential handling with the existing project-scoped pattern. The changes are minimal and correct.
✅ What's Good
-
Pattern consistency — User-scoped credentials now follow the same server-side fetch pattern used by project-scoped credentials in
ViewMCPServerDetailsProjectScope -
Correct
router.refresh()usage — Server components re-fetch data onrouter.refresh(), which is exactly why the old client-side React Query hook didn't work with this pattern. The fix correctly moves the fetch server-side. -
Dead code removal —
lib/query/credentials.ts(38 lines) was removed with no remaining consumers. Verified via grep. -
Loading state removal is appropriate — Server-side fetching completes before render, so the "Checking your connection status..." loading state is no longer needed. The page will show a skeleton/suspense boundary if needed at a higher level.
✅ APPROVE
Summary: This is a straightforward and correct fix. The server-side fetching pattern ensures router.refresh() properly re-fetches credential data after OAuth connect and delete operations. Ship it! 🚀
Discarded (1)
| Location | Issue | Reason Discarded |
|---|---|---|
page.tsx:14-17 |
Sequential await creates waterfall | Reviewer self-discarded: the second fetch (fetchUserScopedCredential) depends on tool.id from the first fetch, so they cannot be parallelized. Pattern is appropriate for this use case. |
Reviewers (2)
| Reviewer | Returned | Main Findings | Consider | While You're Here | Inline Comments | Pending Recs | Discarded |
|---|---|---|---|---|---|---|---|
pr-review-frontend |
1 | 0 | 0 | 0 | 0 | 0 | 1 |
pr-review-standards |
0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Total | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
…ter connect/disconnect (#2794) Fetch user-scoped credential server-side in page.tsx (matching the project-scoped pattern) instead of via a client-side React Query hook. This ensures router.refresh() after OAuth connect or credential delete re-fetches the credential data, so the "Your Connection" card updates without a manual page refresh. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Summary
page.tsx(matching the existing project-scoped pattern) instead of via a client-side React Query hookrouter.refresh()now correctly re-fetches credential data after OAuth connect and credential delete, so the "Your Connection" card updates immediatelylib/query/credentials.ts(no remaining consumers)Test plan
🤖 Generated with Claude Code