Skip to content

warn if user try to attach edge for already connected MCP, remove 0 badge in MCP nodes, in favour of No tools#1910

Merged
dimaMachina merged 4 commits intomainfrom
prd-6010
Feb 10, 2026
Merged

warn if user try to attach edge for already connected MCP, remove 0 badge in MCP nodes, in favour of No tools#1910
dimaMachina merged 4 commits intomainfrom
prd-6010

Conversation

@dimaMachina
Copy link
Collaborator

Screen.Recording.2026-02-11.at.05.35.17.mov

@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: 7fa2099

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@inkeep/agents-manage-ui Patch
@inkeep/agents-api Patch
@inkeep/agents-cli Patch
@inkeep/agents-core Patch
@inkeep/agents-manage-mcp Patch
@inkeep/agents-mcp Patch
@inkeep/agents-sdk Patch
@inkeep/agents-work-apps Patch
@inkeep/ai-sdk-provider Patch
@inkeep/create-agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Ready Ready Preview, Comment Feb 10, 2026 10:52pm
agents-manage-ui Ready Ready Preview, Comment Feb 10, 2026 10:52pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agents-docs Skipped Skipped Feb 10, 2026 10:52pm

Request Review

@dimaMachina
Copy link
Collaborator Author

@claude --verify and add a changeset

Co-authored-by: Dimitri POSTOLOV <dimaMachina@users.noreply.github.com>
Copy link
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

1 Key Finding | Risk: High

🔴❗ Critical (1) ❗🔴

  • 🔴 Critical: orphaned-tools-detector.ts:29 Function signature mismatch breaks mcp-node-editor.tsx — see inline comment

🟠⚠️ Major (0) 🟠⚠️

No major issues identified.

🟡 Minor (0) 🟡

No minor issues identified.

💭 Consider (0) 💭

No additional suggestions.

🧹 While You're Here (1) 🧹

🧹 1) node-types.tsx MCPNodeData interface missing temp properties

Issue: The MCPNodeData interface is missing tempSelectedTools and tempHeaders properties that are accessed via (node.data as any) casts in orphaned-tools-detector.ts.

Why: Since you're already cleaning up this file by removing unused parameters and improving property access patterns (using destructuring for relationshipId), this is a natural opportunity to complete the type safety improvement.

Fix: Add the missing properties to MCPNodeData in node-types.tsx:

export interface MCPNodeData extends Record<string, unknown>, AnimatedNode {
  toolId: string;
  subAgentId?: string | null;
  relationshipId?: string | null;
  name?: string;
  imageUrl?: string;
  provider?: string;
  tempSelectedTools?: string[] | null; // Add this
  tempHeaders?: Record<string, string>; // Add this
  tempToolPolicies?: Record<string, { needsApproval?: boolean }>;
}

Refs: node-types.tsx:41-49 — current MCPNodeData interface


🚫 REQUEST CHANGES

Summary: The PR introduces a breaking change that will cause TypeScript compilation errors. The edges parameter was removed from three utility functions in orphaned-tools-detector.ts, but mcp-node-editor.tsx still passes 3 arguments to these functions. Please update mcp-node-editor.tsx to remove the edges argument from the affected function calls (lines 74, 97, 99-103) and their dependency arrays.

Discarded (1)
Location Issue Reason Discarded
orphaned-tools-detector.ts:32-33 Type inconsistency with tempSelectedTools access Reclassified as "While You're Here" — pre-existing issue worth addressing alongside this PR's cleanup
Reviewers (3)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-standards 1 0 0 0 1 0 0
pr-review-frontend 0 0 0 0 0 0 0
pr-review-consistency 1 0 0 1 0 0 0
Total 2 0 0 1 1 0 0

Copy link
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

0 Key Findings | Risk: Low

Re-Review Delta Assessment

This is a delta-scoped re-review following my previous REQUEST_CHANGES review. The single commit since the last review (7fa20992 fix typecheck) correctly addresses the critical issue I identified:

Previous Critical Issue (RESOLVED): The edges parameter was removed from utility functions in orphaned-tools-detector.ts, but mcp-node-editor.tsx was still passing 3 arguments.

Fix Applied:

  • ✅ Removed edges from the useAgentStore selector (line 56)
  • ✅ Updated getCurrentHeadersForNode call to 2 arguments (line 71)
  • ✅ Updated getCurrentSelectedToolsForNode call to 2 arguments (line 94)
  • ✅ Updated getCurrentToolPoliciesForNode call to 2 arguments (line 95)
  • ✅ Removed edges from useCallback dependency array (line 72)

The fix is clean and correctly aligns the caller with the updated function signatures. No new issues introduced.

🟡 Remaining Consideration (from prior review)

The "While You're Here" suggestion from the prior review about adding tempSelectedTools, tempHeaders, and tempToolPolicies to the MCPNodeData interface to eliminate (node.data as any) casts remains valid but is not blocking — it's a type safety improvement that can be addressed in a follow-up PR.


✅ APPROVE

Summary: The critical breaking change has been fixed. The PR now correctly implements the warning for connecting already-connected MCPs and the "No tools" display improvement. Ship it! 🚀

Reviewers (0)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
Delta-only review — no subagents dispatched

Note: This was a delta-scoped re-review. The previous full review already dispatched specialized reviewers for the complete PR.

@github-actions github-actions bot deleted a comment from claude bot Feb 10, 2026
@dimaMachina dimaMachina merged commit 32bff8f into main Feb 10, 2026
9 checks passed
@dimaMachina dimaMachina deleted the prd-6010 branch February 10, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments