fix(oauth): label 2026-07-28 as the latest protocol revision - #3773
fix(oauth): label 2026-07-28 as the latest protocol revision#3773olartgabo wants to merge 3 commits into
Conversation
The OAuth debugger's "Configure Server to Test" dialog called 2026-07-28 "(Draft)" while 2025-11-25 held "(Latest)", so the dropdown told testers the newer revision was unreleased. 2026-07-28 is the newest entry in MCP_PROTOCOL_VERSIONS, and the host protocol picker already labels it Latest and calls 2025-11-25 November. Adopts that same vocabulary in the debugger dialog and updates the OAuth debugger docs that quoted the old "(Draft)" label.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdded shared OAuth protocol version labeling through the SDK and applied it to OAuth state metadata and inspector controls. Generated protocol options now use shared version data, with “Auto” remaining first. Updated tests verify dynamic labels, the newest revision as “Latest,” and the absence of “Draft.” Updated documentation for protocol version Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@mcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx`:
- Around line 140-152: Update the test around “labels 2026-07-28 as the latest
protocol revision” to click oauth-profile-protocol after pressing Save
configuration, then query the protocol labels from the opened selector. Assert
2026-07-28 (Latest) and 2025-11-25 (November) only after SelectContent is
mounted, while retaining the Draft absence assertion.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4e5eff25-c2e2-4b52-a092-112a5dea3504
📒 Files selected for processing (4)
docs/index.mdxdocs/inspector/guided-oauth.mdxmcpjam-inspector/client/src/components/oauth/OAuthProfileModal.tsxmcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx
| it("labels 2026-07-28 as the latest protocol revision", () => { | ||
| // 2026-07-28 is the newest known revision, so labelling it "(Draft)" while | ||
| // 2025-11-25 held "(Latest)" told testers the newer version was unreleased. | ||
| renderModal(); | ||
|
|
||
| expect(screen.getAllByText("2026-07-28 (Latest)").length).toBeGreaterThan( | ||
| 0, | ||
| ); | ||
| expect(screen.getAllByText("2025-11-25 (November)").length).toBeGreaterThan( | ||
| 0, | ||
| ); | ||
| expect(screen.queryByText(/\(Draft\)/)).not.toBeInTheDocument(); | ||
| }); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 12 'renderModal|oauth-profile-protocol' \
mcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx
rg -n -C 16 'SelectContent|SelectPrimitive\.Content|function SelectContent' \
design-system/src/components/select.tsxRepository: MCPJam/inspector
Length of output: 11315
🏁 Script executed:
#!/bin/bash
set -euo pipefail
ast-grep outline mcpjam-inspector/client/src/components/oauth/OAuthProfileModal.tsx --view expanded || true
rg -n -C 8 'Select\(|SelectTrigger|SelectContent|oauthProtocol|protocolVersion|oauth-profile-protocol' \
mcpjam-inspector/client/src/components/oauth/OAuthProfileModal.tsx
# Inspect the relevant render section only.
rg -n 'Protocol|OAuthProtocol|Select trigger|SelectContent|protocolVersion|select-protocol' \
mcpjam-inspector/client/src/components/oauth/OAuthProfileModal.tsxRepository: MCPJam/inspector
Length of output: 8589
Query the protocol labels after opening the selector.
SelectContent can hide options behind the closed select state, so renderModal() does not guarantee these texts are mounted. Click oauth-profile-protocol after pressing Save configuration, then assert 2026-07-28 (Latest) and 2025-11-25 (November).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@mcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx`
around lines 140 - 152, Update the test around “labels 2026-07-28 as the latest
protocol revision” to click oauth-profile-protocol after pressing Save
configuration, then query the protocol labels from the opened selector. Assert
2026-07-28 (Latest) and 2025-11-25 (November) only after SelectContent is
mounted, while retaining the Draft absence assertion.
Internal previewPreview URL: https://mcp-inspector-pr-3773.up.railway.app |
There was a problem hiding this comment.
1 issue found across 4 files
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="mcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx">
<violation number="1" location="mcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx:145">
P2: This new test asserts the dropdown renders "2026-07-28 (Latest)", but it never opens the Select and renders with no server, so the fresh-profile default protocol version is `2025-11-25`. With a closed Radix Select the option list (SelectContent) is not mounted, so "2026-07-28 (Latest)" never appears in the DOM; the first assertion (`getAllByText(...).length > 0`) will fail, and the `(Draft)` check passes only vacuously. The test as written can't validate the dropdown labels it claims to cover. Open the combobox first (which also makes the test async via userEvent) so the option list is actually rendered before asserting.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| // 2025-11-25 held "(Latest)" told testers the newer version was unreleased. | ||
| renderModal(); | ||
|
|
||
| expect(screen.getAllByText("2026-07-28 (Latest)").length).toBeGreaterThan( |
There was a problem hiding this comment.
P2: This new test asserts the dropdown renders "2026-07-28 (Latest)", but it never opens the Select and renders with no server, so the fresh-profile default protocol version is 2025-11-25. With a closed Radix Select the option list (SelectContent) is not mounted, so "2026-07-28 (Latest)" never appears in the DOM; the first assertion (getAllByText(...).length > 0) will fail, and the (Draft) check passes only vacuously. The test as written can't validate the dropdown labels it claims to cover. Open the combobox first (which also makes the test async via userEvent) so the option list is actually rendered before asserting.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At mcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx, line 145:
<comment>This new test asserts the dropdown renders "2026-07-28 (Latest)", but it never opens the Select and renders with no server, so the fresh-profile default protocol version is `2025-11-25`. With a closed Radix Select the option list (SelectContent) is not mounted, so "2026-07-28 (Latest)" never appears in the DOM; the first assertion (`getAllByText(...).length > 0`) will fail, and the `(Draft)` check passes only vacuously. The test as written can't validate the dropdown labels it claims to cover. Open the combobox first (which also makes the test async via userEvent) so the option list is actually rendered before asserting.</comment>
<file context>
@@ -137,6 +137,20 @@ describe("OAuthProfileModal", () => {
+ // 2025-11-25 held "(Latest)" told testers the newer version was unreleased.
+ renderModal();
+
+ expect(screen.getAllByText("2026-07-28 (Latest)").length).toBeGreaterThan(
+ 0,
+ );
</file context>
ignaciojimenezr
left a comment
There was a problem hiding this comment.
Reviewed against a local checkout, and ran the test suite with this patch applied — 10/10 pass, so the PR's own claims hold.
TL;DR
The label change itself is correct and consistent with ProtocolTab's existing rule. But it fixes one of four places carrying the same stale label, so it ships a product that now says two different things about the same version.
Blocking
-
Connect page still says
(Draft).AuthenticationSection.tsx:130-131has the exact same two labels —2026-07-28 (Draft)and2025-11-25 (Latest)— and it's rendered by Add Server and Edit Server, a much more-used surface than the debugger dialog. After this PR a user sees "Draft" when adding a server and "Latest" when configuring the debugger. -
Two tests will assert opposite things.
AuthenticationSection.test.tsx:806asserts the dropdown offers2026-07-28 (Draft), while the new test here asserts no option reads(Draft). Both green, contradicting each other. -
The SDK still exports the old labels.
factory.ts:223and:234—PROTOCOL_VERSION_INFOlabels2025-11-25 (Latest)/2026-07-28 (Draft), plus a description reading "Draft MCP OAuth specification". It's a public export frombrowser.ts:159. No in-app impact today (its only consumer,ProtocolVersionSelector.tsx, isn't imported anywhere), but SDK consumers get the stale wording. -
One doc was missed.
oauth-architecture.mdx:238still has the heading### 2025-11-25 (Latest). -
Hardcoding re-arms the bug.
ProtocolTabalready solved this:protocolVersionLabel()derives "Latest" from the last entry ofMCP_PROTOCOL_VERSIONS, so the marker walks forward on its own. This dialog still hardcodes fourSelectItems, and the new test pins the literal string2026-07-28 (Latest)— so the next protocol revision reintroduces exactly this bug with the test still passing. LiftingprotocolVersionLabelinto a shared module and mapping overMCP_PROTOCOL_VERSIONSwould fix all three dropdowns at once.
Non-blocking
ProtocolTab renders Latest (2026-07-28); this dialog renders 2026-07-28 (Latest). The PR adopts the vocabulary but not the format.
The previous commit renamed the labels in the OAuth debugger dialog only, so the Connect page still called 2026-07-28 "(Draft)" while the debugger called it "(Latest)", and AuthenticationSection.test.tsx asserted the opposite of OAuthProfileModal.test.tsx with both suites green. Lifts ProtocolTab's protocolVersionLabel() into the SDK next to MCP_PROTOCOL_VERSIONS and maps every dropdown over the version tuple: ProtocolTab, the Connect page (Add/Edit Server), and the debugger dialog. "Latest" is derived from the tail of the tuple, so the next revision moves the marker in all three at once. PROTOCOL_VERSION_INFO now takes its labels from the same helper, which fixes the wording SDK consumers see, along with its "Draft MCP OAuth specification" description. Both tests now assert against the helper instead of pinning a literal, so a new revision fails the debugger test rather than passing with a stale claim. The Connect page loses the "(Legacy)" marker on 2025-03-26 as a consequence of adopting the one rule. Also deletes ProtocolVersionSelector.tsx. It was the last surface calling 2026-07-28 a draft, and nothing in the repo imports it or its ProtocolVersionBadge export. Not touched: AdvancedConnectionSettingsSection's picker still hardcodes "Latest (2026-07-28)". Its "latest"/"november" values are sentinels that map to specific wire literals in five places, so routing it through the helper is a behavior change, not a label change.
There was a problem hiding this comment.
All reported issues were addressed across 15 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
mcpjam-inspector/client/src/components/connection/shared/AuthenticationSection.tsx (1)
33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse one source for concrete protocol options.
SERVER_FORM_OAUTH_PROTOCOL_MODESduplicates SDKMCP_PROTOCOL_VERSIONS, whileOAuthProfileModal.tsxandProtocolTab.tsxuse the SDK tuple. If a new revision is added only to the SDK tuple, this dropdown will omit it and no option here will receiveLatest. Derive this list fromMCP_PROTOCOL_VERSIONS, or enforce parity between the two arrays.Also applies to: 127-141
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@mcpjam-inspector/client/src/components/connection/shared/AuthenticationSection.tsx` at line 33, Update AuthenticationSection’s protocol option source, including the SERVER_FORM_OAUTH_PROTOCOL_MODES usage around the dropdown, to derive concrete options from the SDK MCP_PROTOCOL_VERSIONS tuple or enforce parity with it. Ensure newly added SDK revisions appear here and the latest option receives the same Latest handling as OAuthProfileModal and ProtocolTab.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@sdk/src/mcp-client-manager/mcp-protocol-version.ts`:
- Around line 55-58: Update protocolVersionLabel so special labels place the
protocol version first: return “version (Latest)” for LATEST_PROTOCOL_VERSION
and “version (November)” for “2025-11-25”; keep the fallback unchanged for other
versions.
---
Nitpick comments:
In
`@mcpjam-inspector/client/src/components/connection/shared/AuthenticationSection.tsx`:
- Line 33: Update AuthenticationSection’s protocol option source, including the
SERVER_FORM_OAUTH_PROTOCOL_MODES usage around the dropdown, to derive concrete
options from the SDK MCP_PROTOCOL_VERSIONS tuple or enforce parity with it.
Ensure newly added SDK revisions appear here and the latest option receives the
same Latest handling as OAuthProfileModal and ProtocolTab.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 9e1ec247-b8d2-4dfa-8d29-5e4c8294c9c0
📒 Files selected for processing (15)
docs/contributing/oauth-architecture.mdxmcpjam-inspector/client/src/components/connection/__tests__/AuthenticationSection.test.tsxmcpjam-inspector/client/src/components/connection/shared/AuthenticationSection.tsxmcpjam-inspector/client/src/components/hosts/redesigned/focus/ProtocolTab.tsxmcpjam-inspector/client/src/components/oauth/OAuthProfileModal.tsxmcpjam-inspector/client/src/components/oauth/ProtocolVersionSelector.tsxmcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsxmcpjam-inspector/shared/types.tssdk/src/browser.tssdk/src/index.tssdk/src/mcp-client-manager/index.tssdk/src/mcp-client-manager/mcp-protocol-version.tssdk/src/oauth/state-machines/debug-oauth-2025-11-25.tssdk/src/oauth/state-machines/debug-oauth-2026-07-28.tssdk/src/oauth/state-machines/factory.ts
💤 Files with no reviewable changes (1)
- mcpjam-inspector/client/src/components/oauth/ProtocolVersionSelector.tsx
| export function protocolVersionLabel(version: McpProtocolVersion): string { | ||
| if (version === LATEST_PROTOCOL_VERSION) return `Latest (${version})`; | ||
| if (version === "2025-11-25") return `November (${version})`; | ||
| return version; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Return version-first labels.
protocolVersionLabel currently returns Latest (2026-07-28) and November (2025-11-25). The required labels are 2026-07-28 (Latest) and 2025-11-25 (November). Every dropdown and PROTOCOL_VERSION_INFO consumes this helper, so the current implementation displays the wrong contract.
Proposed fix
- if (version === LATEST_PROTOCOL_VERSION) return `Latest (${version})`;
- if (version === "2025-11-25") return `November (${version})`;
+ if (version === LATEST_PROTOCOL_VERSION) return `${version} (Latest)`;
+ if (version === "2025-11-25") return `${version} (November)`;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export function protocolVersionLabel(version: McpProtocolVersion): string { | |
| if (version === LATEST_PROTOCOL_VERSION) return `Latest (${version})`; | |
| if (version === "2025-11-25") return `November (${version})`; | |
| return version; | |
| export function protocolVersionLabel(version: McpProtocolVersion): string { | |
| if (version === LATEST_PROTOCOL_VERSION) return `${version} (Latest)`; | |
| if (version === "2025-11-25") return `${version} (November)`; | |
| return version; |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@sdk/src/mcp-client-manager/mcp-protocol-version.ts` around lines 55 - 58,
Update protocolVersionLabel so special labels place the protocol version first:
return “version (Latest)” for LATEST_PROTOCOL_VERSION and “version (November)”
for “2025-11-25”; keep the fallback unchanged for other versions.
`protocolVersionLabel` reads the tail as the newest revision, but the array's own comment said order was purely historical. Inserting a version out of order would have silently marked the wrong one Latest in every dropdown.
Closes KES-206.
Problem
The OAuth debugger's Configure Server to Test dialog labelled
2026-07-28as(Draft)while2025-11-25held(Latest).2026-07-28is the newest entry inMCP_PROTOCOL_VERSIONS, so the dropdown told testers the newer revision was unreleased and pointed them at the older one as current.The host protocol picker (
ProtocolTab.tsx) already derives its labels from that list and calls2026-07-28Latest and2025-11-25November. The debugger dialog hardcoded its own options and never followed.Change
Adopts the existing vocabulary in the debugger dialog:
2025-11-252025-11-25 (Latest)2025-11-25 (November)2026-07-282026-07-28 (Draft)2026-07-28 (Latest)Labels only — the option values, the default selection, and the flow behaviour per version are untouched.
Also updates the two OAuth debugger docs that quoted the old
(Draft)label so they match what the dialog now shows.Screenshots
Protocol dropdown in the Configure Server to Test dialog, captured via the
/__e2e/oauth-debuggerharness.Before
After
Testing
npx vitest run client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx— 10 passed, including a new case asserting both labels and that no option reads(Draft).npm run typecheck:client— clean.Summary by cubic
Fixes KES-206 by showing
2026-07-28as Latest and2025-11-25as November across the OAuth Debugger, Connect page, and host protocol picker. Labels now come from one SDK helper so “Latest” updates automatically withMCP_PROTOCOL_VERSIONS.protocolVersionLabelfrom@mcpjam/sdk/browser; removedProtocolVersionSelector.tsx. Documented in the SDK thatMCP_PROTOCOL_VERSIONSmust stay chronological so “Latest” derives from its tail.2026-07-28details.Written for commit 2cc4eed. Summary will update on new commits.