Fix Map tab showing no read/written files on Windows - #15
Open
Nekoraru22 wants to merge 1 commit into
Open
Nekoraru22 wants to merge 1 commit into
Nekoraru22 wants to merge 1 commit into
Conversation
Owner
|
Congratulations 🎉 I’ll merge your pull request as soon as I’m available and include it in the next release. Are you enjoying using my extension? And are there any new feature ideas that you think would be useful? |
Author
|
Yeah it's pretty nice! thank you |
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.
Fix Map tab showing no read/written files on Windows
Problem
On Windows, the Map tab always shows
READ 0/WRITTEN 0and only renders the top-level folders, even when the session contains Read/Write/Edit steps. The root node also displays the full path (c:\Users\...\project) instead of just the folder name.Cause
MapTab.tsxdecides whether a file belongs to the project with:On Windows both
cwdandfile_pathuse backslashes (c:\Users\...), so this check never matches and every absolute path falls into theelse { continue; }branch. All file events are dropped.A second mismatch makes it worse: VS Code often reports the cwd with a lowercase drive letter (
c:\) while tool calls use uppercase (C:\), so even with matching separators a plain string comparison fails.The root node name and the cwd label use
cwd.split('/'), which returns the whole path when there are no forward slashes.Fix
cwdandfile_pathto forward slashes before comparing.cwdon/[\\/]/for the root node name and the cwd label.POSIX paths behave exactly as before.
Testing
npm run compile,npm run build:webviewandnpm run lintpass (no new warnings).c:\Users\Neko\...\project+ fileC:\Users\Neko\...\project\data\agents.json→data/agents.jsonc:\...\project+ filec:/.../project/src/App.tsx→src/App.tsx/home/a/proj+ file/home/a/proj/src/x.ts→src/x.ts(unchanged)/home/a/proj+ file/etc/x→ skipped (unchanged).vsixon Windows 11 with a Claude Code session started from the VS Code extension.Notes
Other components extract file names with
path.split('/').pop()(FlowTab,InsightsTab,GlobalSearch,DependencyGraph,sessionListViewProvider) and will show full Windows paths instead of file names. I kept this PR focused on the Map tab, but I'm happy to follow up with a shared path helper if you'd like.Images
Before:

After:
