Skip to content

Commit c08d9fe

Browse files
committed
fix(ConnectIDEs): per-IDE correct instructions + popover opens upward
Two distinct bugs in the IDE install flow, both fixed: 1. The popover anchored to the icon with `top-full mt-2`, opening downward. In the Clients empty state the grid sits near the bottom of its Card, so the action button ended up below the scroll viewport and users had to scroll to find it. Flipped to `bottom-full mb-2` + repositioned the arrow to the bottom edge; the popover now floats above the icon. 2. The per-card "what you do next" blurb was a switch on the action type (`deep_link` vs `copy_config` vs `copy_command`), which papered over real per-IDE differences. In particular the generic "restart the IDE" wording was wrong for several clients and missed the one-click tripwires that the generic "start a chat" path would never surface. Replaced with a per-entry `nextStep` string, each one written from the actual IDE flow: * VS Code — auto-starts the server; user only needs to run "MCP: Show Installed Servers" → Start if it doesn't come up on its own. * Cursor — explicit toggle required in Settings → MCP Tools; does NOT auto-start newly-added servers. * Windsurf — Cascade → MCP settings, paste + Refresh or reload. * Claude Code — `claude mcp add` needs a new session; existing sessions need /restart. * JetBrains / Android Studio — AI Assistant MCP config only reads on IDE startup, full restart required. * JSON — generic reminder that each client's reload path differs. The lingering "Copied — paste & restart" chip now reads "Copied — paste & follow above" so the text doesn't contradict nextStep for IDEs that require a toggle instead of a restart. pnpm typecheck + lint clean; warning count unchanged at 31. Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
1 parent 7dcd554 commit c08d9fe

1 file changed

Lines changed: 50 additions & 14 deletions

File tree

apps/desktop/src/components/ConnectIDEs.tsx

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ interface GridEntry {
1818
icon?: string;
1919
action: GridAction;
2020
handler: (() => Promise<void>) | string;
21+
/**
22+
* Per-IDE, what does the user actually have to do after the button fires?
23+
* Each IDE's "make MCP server live" flow is different — VS Code auto-starts
24+
* while Cursor needs the server toggled on, for example. Keep this wording
25+
* specific; a generic "restart" message has already misled testers.
26+
*/
27+
nextStep: string;
2128
}
2229

