feat: add needs_reauth state and replace per-user connection badge with sessions link - #5714
Conversation
|
|
oauth_configs to new mcp_oauth_flows table
#5709
📝 WalkthroughSummary by CodeRabbit
WalkthroughPer-user MCP clients now link to MCP sessions instead of shared connection states. The MCP status model adds ChangesMCP session status handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
cfd906a to
7959576
Compare
50d7649 to
6277f49
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
6277f49 to
e491115
Compare
7959576 to
321a25c
Compare
Merge activity
|
The base branch was changed.
Per-user auth types now show the same connection-state badge as every other client instead of a session-list link, keeping the edit sheet's header consistent across auth types.
321a25c to
44a4c79
Compare

Summary
Per-user auth clients (
per_user_oauthandper_user_headers) don't hold a persistent upstream connection, so displaying a connection-state badge for them is misleading. This PR replaces that badge with a "View sessions" link pointing to the MCP Sessions table filtered by the client. It also adds proper handling for theneeds_reauthstate, which previously had no color mapping and no explanatory copy.Changes
needs_reauthstate, since reconnecting is not a valid recovery path for expired credentials.needs_reauthcolor mapping (bg-red-100 text-red-800) has been added toMCP_STATUS_COLORSso the badge renders correctly for server-level clients in that state.needs_reauthstate, explaining that credentials have expired and that recreating the client is the current workaround.MCPConnectionStatetype has been extended to includeneeds_reauth.Type of change
Affected areas
How to test
per_user_oauthorper_user_headersauth type.needs_reauthstate and confirm the badge renders in red and the sheet description explains the reauth requirement.needs_reauthstate.Screenshots/Recordings
Before: Per-user auth clients displayed a connection-state badge (e.g.,
connected) that did not reflect their actual stateless behavior.After: Per-user auth clients display a "View sessions" link. Server-level clients in
needs_reauthshow a red badge with an explanatory description.Breaking changes
Related issues
Security considerations
None. This is a display-layer change; no auth logic or credential handling was modified.
Checklist
docs/contributing/README.mdand followed the guidelines