Repository navigation
fix: correct MCP setup and command result messages - #287
Merged
Merged
Conversation
The status tests used /configured/, which also matches "not configured", so a configured editor shown as not configured still passed. The JSON-RPC skip test accepted any success object, including a decoy line with no jsonrpc field. Probe: the old regex matches "not configured". npm run check passed 449 tests, 92.58% line coverage, and vsce package. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Configure MCP treated every read error as a missing file, parsed that as an empty object, and wrote a patchloom-only config. A missing file is still created. Any other read error now fails the command before write. Status inspection still ignores read errors so the status bar can render. The README states the same contract. npm run check: 451 passed, line coverage 92.58%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
The changes job in ci.yml was the only workflow job without timeout-minutes. It runs dorny/paths-filter on pull requests. Five minutes matches the other short jobs. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
VS Code's Add Server flow prefers a workspace-root .mcp.json file with mcpServers, and the Agent Host reads that file directly. Configure MCP can write that target, including type stdio, and leaves .vscode/mcp.json alone unless that older target is selected. Sibling servers in an existing .mcp.json stay. A second configure of the same entry does not rewrite the file. npm run check: 452 passed, line coverage 92.62%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
The configured state is "$(plug) Patchloom" plus the detected version when known. The ready-without-MCP state is "$(check) Patchloom" plus that version. A missing or old CLI stays "$(warning) Patchloom". npm run check: 452 passed, line coverage 92.65%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Configure MCP followed a symlink at .mcp.json or .vscode and could replace a file outside the folder. Status refresh read that same path on activation. Both paths now use the realpath check quick actions already use. A Windsurf directory that does not exist yet is still created. A symlink to an outside file is not read and is not written. npm run check: 453 passed, line coverage 92.55%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
On macOS, /var and /tmp are symlinks to /private. A Quick Action or Create could treat a file inside the folder as outside when the workspace URI and the file path used different prefixes. The relative path now falls back to the real directory only when that real path stays inside the workspace. npm run check: 454 passed, line coverage 92.56%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Quick actions asked to save a dirty file only when the editor path and the workspace path were the same string. On macOS those strings differ for /var and /private/var, so a typed path skipped the save prompt and the later apply could overwrite unsaved edits. Path identity now uses realpath. npm run check: 455 passed, line coverage 92.59%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|
|
||
| function normalizeRealFilePath(value: string): string { | ||
| const resolved = path.resolve(value); | ||
| let normalized = resolved; |
Create, doc get, doc keys, doc len, and undo returned on a non-zero exit before writing the CLI streams. Initialize, Configure MCP, Verify MCP, and managed install or update failures left the text in a toast or an unopened channel. With tracing off, the full error was easy to miss. Those failures now open the Patchloom output channel. npm run check: 455 passed, line coverage 92.53%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Configure MCP parsed mcp.json and wrote it back with JSON.stringify. A comment or a trailing comma in .vscode/mcp.json disappeared the first time the patchloom server was added, and a matching entry was rewritten when its keys were in a different order. Existing files are now edited in place. A servers value that is not an object is left unchanged. npm run check: 457 passed, line coverage 92.56%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
patchloom batch skips blank lines and lines whose first non-whitespace character is #. Batch Apply counted those lines, so a comment-only plan still reported that operations were applied, and a commented plan over-counted. The count now matches the CLI, and a comment-only plan is refused before the command runs. npm run check: 458 passed, line coverage 92.55%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
The README said patch apply and patch merge skip containment when the patch file is outside the workspace. Those commands copy that file into the workspace and still pass --contain. npm run check: 458 passed, line coverage 92.57%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Quick Action preview treated exit 3 as "No changes to preview" for every command except doc update and delete-where. patchloom 0.37 uses exit 3 when an md section command cannot find the heading, so a typo looked like a no-op. Those previews now show the CLI error. npm run check: 459 passed, line coverage 92.56%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Set structured value asked for servers[port>8000]. patchloom 0.37 rejects that selector on doc set (exit 1, file unchanged) and accepts it on doc update and doc get. The set box now asks for a concrete path. The compare example stays on Update matching structured values and on Read structured value. npm run check: 460 passed, line coverage 92.57%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Quick Action preview treated exit 3 as "No changes to preview" for doc append, prepend, merge, and move. patchloom 0.37 uses that exit when the key is missing, so a bad path looked like a no-op. Those previews now show the CLI error. Delete of an absent key still exits 0, and text replace still treats exit 3 as no matches. npm run check: 461 passed, line coverage 92.58%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
The default Batch Apply plan used replace PATH "anchor_line" --insert-after="...". patchloom 0.37 does not treat --insert-after as a batch flag, so that token becomes the new text and the matched line is replaced. The plan now uses file.prepend, which inserts a line. The other eleven template lines still apply on a matching tree. npm run check: 461 passed, line coverage 92.60%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
The 0.37.0 Windows zip extracts patchloom.exe at the archive root. Unix archives still nest the binary under patchloom-<triple>/. Managed install only looked in the nested directory, so Windows install tried to promote a binary that was never moved. Look in the nested path, then the archive root. When neither copy is present, report an extract failure instead of a replace failure. npm run check: 463 passed, line coverage 92.67%, vsce package succeeded. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Configure MCP wrote earlier config files, then a later target whose server map was not an object threw. The toast only said the command failed, so a saved VS Code config looked unchanged. The error now keeps the completed results, and the message says how many targets were updated before the stop. npm run check: 464 passed, line coverage 92.75%, vsce package. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Batch Apply counted every plan line as applied when patchloom exited 0. CLI 0.37 keeps earlier writes when another replace matches nothing and records that on the JSON refused list, or as match_count 0 when the miss is on a file the plan also wrote. The command now requests --json and the toast names those refused operations. Live probe: doc.set plus a missing replace exited 0 and the message named b.txt (no matches). npm run check: 468 passed, line coverage 92.79%, vsce package. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
CLI 0.37 exits 0 when doc.delete does not remove a key, including when an earlier doc.set in the same plan already wrote. The JSON records mutations[].changed false and omits refused. The completion message now names that operation. Live probe: doc.set plus doc.delete of a missing key exited 0 and the message named d.json (doc.delete changed nothing). npm run check: 470 passed, line coverage 92.82%, vsce package. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
patch apply and patch merge exit 0 with applied set to false when every hunk is already present. Quick Actions now request JSON and show a warning instead of a success toast. A patch that writes a file still reports success. npm run check: 472 passed, line coverage 92.83%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Search files without a match exits 3 when the list is empty. An empty folder and a glob that matches nothing use that same exit, so the Quick Action no longer says every scanned file contains the pattern. npm run check: 473 passed, line coverage 92.83%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
A doc.update that matches nothing names itself in the error. The Quick Action toast treated that name as a suggestion to run the same action. A real "Use: doc update" hint still points at the Update action. npm run check: 475 passed, line coverage 92.83%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
apply-fragment and insert-before or insert-after exit 3 when the anchor is not in the file. Preview treated that like a text replace with nothing to change. Those misses now show the CLI error. npm run check: 476 passed, line coverage 92.86%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
A rename-only batch plan exits 0 with files_changed 0 and files_renamed 1. The toast said no files changed. It now counts renames. npm run check: 477 passed, line coverage 92.85%. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
SebTardif
marked this pull request as ready for review
October 5, 2026 22:56
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(mcpServers,type: stdio) and still writes only the targets you pick. An existing config is edited in place, so comments and trailing commas stay. A file that cannot be read is left alone. If a later target fails, the message names the targets already saved.patchloom.exeat the zip root as well as in the nested folder.doc.updatethat matched nothing does not suggest Update again. Batch Apply reports a rename, a replace that matched nothing, and a delete that removed nothing, and it does not count#comment lines. The batch template usesfile.prependinstead of--insert-after.Why
Several commands reported success, "no changes", or a completed count when the CLI had refused the write, missed the anchor, or changed a different count. MCP setup could also drop comments from an existing file or hide a partial write.
Verification
npm run checkon75521c1: 477 passed, line coverage 92.85%, vsce package succeeded.applied: false, and the extension message matches that result.Checklist
git commit -snpm run checkand it passes