fix: Windows path validation + moveMcp for .claude.json project scope - #16
Merged
Conversation
…#11, #12) Issue #12 — Windows Path Validation Failures: - import path.sep and path.isAbsolute - isPathAllowed(): use sep instead of hardcoded "/" - /api/restore, /api/file-content: use isAbsolute() instead of startsWith("/") - /api/export: use isAbsolute() instead of startsWith("/") Issue #11 — moveMcp fails for .claude.json project scope: - scanner.mjs: add claudeJsonProjectKey to items from projects[repoDir].mcpServers - mover.mjs: read/delete from correct nesting level when claudeJsonProjectKey is set (projects[key].mcpServers instead of top-level mcpServers) Closes #11, Closes #12 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7 tests covering: - /api/file-content accepts absolute paths (Issue #12) - /api/export accepts absolute paths, rejects relative paths (Issue #12) - Scanner discovers .claude.json servers with claudeJsonProjectKey (Issue #11) - No duplicate MCP servers from same file - Zero JavaScript errors All 7 passed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Config was removed in earlier cleanup commit. Restored from git history. All 138 existing E2E tests pass (4.4m, zero failures). Co-Authored-By: Claude Opus 4.6 (1M context) <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
server.mjs#12 Windows paths: replaced hardcoded/withpath.sepandstartsWith("/")withpath.isAbsolute()across 5 locations in server.mjsclaudeJsonProjectKeyfor servers underprojects[repoDir].mcpServers; mover reads/deletes from correct nesting levelTest plan
Closes #11, Closes #12
🤖 Generated with Claude Code