Skip to content

fix(session): match Windows directory separators#28027

Open
mturac wants to merge 1 commit into
anomalyco:devfrom
mturac:fix/27996-windows-session-directory
Open

fix(session): match Windows directory separators#28027
mturac wants to merge 1 commit into
anomalyco:devfrom
mturac:fix/27996-windows-session-directory

Conversation

@mturac
Copy link
Copy Markdown

@mturac mturac commented May 17, 2026

Issue for this PR

Fixes #27996

Type of change

  • Bug fix

What does this PR do?

Normalizes Windows-style session directories when new sessions are created and matches legacy backslash-stored directories when filtering session lists.

This keeps sessions visible when Windows users open the same project with slash and backslash path variants.

How did you verify your code works?

  • bun test test/server/session-list.test.ts test/server/global-session-list.test.ts --timeout 30000
  • bun typecheck
  • bunx prettier --check src/session/session.ts test/server/session-list.test.ts test/server/global-session-list.test.ts
  • git diff --check
  • git push pre-push hook: bun turbo typecheck

Screenshots / recordings

Not applicable; session directory matching regression.

Checklist

  • I have tested this change locally.
  • I have added or updated tests where appropriate.
  • I have kept the change focused.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found several related PRs that address similar Windows path separator issues:

Related PRs:

  1. PR fix: normalize Windows desktop session paths #26580 - "fix: normalize Windows desktop session paths"

    • Directly addresses Windows session path normalization
  2. PR fix: normalize Windows session directory filters #26463 - "fix: normalize Windows session directory filters"

    • Addresses Windows session directory filter matching
  3. PR fix: sessions missing from sidebar on Windows due to path separator mismatch #23862 - "fix: sessions missing from sidebar on Windows due to path separator mismatch"

    • Earlier fix for Windows path separator issues causing sessions to be missing

These PRs appear to be addressing the same root cause (Windows backslash vs forward slash path separators affecting session visibility). While PR #28027 (the current PR) is a focused fix for issue #27996, you may want to review PRs #26580 and #26463 to ensure this fix doesn't duplicate or conflict with existing solutions, or to understand if those were incomplete/reverted fixes.

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.

project load failed when use "Open project" from the UI after "opencode web" command.

1 participant