fix: prevent sync config from destroying externally-managed configs#204
Open
tylergraydev wants to merge 2 commits intomainfrom
Open
fix: prevent sync config from destroying externally-managed configs#204tylergraydev wants to merge 2 commits intomainfrom
tylergraydev wants to merge 2 commits intomainfrom
Conversation
When the database has no MCP servers for a project, sync was replacing the mcpServers key with an empty object, destroying hand-configured servers. Now skips the overwrite when DB returns no servers. Fixes #191 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… import .mcp.json on project add Fixes #191 (reopened) — Sync Config was still overwriting .mcp.json, claude.json, opencode.json, and other editor configs with empty settings when a project had no MCPs in the app's database. Root cause: The previous fix (3064d5f) only guarded write_project_config() and write_global_config(), but missed write_project_to_claude_json() and all other editor config writers (OpenCode, Copilot, Cursor, Gemini, Codex). Changes: - Guard all 7 config writers against overwriting with empty MCP data - Import MCPs from .mcp.json when a project is added (so externally-configured servers appear in the UI instead of showing an empty project) - Fix has_mcp_file check (was looking at .claude/.mcp.json, now checks .mcp.json in project root per the official spec) - Add missing Tauri commands: open_folder, update_project_editor_type Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.mcp.json,claude.json,opencode.json, and other editor configs with empty{}when a project had no MCPs in the app's database.mcp.jsonon project add — externally-configured servers now appear in the UI instead of showing an empty projectopen_folderandupdate_project_editor_typewere invoked by the frontend but never implementedRoot cause
The previous fix (3064d5f) only guarded
write_project_config()andwrite_global_config(), but missedwrite_project_to_claude_json()and all other editor config writers (OpenCode, Copilot, Cursor, Gemini, Codex). Additionally,.mcp.jsonwas never read/imported when adding a project — the app only checked if the file existed but never parsed it.Changes
config_writer.rswrite_project_to_claude_jsonagainst empty overwriteopencode_config.rscopilot_config.rscursor_config.rsgemini_config.rscodex_config.rsscanner.rsimport_mcps_from_project_mcp_jsonfunctionprojects.rs.mcp.jsonpath, addopen_folder+update_project_editor_typecommandslib.rsTest plan
cargo check— 0 errorscargo test— 1991 tests pass (including updated preservation test).mcp.json→ servers should appear in the UI.mcp.jsonshould be preservedopen_folderand editor type switching work in project dashboard🤖 Generated with Claude Code