Skip to content

feat(threads): add virtual MCP association to threads#2286

Open
danielfurt wants to merge 1 commit intomainfrom
feat/add-virtual-mcp-to-threads
Open

feat(threads): add virtual MCP association to threads#2286
danielfurt wants to merge 1 commit intomainfrom
feat/add-virtual-mcp-to-threads

Conversation

@danielfurt
Copy link
Collaborator

@danielfurt danielfurt commented Jan 23, 2026

  • Add virtual_mcp_id column to threads table with migration
  • Update thread creation and listing to support virtual MCP filtering
  • Add virtual MCP selector in chat UI
  • Update thread storage and API to handle virtual_mcp_id
  • Add indexes for efficient filtering by virtual_mcp_id
  • Update chat store to manage virtual MCP selection
  • Refactor home page to support virtual MCP filtering

What is this contribution about?

Describe your changes and why they're needed.

Screenshots/Demonstration

Add screenshots or a Loom video if your changes affect the UI.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Associate each thread with the selected virtual MCP (agent) using virtual_mcp_id to show the correct agent and enable filtering by agent across the app.

  • New Features

    • Storage/API: Added virtualMcpId to Thread schema and create/update flows; Decopilot stream/process pipeline forwards agent ID.
    • Listing: Threads support filtering by virtual MCP; client hook handles tool errors gracefully.
    • Chat UI: Improved virtual MCP selector with agent icon/name; Ice Breakers keyed to selected agent; consistent IntegrationIcon sizing.
    • Navigation: New sidebar “All chats” section showing threads with agent icons and a hide action.
    • Home: New Agents list and updated empty state that displays the selected agent.
    • Performance: Added indexes for virtual_mcp_id and organization_id + virtual_mcp_id.
  • Migration

    • Run database migrations to add the virtual_mcp_id column and indexes (029-add-thread-virtual-mcp-id).

Written for commit 39b4a18. Summary will update on new commits.

- Add virtual_mcp_id column to threads table with migration
- Update thread creation and listing to support virtual MCP filtering
- Add virtual MCP selector in chat UI
- Update thread storage and API to handle virtual_mcp_id
- Add indexes for efficient filtering by virtual_mcp_id
- Update chat store to manage virtual MCP selection
- Refactor home page to support virtual MCP filtering
@github-actions
Copy link
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Contributor

Release Options

Should a new version be published when this PR is merged?

React with an emoji to vote on the release type:

Reaction Type Next Version
👍 Prerelease 2.38.2-alpha.1
🎉 Patch 2.38.2
❤️ Minor 2.39.0
🚀 Major 3.0.0

Current version: 2.38.1

Deployment

  • Deploy to production (triggers ArgoCD sync after Docker image is published)

Copy link
Contributor

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

Choose a reason for hiding this comment

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

1 issue found across 22 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/mesh/src/web/components/chat/ice-breakers.tsx">

<violation number="1" location="apps/mesh/src/web/components/chat/ice-breakers.tsx:351">
P2: Removing the key from ErrorBoundary means it won’t reset after a connection change, so a previous error can permanently blank the ice breakers until full page reload. Keep the key on ErrorBoundary so it remounts when connectionId changes.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

>
<ErrorBoundary key={errorBoundaryKey} fallback={null}>
<Suspense fallback={<IceBreakersFallback />}>
<ErrorBoundary fallback={null}>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 23, 2026

Choose a reason for hiding this comment

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

P2: Removing the key from ErrorBoundary means it won’t reset after a connection change, so a previous error can permanently blank the ice breakers until full page reload. Keep the key on ErrorBoundary so it remounts when connectionId changes.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/src/web/components/chat/ice-breakers.tsx, line 351:

<comment>Removing the key from ErrorBoundary means it won’t reset after a connection change, so a previous error can permanently blank the ice breakers until full page reload. Keep the key on ErrorBoundary so it remounts when connectionId changes.</comment>

<file context>
@@ -350,8 +348,11 @@ export function IceBreakers({ className }: IceBreakersProps) {
     >
-      <ErrorBoundary key={errorBoundaryKey} fallback={null}>
-        <Suspense fallback={<IceBreakersFallback />}>
+      <ErrorBoundary fallback={null}>
+        <Suspense
+          key={connectionId ?? "default"}
</file context>
Suggested change
<ErrorBoundary fallback={null}>
<ErrorBoundary key={connectionId ?? "default"} fallback={null}>
Fix with Cubic

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