mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Desktop MCP settings was synchronously probing every configured server from /api/mcp, which made the list page scale with connection latency and surface brittle behavior as installs accumulated more MCPs. Return lightweight snapshot rows from the list API, keep explicit status checks separate, and let the desktop UI refresh status in a constrained background lane while preserving project-aware server identity. Constraint: MCP list must stay responsive even with many configured servers Rejected: Probe all servers from the list view without limits | still fans out with server count and can overload slow installs Rejected: Keep servers permanently unchecked until detail view | misses the desired loading feedback when the MCP page opens Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep /api/mcp as a configuration snapshot endpoint; do not reintroduce per-row live connect work on list load Tested: bun test src/server/__tests__/mcp.test.ts; cd desktop && bun run test -- mcpSettings.test.tsx; cd desktop && bun x tsc --noEmit --ignoreDeprecations 5.0 Not-tested: Real desktop interaction against an environment with dozens of live MCP servers