Skip to content

fix(paths): normalize displayed paths to POSIX on Windows - #72

Merged
vinilana merged 1 commit into
vinilana:mainfrom
Lordymine:aurelia/fix-posix-path-display
Jun 30, 2026
Merged

fix(paths): normalize displayed paths to POSIX on Windows#72
vinilana merged 1 commit into
vinilana:mainfrom
Lordymine:aurelia/fix-posix-path-display

Conversation

@Lordymine

@Lordymine Lordymine commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Bug

On Windows, several user-facing paths used native backslashes while tests and MCP clients expect forward slashes (POSIX-style), causing Jest failures on win32.

Reproduction

npm test on Windows (Node 20+) fails for:

  • splashScreen › shortens home-directory paths with a tilde (expected ~/workspace/..., got ~\workspace\...)
  • exploreActionService › uses the configured repo path as the default list cwd (glob returned src\example.ts)
  • workflowManage › instructs the caller... (workflowStatePath contained C:\...\.context\runtime\... instead of .context/runtime/workflows/prevc.json substring with forward slashes)

CI on Linux stays green; the bug is cross-platform consistency at API boundaries.

Fix

  • formatSplashDirectory: tilde-relative segments joined with /
  • listFilesTool: normalize glob results with forward slashes
  • toPosixContextPath helper + apply to workflowStatePath in workflow/plan responses

Verified locally: targeted Jest suites pass; tsc --noEmit clean.

Splash tilde paths, listFiles glob results, and workflowStatePath
responses used native backslashes on win32, breaking tests and MCP
consumers that expect forward slashes. Add toPosixContextPath and apply
at API boundaries.
@vinilana

Copy link
Copy Markdown
Owner

Thanks for contributting!!

@vinilana vinilana left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix!!

@vinilana
vinilana merged commit bb700b8 into vinilana:main Jun 30, 2026
@vinilana vinilana mentioned this pull request Jun 30, 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.

2 participants