Skip to content

fix: normalize WSL desktop session paths#22049

Open
paulcatamio wants to merge 1 commit intoanomalyco:devfrom
paulcatamio:fix/wsl-session-path-normalization
Open

fix: normalize WSL desktop session paths#22049
paulcatamio wants to merge 1 commit intoanomalyco:devfrom
paulcatamio:fix/wsl-session-path-normalization

Conversation

@paulcatamio
Copy link
Copy Markdown

Issue for this PR

Closes #17765

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This normalizes WSL UNC-style desktop paths before comparing sidebar workspace keys and before saving new session directories.

That fixes the Windows Desktop + WSL case where sessions were written to the database but disappeared from the sidebar because the same repo could be identified as both /home/... and \\wsl.localhost\....

How did you verify your code works?

  • Ran bun turbo typecheck --filter=@opencode-ai/app --filter=opencode
  • Reproduced the bug locally with Windows Desktop connected to a WSL-backed server
  • Confirmed new sessions were saved with /home/... directories in the database
  • Confirmed the patched UI showed the saved sessions in the sidebar again

Screenshots / recordings

Not attached. I verified the visible change locally by reproducing the blank-sidebar case and then confirming the saved sessions reappeared in the patched UI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

Windows Desktop loses all session history after restart, but sessions still exist in opencode.db

1 participant