Skip to content

fix: handle Windows backslash paths in encodeProjectPath#69

Merged
rhuanbarreto merged 4 commits into
mainfrom
fix/windows-path-encoding
Mar 17, 2026
Merged

fix: handle Windows backslash paths in encodeProjectPath#69
rhuanbarreto merged 4 commits into
mainfrom
fix/windows-path-encoding

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • encodeProjectPath() only replaced forward slashes (/) with dashes, but on Windows process.cwd() returns backslash paths (e.g. C:\Users\...)
  • This caused session-context lookups to fail on Windows PowerShell because the encoded directory name retained backslashes
  • Now replaces both \ and / with dashes, matching the expected directory naming for Claude/Cursor session files

Test plan

  • Added test for Windows backslash-only paths (C:\Users\user\project)
  • Added test for mixed separator paths (C:\Users/user\project)
  • All 259 existing tests pass
  • bun run validate passes

encodeProjectPath only replaced forward slashes with dashes, but on
Windows process.cwd() returns backslash paths (e.g. C:\Users\...).
This caused session-context lookups to fail on Windows PowerShell.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 17, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6d3d55
Status: ✅  Deploy successful!
Preview URL: https://68862605.archgate-cli.pages.dev
Branch Preview URL: https://fix-windows-path-encoding.archgate-cli.pages.dev

View logs

rhuanbarreto and others added 3 commits March 17, 2026 15:11
- Add src/helpers/platform.ts with WSL detection, path conversion,
  cross-environment command resolution, and platform helpers
- Unify all process.platform checks to use platform helpers
- Make encodeProjectPath async with WSL Windows path conversion
- Make getVscodeUserSettingsPath async with WSL AppData resolution
- Use resolveCommand for claude/copilot/git/npm CLI detection
- Detect install package manager (bun/pnpm/yarn/npm) in upgrade command
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds --deny-warnings to the oxlint command so warnings are treated as
errors. Suppresses the legitimate no-await-in-loop in the OAuth polling
loop. Also adds .claude/worktrees to .gitignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rhuanbarreto rhuanbarreto merged commit ad63659 into main Mar 17, 2026
8 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/windows-path-encoding branch March 17, 2026 15:40
@github-actions github-actions Bot mentioned this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant