You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SortableWorkspace session list empty due to store.path.directory not bootstrapped #21441
Session list is completely empty on Windows web UI. Skeleton briefly appears on refresh then disappears. Verified via DevTools that GET /session?directory=...&roots=true returns sessions correctly, so this is a client-side store management issue caused by directory format mismatch creating duplicate child stores. child-store.ts creates separate stores for the same physical directory when path formats differ (D:/... vs D:\...), exceeding MAX_DIR_STORES=30 and triggering eviction. loadSessions writes to a disposed store — session data is lost entirely.
Plugins
none
OpenCode version
0.0.0-dev-202604080233 source build (dev branch)
Steps to reproduce
Open web UI on Windows
Have multiple projects or switch between sessions
Observe session list is empty
DevTools Network shows API returns sessions but sidebar renders none
If your issue is distinct from these, please add a note explaining the difference.
Distinct from both. #14570 is about filtering — sessions exist in store but get filtered by workspaceKey() mismatch. #16744 is about missing sessions after upgrade. This is a store management bug: child-store.ts creates separate stores for the same physical directory when path formats differ (D:/... vs D:...), exceeding MAX_DIR_STORES=30 and triggering eviction. loadSessions writes to a disposed store — data is lost, not just filtered. Affects both LocalWorkspace and SortableWorkspace on Windows.
Typical Scenario: API Returns Data but Frontend Doesn't Display
Even when the Path A (forward slashes) API request successfully returns session data, the frontend may still not display it. This is because data is written to the wrong store.
Complete Sequence
1. Page loads, loadSessions triggered simultaneously from two sources
Path A: loadSessions("D:/project/workspace") ← LayoutProvider.onMount
Path B: loadSessions("D:\project\workspace") ← SyncProvider → bootstrapInstance
2. Inside loadSessions, ensureChild(directory) creates/gets child store
Path A: children["D:/project/workspace"] → creates store_A
Path B: children["D:\project\workspace"] → creates store_B (same directory, different key)
3. API returns data, written to respective stores
Path A: session.list({ directory: "D:/project/workspace" }) → returns 9 sessions
→ writes to store_A.session = [9 sessions]
Path B: session.list({ directory: "D:\project\workspace" }) → returns 0 (server-side mismatch)
→ store_B.session = []
4. Which store does the frontend render read from?
currentSessions() memo → visibleSessionDirs() → currentDir() → route().dir
→ route() memo: globalSync.peek("D:\project\workspace") → looks up children["D:\project\workspace"]
→ gets store_B (empty)
Or if route uses the forward slash path:
→ gets store_A (has data), but roots() filter:
workspaceKey(session.directory) === workspaceKey(store.path.directory)
store.path.directory is "" at this moment (bootstrap incomplete) → all filtered out
Root Conflict
Stage
Path Format Used
Result
LayoutProvider triggers loadSessions
D:/project/workspace (forward slashes)
Creates store_A, writes 9 sessions
SyncProvider triggers bootstrapInstance
D:\project\workspace (backslashes)
Creates store_B, store_B.session is empty
Frontend renders currentSessions
Depends on path in route()
May get store_A or store_B
roots() filtering
store.path.directory may not be ready
Even if store_A is retrieved, all may be filtered out
Three overlapping issues cause the empty session list:
Store Split — Same directory with two keys, data scattered across two stores
After unifying path normalization behavior, unmigrated historical data will cause users to see an empty session list despite data still existing in the database. Is this "data not lost but invisible" state acceptable, or must we implement query-layer compatibility as a fallback?
Activity
github-actions commentedon Apr 8, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct from these, please add a note explaining the difference.
chenyy9527 commentedon Apr 8, 2026
Distinct from both. #14570 is about filtering — sessions exist in store but get filtered by workspaceKey() mismatch. #16744 is about missing sessions after upgrade. This is a store management bug: child-store.ts creates separate stores for the same physical directory when path formats differ (D:/... vs D:...), exceeding MAX_DIR_STORES=30 and triggering eviction. loadSessions writes to a disposed store — data is lost, not just filtered. Affects both LocalWorkspace and SortableWorkspace on Windows.
chenyy9527 commentedon Apr 8, 2026
Data Flow Path Comparison
Session Write Path
Session Query Path (The Problem)
Two Request Paths on Page Refresh
chenyy9527 commentedon Apr 8, 2026
Typical Scenario: API Returns Data but Frontend Doesn't Display
Even when the Path A (forward slashes) API request successfully returns session data, the frontend may still not display it. This is because data is written to the wrong store.
Complete Sequence
Root Conflict
D:/project/workspace(forward slashes)D:\project\workspace(backslashes)store.path.directorymay not be readyThree overlapping issues cause the empty session list:
roots()filters out all sessions whenstore.path.directoryis not readychenyy9527 commentedon Apr 8, 2026
After unifying path normalization behavior, unmigrated historical data will cause users to see an empty session list despite data still existing in the database. Is this "data not lost but invisible" state acceptable, or must we implement query-layer compatibility as a fallback?
fix(web): normalize workspace paths to resolve Windows session list f…
wlclass commentedon Apr 9, 2026
被这个问题困扰半个月了。很痛苦
wlclass commentedon Apr 9, 2026
请问有没有临时解决办法?
fix: normalize path separators to POSIX for Windows compatibility (an…
test(opencode): normalize path comparisons with posixPath for Windows…
github-actions commentedon Jul 6, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.