Skip to content

fix(sync-config-ai): refactor MCP management — fix save bugs, add scope, batch import#23

Merged
savez merged 6 commits intomainfrom
fix/009-refactor-mcp-management
Apr 20, 2026
Merged

fix(sync-config-ai): refactor MCP management — fix save bugs, add scope, batch import#23
savez merged 6 commits intomainfrom
fix/009-refactor-mcp-management

Conversation

@savez
Copy link
Copy Markdown
Owner

@savez savez commented Apr 20, 2026

Summary

  • Fix edit not saving name/environments/scopeupdateEntry was only receiving {params}, now correctly passes all changed fields
  • Fix params pollution — non-MCP entries no longer store name/environments inside params; new buildEntryParams() extracts only type-specific fields
  • Fix MCP description lossbuildMCPParams now persists the description field
  • Remove double chezmoi sync — removed 7 redundant syncAIConfigToChezmoi() calls (store CRUD already handles it)
  • Add scope: project|global — new field on CategoryEntry (v2→v3 migration) lets users choose project-level or global-level deploy targets
  • Dual-path MCP_TARGETS — environments with both project and global config paths (claude-code, cursor, opencode, continue-dev, amazon-q) now deploy to the correct path based on scope
  • Scope selector in TUI forms — all 5 form types (MCP, command, rule, skill, agent) have a new Scope field
  • Batch importShift+I in the native section imports all unmanaged entries at once
  • Native entry count — section header shows [N unmanaged] count

Test plan

  • npm test — 803 passed, 13 skipped
  • npm run lint — clean
  • Manual: create MCP entry, verify ai-config.json has scope field and correct params
  • Manual: edit MCP entry (change name, environments, scope), verify all changes saved
  • Manual: create global-scope MCP for claude-code, verify ~/.claude.json updated
  • Manual: batch import native entries with Shift+I

savez and others added 4 commits April 19, 2026 21:38
…, migrate store v2→v3

Add 'scope' field ('project'|'global') to CategoryEntry typedef and wire it through
addEntry/updateEntry CRUD. Add optional 'description' to MCPParams. Migrate existing
store data from v2 to v3, defaulting all entries to scope: 'project'. Includes new
tests for migration, scope defaulting, and scope updates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Refactor MCP_TARGETS from flat per-env config to project/global sub-objects,
add resolveTarget helper with fallback, and update deploy/undeploy functions
to use entry.scope for target resolution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…le chezmoi

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a Scope (project/global) selector field to all 5 category form
generators (MCP, Command, Skill, Rule, Agent). Add batch import
(Shift+I) to import all native entries at once, with updated footer
hints and native section header showing unmanaged count.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

QA Report

Check Status
🔍 Lint
🧪 Test & Coverage
🔐 Secrets Scan

Generated automatically by QA Workflow

savez and others added 2 commits April 20, 2026 08:02
…outs

NVD_BASE_URL was hardcoded — tests passed the env var but the service
ignored it, hitting the real NVD API and timing out after 30s.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Coverage Report

@savez savez merged commit 4c6cade into main Apr 20, 2026
4 checks passed
@savez
Copy link
Copy Markdown
Owner Author

savez commented Apr 20, 2026

🎉 This PR is included in version 1.5.3

@savez savez added the released label Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant