Repository navigation
fix(virtual-mcp): show the instance selector before a second sibling exists - #7187
Merged
pedrofrxncx merged 1 commit intoSep 14, 2026
Merged
Conversation
…exists The + New instance option only lives inside SiblingInstanceSelector, which was hidden whenever a connection had fewer than 2 siblings of the same app. That meant the very first connection of an app could never spawn a second instance from the UI — the control that creates instance #2 only appeared after instance #2 already existed. Keep the selector mounted with a single sibling when onNewInstance is available, so + New instance stays reachable from the first connection.
pedrofrxncx
deleted the
fix/connection-instance-selector-first-instance-w4
branch
September 14, 2026 19:14
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.
Found while hunting for navigation/UI bugs in the Virtual MCP entry view (
apps/web/src/views/virtual-mcp/index.tsx) and itsconnection-item.tsxsibling.The bug:
SiblingInstanceSelector(inconnection-item.tsx) rendersnullwhenever a connection has fewer than 2 siblings sharing the sameapp_name. But the+ New instanceoption — the only UI path to actually create a second instance of a connection — lives inside that same selector. So the very first connection of an app can never spawn a second instance from the UI: the control that creates instance #2 only appears once instance #2 already exists by some other means.Why a maintainer wants this: this is a UI dead-end for any org that wants two instances of the same connection (e.g. two Google accounts, two GitHub orgs) starting from a single connection — a common real case for per-user OAuth connections.
Fix: keep the selector mounted when there's only one sibling, as long as
onNewInstanceis available (it always is from the current caller inindex.tsx), so+ New instancestays discoverable. Falls back to the oldnullbehavior ifonNewInstanceisn't passed.Net diff:
+2/-1, one conditional.To confirm: open a Virtual MCP's Connections settings with exactly one connection for an app that supports multiple instances — the instance selector (with
+ New instance) now shows instead of nothing.Verified locally:
bun run fmt,bunx oxlint apps/web/src/views/virtual-mcp/connection-item.tsx(0 warnings/errors). Fulltsc/test suite left to CI (an unrelated pre-existing prosemirror version-mismatch type error exists on this workspace, unrelated to this file).Summary by cubic
Fixes the Virtual MCP connection instance selector so
+ New instancestays visible when a connection has only one sibling. Previously the selector renderednullfor fewer than 2 siblings, hiding the only UI path to create a second instance; now it stays mounted whenonNewInstanceis provided, and falls back to the old hide behavior if not.Written for commit ca96dc2. Summary will update on new commits.