fix: encode colons and dots in session-context project path#130
Merged
Conversation
`encodeProjectPath` only replaced `\` and `/` with `-`, but Claude Code and Cursor also replace `:` and `.`. On Windows, this caused `session-context claude-code` to look up a directory like `E:-archgate-cli-.claude-worktrees-x` instead of the actual `E--archgate-cli--claude-worktrees-x`, resulting in "No session files found". Add `:` and `.` to the replacement set and update tests to cover the exact Windows worktree scenario that was failing.
Deploying archgate-cli with
|
| Latest commit: |
37ae0d5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1ceaf85e.archgate-cli.pages.dev |
| Branch Preview URL: | https://fix-session-context-path-enc.archgate-cli.pages.dev |
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
encodeProjectPath()only replaced\and/with-, but Claude Code and Cursor also replace:and.when creating project session directories under~/.claude/projects/session-context claude-codewould look forE:-archgate-cli-.claude-worktrees-xinstead of the actualE--archgate-cli--claude-worktrees-x, causing "No session files found":and.to the replacement set to match the editor's encoding, and documented the full character mapping in JSDocTest plan
encodeProjectPathtests updated — Windows path now expectsC--Users-user-project(colon replaced)/home/user/.config/project→-home-user--config-project)E:\archgate\cli\.claude\worktrees\fancy-prancing-sedgewick) encodes correctlysession-context.test.tsandsession-context-cursor.test.tsuse the updated encodingbun run validatepasses (457 tests, 21/21 ADR checks)