fix: MCP install command always visible in Cmd+K regardless of mcpStatus

The command was gated on `mcpStatus !== 'checking'` which meant it was
hidden during the initial async status check. Changed enabled to always
be true so users can find and run the command immediately on app start.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-03-07 11:58:46 +01:00
parent f2ec2ab55c
commit dc22a2d7d9
2 changed files with 5 additions and 5 deletions

View File

@@ -215,18 +215,18 @@ describe('install-mcp command', () => {
expect(cmd!.label).toBe('Restore MCP Server')
})
it('is disabled when mcpStatus is checking', () => {
it('is enabled even when mcpStatus is checking', () => {
const config = makeConfig({ mcpStatus: 'checking', onInstallMcp: vi.fn() })
const { result } = renderHook(() => useCommandRegistry(config))
const cmd = findCommand(result.current, 'install-mcp')
expect(cmd!.enabled).toBe(false)
expect(cmd!.enabled).toBe(true)
})
it('is disabled when no handler provided', () => {
it('is enabled even when no handler provided', () => {
const config = makeConfig({ mcpStatus: 'not_installed' })
const { result } = renderHook(() => useCommandRegistry(config))
const cmd = findCommand(result.current, 'install-mcp')
expect(cmd!.enabled).toBe(false)
expect(cmd!.enabled).toBe(true)
})
it('has restore keyword for discoverability', () => {