mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
The settings page could create project-scoped MCP servers for an explicit target path, but subsequent reloads only fetched the active session cwd. That made newly-added local or project MCP entries disappear when the target project differed from the active session or was only represented in the user config. Load MCP settings from the active project, recent projects, and project keys that already contain user-private MCP config. Project-scoped rows now render their project path and use project-aware identity keys so same-name servers in different projects stay distinct. Constraint: MCP local scope is keyed by project path in the user config, while project scope still resolves through the request cwd Rejected: Filesystem scan for every possible .mcp.json | unbounded and too expensive for settings load Confidence: high Scope-risk: moderate Directive: Do not collapse settings MCP fetches back to a single cwd; project/local scopes are cwd-sensitive Tested: bun test src/server/__tests__/mcp.test.ts Tested: cd desktop && bun run test -- mcpSettings.test.tsx Tested: bun run check:server Tested: bun run check:desktop Tested: git diff --check Not-tested: Discovery of project-shared .mcp.json files in directories that are neither recent projects nor active workdirs