Skip to content

fix(kits): honor OpenCode config paths and MCP conflicts - #167

Merged
RealZST merged 1 commit into
RealZST:mainfrom
Oscar-Williams:fix/kits-opencode-config
Oct 28, 2026
Merged

RealZST merged 1 commit into
RealZST:mainfrom
Oscar-Williams:fix/kits-opencode-config

Conversation

@Oscar-Williams

Copy link
Copy Markdown
Contributor

When an OpenCode project config contains comments or trailing commas, Kit preview misses existing MCP servers and sync can replace them without an overwrite selection. Projects using opencode.jsonc also receive writes in opencode.json.

Resolve the Kit MCP target through the adapter and check existing names in both files with the JSONC parser. Regression tests cover preview, skip/overwrite, partial entries, new servers and removal across JSON and JSONC layouts. This uses the OpenCode behavior established in #41 and #140.

Testing

  • npm test -- --maxWorkers=2 — 362 passed
  • npm run build
  • cargo test --workspace --locked — 798 passed on Ubuntu 26.04

The four regression tests fail on the base before the fix. Additional strict Clippy reports the same 14 existing findings on the base and this branch.

@RealZST
RealZST merged commit eece5c2 into RealZST:main Oct 28, 2026
4 checks passed
@RealZST

RealZST commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Thanks! Merged.

RealZST added a commit that referenced this pull request Oct 28, 2026
…168)

The Kits project card counted MCP servers by joining project_mcp_config_relpath(), which is always opencode.json for OpenCode, so projects that only have opencode.jsonc showed zero servers. Resolve the file through mcp_config_path_for() like the scanner and Kit sync do.

Also drop a stale "early-return path" note in the dsh conflict test; the early return was removed in #167.

Co-authored-by: RealZST <zst9626@126.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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