fix(app): bypass path normalization to fix sidebar session queries on…#1164
fix(app): bypass path normalization to fix sidebar session queries on…#1164shanliuling wants to merge 2 commits intodifferent-ai:devfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@shanliuling is attempting to deploy a commit to the Different AI Team on Vercel. A member of the Team first needs to authorize it. |
|
Please merge this PR, OpenWork is unusable on Windows without this fix (bug still happening on v0.11.196). |
… Windows (resolved conflicts)
d09bde9 to
49ab92f
Compare
Thanks for the support!
|
|
Please devs merge this, currently Windows users cannot use this app at all due to this bug, that's a big part of computer users. I tried to build but it is a nightmare to build and run on Windows. |
|
Has the latest version fixed it? If it has, I will close this PR. |
|
@shanliuling Unfortunately I cannot test anymore since the access to the Windows build was made to be paid. Given how the app is freely accessible for other platforms and how unreliable it is on Windows, I don't think that was a good idea at all and is quite discriminative, but maybe the idea was to reduce the devs workload more than really making a commercial offering? |
|
Trying to borrow a laptop to test this on |
|
Thanks for digging into this. I did a deeper pass on the bug and the proposed fix is pointing at the right root cause: Windows session history breaks when the sidebar query path no longer matches the exact directory string stored by the server/SQLite layer. That said, this PR appears to be superseded by #1256, which is already merged into So my current read is:
Unless we find a remaining repro on current |
Fixes: #860
What
Bypass aggressive path normalization for the
directoryquery when fetching sidebar workspace sessions from the OpenCode server on Windows.Why
Currently on Windows, the
normalizeDirectoryQueryPathfunction converts raw Windows paths (e.g.,D:\Projects\MyWork) into forward-slashed lowercase paths (e.g.,d/projects/mywork). However, the OpenCode server's underlying SQLite database stores the raw paths. This mismatch causes the server-side directory filter to fail, resulting in an empty session history list in the sidebar on app restart.How
normalizeDirectoryQueryPathfrom thequeryDirectoryassignment in refreshSidebarWorkspaceSessions (located in app.tsx).directorystring directly to the server, the query correctly matches the stored SQLite payload.filtered = root ? list.filter(...) : list) remains unchanged, safely usingnormalizeDirectoryPathon both sides to ensure exact matching after the data is received.