Skip to content

fix: deep-link mcp workspace matching#10269

Open
ryan-willis wants to merge 2 commits into
developfrom
fix/deep-link-mcp-workspace-matching
Open

fix: deep-link mcp workspace matching#10269
ryan-willis wants to merge 2 commits into
developfrom
fix/deep-link-mcp-workspace-matching

Conversation

@ryan-willis

Copy link
Copy Markdown
Contributor

This PR fixes an issue where deep-link mcpRequest imports were invisibly added to a focused mcpClient workspace. Now, autoScan/deep-link imports do not inherit the currently focused workspace

Also adds an mcpRequest matcher similar to specs so that repeated deep-link imports focus one that already exists

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

✅ Circular References Report

Generated at: 2026-07-16T19:22:13.341Z
Status: ✅ NO CHANGE

Summary

Metric Base (develop) PR Change
Total Circular References 9 9 0 (0.00%)
Click to view all circular references in PR (9)
insomnia-inso/src/db/models/types.ts -> insomnia-inso/src/db/types.ts
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/src/ui/components/viewers/response-multipart-viewer.tsx
Click to view all circular references in base branch (9)
insomnia-inso/src/db/models/types.ts -> insomnia-inso/src/db/types.ts
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/src/ui/components/viewers/response-multipart-viewer.tsx

Analysis

No Change: This PR does not introduce or remove any circular references.


This report was generated automatically by comparing against the develop branch.

@ryan-willis ryan-willis force-pushed the fix/deep-link-mcp-workspace-matching branch from 31c71f0 to 9232aa5 Compare July 16, 2026 17:40
@ryan-willis ryan-willis marked this pull request as ready for review July 16, 2026 17:40
Copilot AI review requested due to automatic review settings July 16, 2026 17:40

Copilot AI 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.

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.

Comment thread packages/insomnia/src/common/import.ts
@ryan-willis ryan-willis enabled auto-merge (squash) July 16, 2026 18:27
ryan-willis and others added 2 commits July 16, 2026 12:16
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ryan-willis ryan-willis force-pushed the fix/deep-link-mcp-workspace-matching branch from 273ff94 to 0afb27d Compare July 16, 2026 19:16
@ryan-willis ryan-willis requested a review from a team July 16, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants