Skip to content

feat(mcp): activate d-keybind in /mcp browser (closes #105)#118

Merged
esengine merged 1 commit intomainfrom
feat/mcp-browser-disable-keybind
May 2, 2026
Merged

feat(mcp): activate d-keybind in /mcp browser (closes #105)#118
esengine merged 1 commit intomainfrom
feat/mcp-browser-disable-keybind

Conversation

@esengine
Copy link
Copy Markdown
Owner

@esengine esengine commented May 2, 2026

Closes #105.

Final stage: the McpBrowser modal's labelled-but-stub d keybind now persists mcpDisabled to config. Removes the "(TBD)" label from the modal footer.

Touch

  • New src/cli/ui/mcp-disable.ts exporting toggleMcpDisabled — extracted from the slash handler so the modal can call it directly.
  • src/cli/ui/slash/handlers/mcp.ts — replaces the inline read/write block with one call to toggleMcpDisabled. The unknown-name "Known: …" hint stays in the slash because it has access to mcpSpecs.
  • src/cli/ui/McpBrowser.tsxd key handler persists mcpDisabled for the selected server and closes the modal. No unknown-name check needed (user picked from a live list).
  • Footer label: [d] disable (TBD)[d] disable.

Closes #105

All stages from the tracking issue are now landed:

Stage D (tools sub-pane on browser ⏎) was marked deferred from day one and remains so.

Test plan

  • npm run verify passes (1782 tests)
  • Slash /mcp disable <name> still works — refactored, behaviour unchanged
  • Eyeball: launch with two MCP servers, type /mcp, press d on one, confirm modal closes and the "▸ X disabled — takes effect on next launch" line lands in scrollback

Final stage of #105: wire McpBrowser modal's labelled-but-stub `d`
keybind to the same `mcpDisabled` config persistence the slash
already does. Removes the "(TBD)" label from the modal footer.

- New `src/cli/ui/mcp-disable.ts` exporting `toggleMcpDisabled`,
  the readConfig+writeConfig logic that was previously inlined in
  the slash handler.
- `src/cli/ui/slash/handlers/mcp.ts` — replaces the inline
  read/write block with a single call to `toggleMcpDisabled`.
  Unknown-name validation stays in the slash since it has access
  to mcpServers + mcpSpecs to build the "Known: …" hint.
- `src/cli/ui/McpBrowser.tsx` — `d` key handler persists
  `mcpDisabled` for the selected server and closes the modal.
  No need for the unknown-name check in the modal — the user
  picked from a live list, the name is always valid.
- Footer label updated.

Refs #105.
@esengine esengine merged commit ae6021e into main May 2, 2026
1 check passed
@esengine esengine deleted the feat/mcp-browser-disable-keybind branch May 2, 2026 10:03
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.

tracking: align MCP CLI UX with TUI design doc

1 participant