mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3754] [GUI] an existing chat does not restore its sidebar workspace after restart (must re-select it to continue) #1577
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1577
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3754
Area
[GUI] (the desktop app)
Desktop app, Terminal or source?
Desktop app (Windows)
What happened
After restarting the desktop app, a chat does not return to the workspace it was created in. The sidebar is back on the first/default workspace, and opening the chat only selects the conversation; it does not restore the chat's workspace. The next message is sent with the first workspace, so the agent runs in the wrong folder. The user has to click the original workspace in the sidebar again before the chat works there.
The chat is still listed under its old workspace in the sidebar (grouping uses the saved path), but the active/highlighted workspace is the first one. That makes the wrong-folder turn easy to miss.
This is more than the file tree. If the chat already had an agent session, the cwd mismatch makes the host drop the saved Harness session and create a new one in the wrong folder; the new session only gets the last 12 messages. If the user sends once before re-selecting the workspace, the saved session mapping is already deleted, so re-selecting afterwards still starts a new session and only replays those 12 messages. That is why the chat looks like it cannot continue the previous work.
The code path (0.2.2 source at
011c9e6):Session.workspaceis saved as a path when a chat is created (apps/host/src/lib/store.ts:1027) and is used only for sidebar grouping (apps/host/src/app/Sidebar.tsx:89).activeWorkspacestarts as null (store.ts:251), is not insavePrefs()(store.ts:440-459), andbootstrap()falls back toworkspaces[0](store.ts:723).selectSession()only setsactiveSession(store.ts:1084-1087);Chat.tsx:54-73does not restore the workspace either.workspaceId: state.activeWorkspace(store.ts:1660).chatFolders.get(chatId) ?? workspaceId path ?? WORKSPACE(apps/host/server/index.mjs:579). It does not useagent.workingFolder(chatId), although the file routes do (index.mjs:488).apps/host/server/agent/agent-bridge.mjs:286deletes the chat's session mapping and creates a new session in the new cwd;:796only carries the earlier conversation for a fresh session, andwithEarlierConversationkeeps the last 12 messages (:1234-1240).The per-chat "Select a folder" chip is a separate mechanism and does survive a restart: it writes
chat-folders.json(apps/host/server/chat-files.mjs:35-57) and wins atindex.mjs:579. A chat created under a sidebar workspace has no such entry; onlySession.workspacerecords the path, and that path is never mapped back to a workspace id or sent to the host.Expected: reopening a chat restores the workspace it belongs to (or the turn uses that chat's saved workspace), so the next message runs in the same folder and the agent session continues without re-selecting. The file tree and the agent should agree.
Possible fix:
selectSession(), mapsession.workspace(includingWorkspace.aliases) to a workspace id and setactiveWorkspace.sendMessage(), use the session's saved workspace/chat folder instead of the globalactiveWorkspace.index.mjs:579, addagent.workingFolder(chatId)as a fallback before the global workspace/default, as the file routes do.Smallest steps or command that reproduce it
D:\Project.D:\Project.D:\Projectworkspace header.D:\Project; the first/default workspace is active, and the agent session is recreated there. ClickingD:\Projectin the sidebar makes the next turn use that folder again (but the earlier session mapping is already gone if step 5 ran).Expected: the chat continues in
D:\Projectafter the restart without re-selecting the workspace.Reproduction status
Reproduced locally
Strata version
Strata 0.2.2 · engine 0.1.47
Graphics card, memory and system
RTX 3080 Ti Laptop 16 GB · 64 GB RAM · Windows 11 (10.0.26300)
Model, size and settings
Swift 1.5 IQ3_XXS · 524288 max context (the workspace binding is model-independent)
Logs
No engine crash. This is the GUI/host workspace state. Source:
Niko1221/Strataat011c9e6(README says 0.2.2). The installed 0.2.2 bundle also has the sameworkspaceId: activeWorkspacefield next to/api/chat/stream, so the shipped app has the same send path.Relevant lines:
apps/host/src/lib/store.ts:251,:440-459,:613-616,:723,:1027,:1084-1087,:1660apps/host/src/app/Sidebar.tsx:89-95apps/host/src/screens/Chat.tsx:54-73apps/host/server/index.mjs:488,:579,:1914-1916apps/host/server/agent/agent-bridge.mjs:286,:796,:1234-1240apps/host/server/chat-files.mjs:35-57@Niko1221 commented on GitHub (Oct 26, 2026):
Fixed in 0.2.5: a chat comes back in the workspace it was made in and the next turn runs in that folder. Please update.
@DevHyfes commented on GitHub (Oct 29, 2026):
Where do the chats go that were in here? I had several chats that were in a workspace. I closed the application to restart my computer. I open it up today, and all of those chats are missing from my workspace. The only chats I see are those in the default folder. The folder that I told the missing chats to use has the documents that they were working on, but no chat logs, and those chat logs had all the commentary by subagents that were working on it. I don't exactly understand why creating a workspace and defining a folder for it doesn't actually stick.