2330
interface ConnectIDEsProps {
@@ -40,6 +47,11 @@ export function ConnectIDEs({ gatewayUrl, gatewayRunning }: ConnectIDEsProps) {
4047
icon: vscodeIcon,
4148
action: 'deep_link',
4249
handler: () => addToVscode(gatewayUrl),
50+
nextStep:
51+
'Opens VS Code and drops mcpmux into mcp.json. VS Code starts the server ' +
52+
'automatically — if it doesn’t, open the Command Palette and run ' +
53+
'"MCP: Show Installed Servers", then click Start on mcpmux. The approval ' +
54+
'prompt lands on this page.',
4355
},
4456
{
4557
id: 'cursor',
@@ -48,6 +60,10 @@ export function ConnectIDEs({ gatewayUrl, gatewayRunning }: ConnectIDEsProps) {
4860
icon: cursorIcon,
4961
action: 'deep_link',
5062
handler: () => addToCursor(gatewayUrl),
63+
nextStep:
64+
'Opens Cursor and adds mcpmux to its config. Cursor does not auto-start ' +
65+
'new MCP servers — go to Settings → Features → MCP (or the MCP ' +
66+
'Tools panel) and toggle mcpmux on. The approval prompt lands on this page.',
5167
},
5268
{
5369
id: 'windsurf',
@@ -56,6 +72,10 @@ export function ConnectIDEs({ gatewayUrl, gatewayRunning }: ConnectIDEsProps) {
5672
icon: windsurfIcon,
5773
action: 'copy_config',
5874
handler: `"mcpmux": {\n "serverUrl": "${mcpUrl}"\n}`,
75+
nextStep:
76+
'Copies a JSON snippet. In Windsurf, open Cascade → MCP settings, ' +
77+
'paste mcpmux under mcpServers, and hit "Refresh" (or reload Windsurf). ' +
78+
'Approve on this page when Windsurf reaches the gateway.',
5979
},
6080
{
6181
id: 'claude-code',
@@ -64,6 +84,10 @@ export function ConnectIDEs({ gatewayUrl, gatewayRunning }: ConnectIDEsProps) {
6484
icon: claudeIcon,
6585
action: 'copy_command',
6686
handler: `claude mcp add --transport http --scope user mcpmux ${mcpUrl}`,
87+
nextStep:
88+
'Copies a `claude mcp add` command. Run it in your shell — Claude Code ' +
89+
'loads mcpmux on the next `claude` invocation (existing sessions need ' +
90+
'/restart). Approve on this page when it connects.',
6791
},
6892
{
6993
id: 'jetbrains',
@@ -72,6 +96,10 @@ export function ConnectIDEs({ gatewayUrl, gatewayRunning }: ConnectIDEsProps) {
7296
icon: jetbrainsIcon,
7397
action: 'copy_config',
7498
handler: `"mcpmux": {\n "url": "${mcpUrl}"\n}`,
99+
nextStep:
100+
'Copies a JSON snippet. Paste into the AI Assistant MCP config, then ' +
101+
'restart the IDE — JetBrains only reads MCP config on startup. Approve ' +
102+
'on this page.',
75103
},
76104
{
77105
id: 'android-studio',
@@ -80,13 +108,19 @@ export function ConnectIDEs({ gatewayUrl, gatewayRunning }: ConnectIDEsProps) {
80108
icon: androidStudioIcon,
81109
action: 'copy_config',
82110
handler: `"mcpmux": {\n "httpUrl": "${mcpUrl}"\n}`,
111+
nextStep:
112+
'Copies a JSON snippet. Paste into Android Studio’s AI Assistant MCP ' +
113+
'config, then restart the IDE. Approve on this page.',
83114
},
84115
{
85116
id: 'copy-config',
86117
name: 'JSON Config',
87118
label: 'JSON',
88119
action: 'copy_config',
89120
handler: `"mcpmux": {\n "type": "http",\n "url": "${mcpUrl}"\n}`,
121+
nextStep:
122+
'Copies a generic MCP JSON snippet. Paste into any MCP-compatible client ' +
123+
'and follow its reload instructions. Approve on this page when it connects.',
90124
},
91125
];
92126

@@ -173,26 +207,24 @@ export function ConnectIDEs({ gatewayUrl, gatewayRunning }: ConnectIDEsProps) {
173207
{entry.label}
174208
</span>
175209

176-
{/* Popover */}
210+
{/* Popover — opens UPWARD. The grid usually sits at the
211+
bottom of a Card (Dashboard + Clients empty state), so
212+
opening downward put the action button below the scroll
213+
viewport on first paint, forcing users to scroll to find
214+
it. Anchor to the bottom of the trigger button instead. */}
177215
{isActive && (
178216
<div
179-
className="absolute top-full left-0 mt-2 z-10 w-60 rounded-lg border border-[rgb(var(--border))] bg-white dark:bg-zinc-900 shadow-lg p-3"
217+
className="absolute bottom-full left-0 mb-2 z-10 w-64 rounded-lg border border-[rgb(var(--border))] bg-white dark:bg-zinc-900 shadow-lg p-3"
180218
data-testid="client-popover"
181219
>
182-
{/* Arrow */}
183-
<div className="absolute -top-1.5 left-4 h-3 w-3 rotate-45 border-l border-t border-[rgb(var(--border))] bg-white dark:bg-zinc-900" />
184-
185220
<p className="text-xs font-semibold mb-1 relative">{entry.name}</p>
186221

187-
{/* Per-action "what happens + what's next" blurb. Users
188-
kept asking "did it install? should I restart?" —
189-
state both up front. */}
222+
{/* Per-IDE instructions. Not a switch on action type —
223+
each IDE's post-install step is meaningfully different
224+
(VS Code auto-starts, Cursor needs explicit toggle,
225+
JetBrains needs a full restart, etc.). */}
190226
<p className="text-[11px] leading-snug text-[rgb(var(--muted))] mb-2.5">
191-
{entry.action === 'deep_link'
192-
? 'Opens the IDE and registers mcpmux automatically. Start a new chat or reload MCP servers in the IDE, then approve on the Clients page.'
193-
: entry.action === 'copy_command'
194-
? 'Copies a terminal command to your clipboard. Run it in your shell, then restart the IDE and approve on the Clients page.'
195-
: 'Copies a JSON snippet to your clipboard. Paste it into the IDE’s MCP config file, restart the IDE, then approve on the Clients page.'}
227+
{entry.nextStep}
196228
</p>
197229

198230
{entry.action === 'deep_link' ? (
@@ -208,7 +240,7 @@ export function ConnectIDEs({ gatewayUrl, gatewayRunning }: ConnectIDEsProps) {
208240
) : isCopied ? (
209241
<div className="flex items-center justify-center gap-1 text-xs text-green-600 h-7 relative">
210242
<Check className="h-3 w-3" />
211-
Copied — paste &amp; restart
243+
Copied — paste &amp; follow above
212244
</div>
213245
) : (
214246
<Button
@@ -222,6 +254,10 @@ export function ConnectIDEs({ gatewayUrl, gatewayRunning }: ConnectIDEsProps) {
222254
{entry.action === 'copy_config' ? 'Copy config' : 'Copy command'}
223255
</Button>
224256
)}
257+
258+
{/* Arrow — points down from the popover to the trigger
259+
icon below. */}
260+
<div className="absolute -bottom-1.5 left-4 h-3 w-3 rotate-45 border-r border-b border-[rgb(var(--border))] bg-white dark:bg-zinc-900" />
225261
</div>
226262
)}
227263
</div>

0 commit comments

Comments
 (0)