chore(mcp): remove helpers and strings left unused by staged setup
Merged
DE
2d ago+26+26+01234567890123456789-79-79-01234567890123456789
Description
Remove code that the staged MCP setup stack (#16419, #16413) left with no production callers:
mcpOAuthReturnHrefinweb/src/lib/plugins/routes.ts. Its only caller, the old admin OAuth start inMCPAuthenticationPage.tsx, was removed.consumeMcpChatEnableIntentinweb/src/sections/actions/mcpChatEnableIntent.ts. Its only caller, theonTriggerFetchToolshandler inMCPPluginSetupModal.tsx, was removed. The privatecheckIntenthelper is now inlined intoverifyMcpChatEnableIntent. Behavior does not change.- The
actions.mcpAuthModal.errors.oauthStageanddiscoveryStagestrings in all 9 locale files. They were read only throught(`mcpAuthModal.errors.${connectionError.stage}`), and that call was removed.
Tests that used consumeMcpChatEnableIntent to check stored intent state now use verifyMcpChatEnableIntent.
How Has This Been Tested?
jestformcpChatEnableIntent, plugin routes,MCPServerDetailPage,sections/actions/modals, andsrc/i18n: 214 tests passed.bun run types:check, oxlint, oxfmt, and pre-commit hooks passed.
Additional Options
- [Optional] Please cherry-pick this PR to the latest release version.
Link to Devin session: https://app.devin.ai/sessions/55fba60b72e94e1282b8d8caad16b371
Open in Devin Desktop: https://app.devin.ai/desktop/session/55fba60b72e94e1282b8d8caad16b371?variant=devin
Summary by cubic
Removes MCP helpers and locale strings left unused by the staged MCP setup stack.
consumeMcpChatEnableIntentbecomesverifyMcpChatEnableIntent, which no longer deletes the stored proof after checking; callers clear it explicitly withclearMcpChatEnableIntent.mcpOAuthReturnHrefand theoauthStage/discoveryStagestrings in all nine locale files had no remaining callers and are removed.- Tests that relied on consuming to expire proof now verify and clear separately.
Summary by CodeRabbit
- Changes
- MCP chat authorization checks can now be performed repeatedly during an authentication flow and remain valid until the flow is cancelled.
- Cancelled or invalid authorization attempts continue to be rejected.
- Removed obsolete MCP authentication error messages from supported language translations.
- Removed the previous OAuth return-route behavior for automatically triggering plugin fetches and enabling chat.