Repository navigation
Sessions can be archived but never deleted, and cannot be unarchived #11817
xiaowei2025cqu23phy
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
A session can be archived from the sidebar context menu, but there is no way to delete a session and no way to unarchive one. Archiving is therefore an irreversible, one-way operation performed from a three-item menu — and archived sessions become completely unreachable through the UI.
What the UI actually offers
The session row menu in
dsh-client-ui-workspacedefines exactly three items:There is no
deleteitem.onDeleteRequestexists inSessionTree, but it is wired only to workspace deletion (onDeleteRequest(group.workspaceId, group.label)), never to a session.Archiving hides the session everywhere
sessionVisibleis the single predicate used by the grouped view, the flat list, and search results:So once a session ID is in
archivedSessionIds, it is excluded from:deriveGroups(grouped sidebar view)deriveFlat(flat sidebar view)deriveSearchResults(search — archived IDs "never match")There is no "Archived" view, no filter to reveal them, and no unarchive action anywhere in the client.
Why this is a problem
归档会话sits directly under派生. A single wrong click silently removes a session permanently from the user's reach, with no confirmation dialog and no undo.archivedSessionIdsis an append-only set in theworkspaceregistry state; nothing ever prunes it. Even after the underlying session data is gone, the ID remains.workspace.jsonand thesessions/directory by hand while DSH is closed.Real data from one install running
@deepseek-ai/dsh0.1.5-rc.3:68 of 94 archived IDs point at sessions that no longer exist — pure accumulation, with no supported way to clear them.
Suggested changes
1. Add
Delete sessionto the row menu. A destructive action needs to exist. Delete the session directory (sessions/<workspace>/<id>/) and drop the ID fromarchivedSessionIdsand from the workspace'ssessionIds.2. Add
Unarchive, or an "Archived" section. Archiving should be reversible: eitherunarchiveSession(sessionId)command mirrored fromarchiveSession, surfaced as "Restore" in the menu when a session is archived; or3. Consider confirming the archive action. Given that it is irreversible in the current build, a confirmation step (or at least a toast with "Undo") would prevent the accidental case.
4. Prune stale IDs. If a session's data is absent, its ID need not stay in
archivedSessionIdsforever.Workaround (for anyone hitting this today)
Close DSH completely, then edit
$DSH_HOME/storages/workspace.json:{ "global": { "archivedSessionIds": [] } }and optionally remove the matching directories under
$DSH_HOME/sessions/<workspace>/. Reopen DSH. Editing while DSH is running does not stick, because the in-memory workspace state is written back over the file.Environment
@deepseek-ai/dsh0.1.5-rc.3dsh-session-persistence-jsonl(.zstd)Happy to test a patch if the direction is acceptable.
All reactions