Skip to content

fix(oauth): label 2026-07-28 as the latest protocol revision - #3773

Open
olartgabo wants to merge 3 commits into
mainfrom
fix/oauth-debugger-protocol-latest-label
Open

fix(oauth): label 2026-07-28 as the latest protocol revision#3773
olartgabo wants to merge 3 commits into
mainfrom
fix/oauth-debugger-protocol-latest-label

Conversation

@olartgabo

@olartgabo olartgabo commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Closes KES-206.

Problem

The OAuth debugger's Configure Server to Test dialog labelled 2026-07-28 as (Draft) while 2025-11-25 held (Latest). 2026-07-28 is the newest entry in MCP_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 calls 2026-07-28 Latest and 2025-11-25 November. The debugger dialog hardcoded its own options and never followed.

Change

Adopts the existing vocabulary in the debugger dialog:

Value Before After
2025-11-25 2025-11-25 (Latest) 2025-11-25 (November)
2026-07-28 2026-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-debugger harness.

Before

Protocol dropdown showing 2025-11-25 (Latest) and 2026-07-28 (Draft)

After

Protocol dropdown showing 2025-11-25 (November) and 2026-07-28 (Latest)

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-28 as Latest and 2025-11-25 as November across the OAuth Debugger, Connect page, and host protocol picker. Labels now come from one SDK helper so “Latest” updates automatically with MCP_PROTOCOL_VERSIONS.

  • Bug Fixes
    • Unified all protocol dropdowns to use protocolVersionLabel from @mcpjam/sdk/browser; removed ProtocolVersionSelector.tsx. Documented in the SDK that MCP_PROTOCOL_VERSIONS must stay chronological so “Latest” derives from its tail.
    • Updated OAuth debugger and site docs to replace “(Draft)” with “(Latest)” and reflect the new 2026-07-28 details.
    • Adjusted tests to assert labels via the helper; only the newest version shows “Latest” and no option shows “Draft”.

Written for commit 2cc4eed. Summary will update on new commits.

Review in cubic

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.
@mintlify

mintlify Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mcpjam 🟢 Ready View Preview Aug 7, 2026, 2:28 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@olartgabo
olartgabo temporarily deployed to preview-pr-3773 August 7, 2026 14:28 — with GitHub Actions Inactive
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Aug 7, 2026
@chelojimenez

chelojimenez commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3cbadffc-9767-472e-a57c-972a892d1b22

📥 Commits

Reviewing files that changed from the base of the PR and between 5dbbcb6 and 2cc4eed.

📒 Files selected for processing (1)
  • sdk/src/mcp-client-manager/mcp-protocol-version.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • sdk/src/mcp-client-manager/mcp-protocol-version.ts

Walkthrough

Added 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 2026-07-28, OAuth behavior, supported-version counts, and the default unpinned flow.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a397dcf and 165d501.

📒 Files selected for processing (4)
  • docs/index.mdx
  • docs/inspector/guided-oauth.mdx
  • mcpjam-inspector/client/src/components/oauth/OAuthProfileModal.tsx
  • mcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx

Comment on lines +140 to +152
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();
});

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.

🎯 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.tsx

Repository: 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.tsx

Repository: 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.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Internal preview

Preview URL: https://mcp-inspector-pr-3773.up.railway.app
Deployed commit: c2e92a6
PR head commit: 2cc4eed
Backend target: staging fallback.
Health: ✅ Convex reachable
Access is employee-only in non-production environments.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 ignaciojimenezr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

  1. Connect page still says (Draft). AuthenticationSection.tsx:130-131 has the exact same two labels — 2026-07-28 (Draft) and 2025-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.

  2. Two tests will assert opposite things. AuthenticationSection.test.tsx:806 asserts the dropdown offers 2026-07-28 (Draft), while the new test here asserts no option reads (Draft). Both green, contradicting each other.

  3. The SDK still exports the old labels. factory.ts:223 and :234PROTOCOL_VERSION_INFO labels 2025-11-25 (Latest) / 2026-07-28 (Draft), plus a description reading "Draft MCP OAuth specification". It's a public export from browser.ts:159. No in-app impact today (its only consumer, ProtocolVersionSelector.tsx, isn't imported anywhere), but SDK consumers get the stale wording.

  4. One doc was missed. oauth-architecture.mdx:238 still has the heading ### 2025-11-25 (Latest).

  5. Hardcoding re-arms the bug. ProtocolTab already solved this: protocolVersionLabel() derives "Latest" from the last entry of MCP_PROTOCOL_VERSIONS, so the marker walks forward on its own. This dialog still hardcodes four SelectItems, and the new test pins the literal string 2026-07-28 (Latest) — so the next protocol revision reintroduces exactly this bug with the test still passing. Lifting protocolVersionLabel into a shared module and mapping over MCP_PROTOCOL_VERSIONS would 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.
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Aug 9, 2026
@olartgabo
olartgabo temporarily deployed to preview-pr-3773 August 9, 2026 20:24 — with GitHub Actions Inactive

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 15 files (changes from recent commits).

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

Re-trigger cubic

Comment thread sdk/src/mcp-client-manager/mcp-protocol-version.ts

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
mcpjam-inspector/client/src/components/connection/shared/AuthenticationSection.tsx (1)

33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use one source for concrete protocol options.

SERVER_FORM_OAUTH_PROTOCOL_MODES duplicates SDK MCP_PROTOCOL_VERSIONS, while OAuthProfileModal.tsx and ProtocolTab.tsx use the SDK tuple. If a new revision is added only to the SDK tuple, this dropdown will omit it and no option here will receive Latest. Derive this list from MCP_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

📥 Commits

Reviewing files that changed from the base of the PR and between 165d501 and 5dbbcb6.

📒 Files selected for processing (15)
  • docs/contributing/oauth-architecture.mdx
  • mcpjam-inspector/client/src/components/connection/__tests__/AuthenticationSection.test.tsx
  • mcpjam-inspector/client/src/components/connection/shared/AuthenticationSection.tsx
  • mcpjam-inspector/client/src/components/hosts/redesigned/focus/ProtocolTab.tsx
  • mcpjam-inspector/client/src/components/oauth/OAuthProfileModal.tsx
  • mcpjam-inspector/client/src/components/oauth/ProtocolVersionSelector.tsx
  • mcpjam-inspector/client/src/components/oauth/__tests__/OAuthProfileModal.test.tsx
  • mcpjam-inspector/shared/types.ts
  • sdk/src/browser.ts
  • sdk/src/index.ts
  • sdk/src/mcp-client-manager/index.ts
  • sdk/src/mcp-client-manager/mcp-protocol-version.ts
  • sdk/src/oauth/state-machines/debug-oauth-2025-11-25.ts
  • sdk/src/oauth/state-machines/debug-oauth-2026-07-28.ts
  • sdk/src/oauth/state-machines/factory.ts
💤 Files with no reviewable changes (1)
  • mcpjam-inspector/client/src/components/oauth/ProtocolVersionSelector.tsx

Comment on lines +55 to +58
export function protocolVersionLabel(version: McpProtocolVersion): string {
if (version === LATEST_PROTOCOL_VERSION) return `Latest (${version})`;
if (version === "2025-11-25") return `November (${version})`;
return version;

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.

🎯 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.

Suggested change
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants