feat(mcp): activate d-keybind in /mcp browser (closes #105)#118
Merged
feat(mcp): activate d-keybind in /mcp browser (closes #105)#118
Conversation
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.
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.
Closes #105.
Final stage: the McpBrowser modal's labelled-but-stub
dkeybind now persistsmcpDisabledto config. Removes the "(TBD)" label from the modal footer.Touch
src/cli/ui/mcp-disable.tsexportingtoggleMcpDisabled— 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 totoggleMcpDisabled. The unknown-name "Known: …" hint stays in the slash because it has access tomcpSpecs.src/cli/ui/McpBrowser.tsx—dkey handler persistsmcpDisabledfor the selected server and closes the modal. No unknown-name check needed (user picked from a live list).[d] disable (TBD)→[d] disable.Closes #105
All stages from the tracking issue are now landed:
/mcpbrowser modal (feat(mcp): /mcp opens an interactive browser modal (Stage B of #105) #107 ✓)/mcp disable / enable+ lifecycle (feat(mcp): /mcp disable / enable + disabled lifecycle (Stage C1 of #105) #108 ✓)/mcp reconnectfor identity + append drift (feat(mcp): /mcp reconnect <name> for identity drift (closes part of #110) #115/feat(mcp): append-drift mid-session reconnect (refs #110) #117),rkeybind (feat(mcp): activate r-keybind in /mcp browser (refs #110) #116), edit/reorder/remove deferred to follow-ups (refused with clear "restart" messages — they're catastrophic for cache anyway)dkeybind in browserStage D (tools sub-pane on browser ⏎) was marked deferred from day one and remains so.
Test plan
npm run verifypasses (1782 tests)/mcp disable <name>still works — refactored, behaviour unchanged/mcp, pressdon one, confirm modal closes and the "▸ X disabled — takes effect on next launch" line lands in scrollback