Repository navigation
Replies: 3 comments
VerdictYour mechanism is exactly right, and the boundary you measured is right at the release-line level. But the option-less New Session path is not an accident that lost an argument: it is a deliberate, documented change shipped with an upgrade guide in the same commit. So the one-token patch in your report is correct about where the reuse went, and wrong as the fix — it restores the behaviour the guide exists to retire. The real defect is narrower and survives that: the change removed the only path to a per-Session draft key without migrating or surfacing what was already stored under it. 1. Your trace matches the source
And the consequences you describe are likewise as written: the draft is per Session id ( 2. It is a documented change, not a regressionThe same commit that introduced it shipped an upgrade guide, still present in
The commit is One refinement to your version table, by tag containment:
So 3. Why
|
Update: an applyable fix for the draft regressionThe mechanism traced earlier in this thread is the one that reproduces here, and a patch that fixes it without restoring blank reuse is ready to apply to What the patch does. An option-less New Session still creates a fresh Session with its own id. Immediately after the navigation retains that Session and before selection publishes,
The public surface added is one client service method, Why not reuse the blank. The fresh-Session behavior for the option-less path is the documented change from Two limitations, both intentional:
Evidence. The patch is at https://raw.githubusercontent.com/akol1/deepseek-harness/draft-carry-assets/0001-fix-ui-workspace-keep-unstarted-draft.patch. It touches
The recording below shows the reported flow end to end on the patched tree: type a draft, press New session, see the text land in the new composer, open Plugins, return to the Session, and reload the page. It was recorded from a clean worktree with the real server and a fresh scratch profile; no message is sent and no model round runs. The GIF replays 2.0–11.0 s of the 14.0 s real-time capture at 1.25× speed with a 1.2 s final hold, so its playback time is not a measurement of application latency. If the team would rather take a different shape — for example surfacing the abandoned blank in the Session tree instead of moving its draft — the storage helpers and the Related: #9902. |
|
One addition the comments above don't cover: you can reopen the abandoned session itself, not just read the text out of
Independently reproduced on |

Uh oh!
There was an error while loading. Please reload this page.
Summary
In
0.2.1-rc.2, anything typed into a brand-new session — before the first message is sent — disappears as soon as you open another chat and come back to "+". It worked on0.2.0-rc.2.Steps to reproduce
Re-entering a saved session that has unsent text still restores that draft, so the loss only affects the unsent new session.
What looks wrong
@deepseek-ai/dsh-client-ui-workspace/lib/client.js→startSession()without options now runsopenWorkspaceSession(target, void 0, void 0)→connectBlank(workspaceId, undefined)→sessions.create({ workspaceId }),i.e. a fresh blank session on every "+".
0.2.0-rc.2and0.1.7-rc.2the same path wentopenWorkspace()→connectWorkspace()→reuseOrCreateBlank(), which re-created the existing blank by sessionId, so the id — and the draft persisted under it — survived.sessionVisible()hasif (session.blank && session.id !== current) return false, so the abandoned blank drops out of the sidebar and cannot be reopened.localStorageunderdsh.conversation.<sessionId>(readConversationDraft()), but with a new blank id nothing ever reads the old key again.The reuse machinery still exists on both sides — client
connectBlank()→createInWorkspace()(finds an existing blank in the same cwd and passes itssessionId), hostcreateSession()reusing a named blank — so the no-options path looks like it lost itsreuseargument.Side effect: every "+" creates a real (empty) session directory. Abandoned blanks pile up on disk as ~350-byte
session.v4.jsonl.zstdfiles under~/.dsh/sessions/<cwd>/.Suggested fix
Pass the reuse preset instead of
undefinedon the no-options branch, or restore the0.2.0reuseOrCreateBlank()behaviour there:Verified locally on
0.2.1-rc.2by patching the built bundle: after this one-token change and a page reload, "+" reopens the same blank session and the draft comes back. (startSession()calls that passprompt/clearPreviousDraftare unaffected — they already take the reuse path.)An alternative would be to keep abandoned blank sessions reachable in the sidebar, but that changes the list semantics, so the reuse route seems closer to intent.
Environment
0.2.1-rc.2, npm global install, macOS (darwin/arm64), Web UI at127.0.0.1:3080, Chrome0.2.0-rc.2; broken on0.2.1-rc.1and laterAll reactions