Repository navigation
Replies: 2 comments
|
This is the same missing capability as #10006 from the crash side. The folder-deleted variant fails earlier: the first prompt cannot assemble the system prompt because A public |
|
Confirmed on Windows 0.2.1-rc.5, with the prune site pinned to exact lines — and one trigger that has not been named yet: a crash loop (not just a SIGKILL). Environment: @deepseek-ai/dsh-desktop 0.2.1-rc.5 (Electron 44.7.0 / Node 24.21.0), Windows 11 x64. One workspace Observed: the desktop host crash-restarted 9 times between 21:57 and 22:00 local (unrelated auth failure), then came up at 22:01:29. That boot rewrote the workspace record with Mechanism ( // 367 — the only two ways an id counts as accounted
candidateMatches: (id, path) => this.sessionPaths.get(id) === path || this.missingSessionPaths.has(id),
// 173-185 — every write persists the filtered list
async mutate(fn) {
next = await this.host.table().update(this.id, (current) => {
const changed = fn(current);
const sessionIds = changed.sessionIds.filter((id) => this.host.candidateMatches(id, changed.path)); // 178
...
return { ...changed, sessionIds, updatedAt: new Date().toISOString() };
});Two supporting facts make this a permanent, silent loss:
The read path filters too (getter at 102-103), so the sidebar shows the truncated list immediately rather than waiting for a write. Why users cannot diagnose it: Recovery (verified): quit the app, put the missing ids back into the workspace record in Suggested fixes, in decreasing order of value (1 is a sharpening of the net-loss guard proposed in #10513):
Related: #10513 (same symptom), #9880 (same prune reached through an offline drive), #11507 (same class of loss via hot reload, with no write involved), #11288. 中文摘要:Windows 桌面版 0.2.1-rc.5 实测。桌面宿主因无关故障连续崩溃 9 次后于 22:01:29 启动,该次启动把本工作区 7 条会话账目写成 1 条, |
Uh oh!
There was an error while loading. Please reload this page.
Environment
@deepseek-ai/dsh0.1.5-rc.2desktopsession.v4.jsonl.zstd)Summary
After the desktop host process was killed (SIGKILL) and the app relaunched, an existing workspace lost its session accounting. The workspace record in
~/.dsh/storages/workspace.jsonended up holding only the newest session id; every earlier session of that workspace fell into the "Ungrouped" group in the sidebar.The sessions themselves are intact (logs on disk; one of them was still live and was auto-resumed after the relaunch), so this is a registry/bookkeeping bug rather than session-data loss. However the GUI offers no way to re-attach an existing session to a workspace:
sameGroupDrag = drag.accountKey === group.keyindsh-client-ui-workspace);workspaces.insertSessionBefore, rejects sessions that are not already accounted for, andWorkspace.attachSessionis not exposed over the remote API (it is only called bysession.createwhen aworkspaceIdis passed).Observed sequence (redacted)
Other long-lived workspaces in the same registry kept their full accounts (dozens of session ids), so this looks specific to the crash/relaunch path rather than to normal session creation.
Evidence (redacted registry excerpt)
Suspected code paths (from reading the installed packages, not a source checkout)
dsh-workspace→WorkspaceEntity.sessionIdsgetter filtersrecord.sessionIdswithhost.sessionPath(id) === record.path. If a stored session's path cannot be resolved yet during a cold start, a subsequent mutation can persist the filtered list and silently drop ids.bootstrap(headers)only runs when the registry state hasinitialized === false(dsh-workspace/lib/index.js, around theif (!this.state.initialized)guard), so a normal relaunch never re-adopts stored sessions bycwd.Steps to reproduce (best effort)
~/.dsh/storages/workspace.json: the workspace'ssessionIdshas lost the older ids.Expected
cwdand never silently drop ids it cannot validate.Impact
After a crash, workspace grouping silently disappears for affected sessions and cannot be restored from the GUI. Session content is intact, but to users it looks like the sessions were "lost" from the workspace.
Workaround
Quit the app, edit
~/.dsh/storages/workspace.json, insert the missing session ids back into the workspace record'ssessionIds, then relaunch. (It can be lost again after another crash.)Happy to provide more details or test a patch.
中文摘要
桌面版宿主进程被 SIGKILL 后重启,某个工作区的会话账目被重写为只剩最新会话:
~/.dsh/storages/workspace.json中该工作区的sessionIds丢失了历史会话,旧会话在侧栏落到「未分组」;GUI 没有把已有会话移回工作区的入口(会话拖拽只在同组内排序,工作区拖拽只调整工作区顺序),attachSession也未暴露给远程 API,所以用户无法自救。会话内容本身没丢。All reactions