Skip to content

fix(mcp-market): honor explicit project installation targets - #1977

Merged
vastsa merged 1 commit into
vastsa:mainfrom
Linuxdazhao:codex/mcp-market-project-owner-20261029-01a18190
Oct 29, 2026
Merged

vastsa merged 1 commit into
vastsa:mainfrom
Linuxdazhao:codex/mcp-market-project-owner-20261029-01a18190

Conversation

@Linuxdazhao

Copy link
Copy Markdown
Contributor

Installing an MCP server from Market while the MCP page is filtered to Project always sends level: "global". The selected project is lost, and the new server is absent from the project list on return.

Market now receives the page's existing installation target and selected project. Its installed badges check that destination, so an existing global definition does not prevent installing a project override. A missing project blocks project installation. All and Global keep their documented Global destination.

This is the focused marketplace fix requested in the closing review of #1954.

Reproduction

On origin/main at 00a1a0ea90e952fabb67d638ac74eae3a8fe0342:

  1. Open Settings > MCP and select a project.
  2. Select the Project filter, then open Market.
  3. Install a builtin entry that is not already installed.
  4. Return to MCP settings.

Expected: the upsert carries level: "project" and the selected projectPath, and the project list shows the new server. Actual: the panel sends level: "global" without the project owner.

Validation

  • The new real React/Electron interaction test fails before the fix with project installation wrote to global. It mocks only the IPC boundary and covers six ownership cases, visible installed state, and both missing-project guards.
  • All 44 targeted tests pass, including that Electron test and the MCP market, registry, capability-settings, and settings-import regressions.
  • The existing market retry Electron E2E passes.
  • Desktop TypeScript, workspace dependency builds, lint, architecture, documentation checks, whitespace, and latest-base checks pass.

Candidate: 8b320b4eb278e256d7471081ad18629073029b0e; base: 00a1a0ea90e952fabb67d638ac74eae3a8fe0342. Electron tests use an isolated profile and deterministic IPC fixtures; they do not exercise real MCP processes or Host filesystem writes. The new regression is included in the existing Electron CI job. The Settings specification and E2E scenario are updated in both documentation languages.

The Project filter currently reaches a market panel that always saves
servers globally. Carry its existing destination into the market and
check installed records at that level so a global definition does not
block installation into a project.

Keep the documented Global destination under All. Exercise the real
page-to-IPC interaction in isolated Electron, including missing projects,
and run that regression in the existing Electron CI job.

@vastsa vastsa left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independently verified the original defect: running the new real React/Electron test with the main-branch market panel fails with project installation wrote to global. The candidate passes all 36 targeted market/capability tests, including six destination cases and missing-project guards. Shared package build and diff check pass; all six remote CI checks pass. Latest main is 00a1a0e; PR merge tree equals tested head tree 566c5c63. The change fixes destination ownership at the existing upsert boundary with minimal scope. Local fixture uses isolated Electron and mocked IPC, not real MCP execution or filesystem writes. Ready to merge.

@vastsa
vastsa merged commit 7916684 into vastsa:main Oct 29, 2026
6 checks passed
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.

2 participants