fix: deep-link mcp workspace matching#10269
Open
ryan-willis wants to merge 2 commits into
Open
Conversation
✅ Circular References ReportGenerated at: 2026-07-16T19:22:13.341Z Summary
Click to view all circular references in PR (9)Click to view all circular references in base branch (9)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
31c71f0 to
9232aa5
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes deep-link/auto-scan import behavior so MCP deep-link imports don’t “inherit” the currently focused workspace, and adds duplicate-detection for MCP imports so repeated deep-links navigate to an existing matching MCP client (by URL) instead of importing a new one.
Changes:
- Add
requiresNewWorkspace()to detect scan results that must create a new workspace (API specs, MCP requests, design/MCP workspaces). - Update Import Modal auto-scan flow to (a) avoid preselecting a focused workspace for auto-scan, (b) prevent importing MCP/spec results into an existing workspace, and (c) navigate to an existing matching MCP/spec import when duplicates are detected.
- Add
findExistingImportedMcp()plus unit tests for MCP URL-based duplicate matching.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/insomnia/src/ui/components/modals/import-modal/shared.tsx | Adds requiresNewWorkspace() helper to decide when imports should not target an existing workspace. |
| packages/insomnia/src/ui/components/modals/import-modal/import-modal.tsx | Prevents auto-scan/deep-link imports from inheriting the focused workspace; adds MCP duplicate navigation behavior; hides workspace select when a new workspace is required. |
| packages/insomnia/src/routes/import.resources.tsx | Extends “skip import if duplicate” behavior to also handle MCP deep-link imports (in addition to API specs). |
| packages/insomnia/src/common/import.ts | Adds MCP URL-based duplicate matcher findExistingImportedMcp(). |
| packages/insomnia/src/common/tests/import.test.ts | Adds tests validating MCP duplicate matching behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
273ff94 to
0afb27d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where deep-link
mcpRequestimports were invisibly added to a focusedmcpClientworkspace. Now,autoScan/deep-link imports do not inherit the currently focused workspaceAlso adds an
mcpRequestmatcher similar to specs so that repeated deep-link imports focus one that already exists