Conversation
…atching On Windows, the web UI frontend normalizes paths to forward slashes (C:/Users/...) but the database stores backslashes (C:\Users\...). This caused session list queries to return 0 results after a page refresh, because the directory filter did an exact string match. Add normalizeDirectory() that converts forward slashes to backslashes on Windows when the path looks like a drive letter path (X:/...). Apply it in the workspace-routing middleware and the session list handler.
|
The following comment was made by an LLM, it may be inaccurate: Based on the search results, I found several related PRs that are potentially addressing the same issue: Potential Duplicate/Related PRs:
The most relevant are PR #28027 and PR #28040, which appear to be addressing the same Windows directory separator and path normalization issues that PR #28251 is tackling. You should check if any of these are still open and if they overlap with your changes. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
#28242
Closes #28242
Type of change
What does this PR do?
On Windows, the web UI frontend normalizes paths to forward slashes (C:/Users/...) but the database stores backslashes (C:\Users...). This caused session list queries to return 0 results after a page refresh, because the directory filter did an exact string match.
Add normalizeDirectory() that converts forward slashes to backslashes on Windows when the path looks like a drive letter path (X:/...). Apply it in the workspace-routing middleware and the session list handler.
How did you verify your code works?
i run the dev server and opened a project made some sessions and just refresh the page
Or just restart the server and let the browser reload itself, mostly on windows you loose all the sessions (or keep only 1 for some reason)
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.