Repository navigation
Releases
v0.5.0 — sub-session aware recycle bin, readable rows, themed hover card
The recycle bin now shows what a session would take with it — and its rows stay readable at any panel width.
Added
- Sub-session aware rows. A badge beside the size badge counts a session's sub-sessions at any depth; opening it lists each one with title, size, age and running state, checked by default. Deleting the session takes that whole tree, and sub-sessions you uncheck stay reachable as a "deleted main session · N sub-sessions kept" row instead of becoming files nothing can reach.
Fixed
- A running sub-session no longer gets its log pulled out from under it. Deleting a session is refused while any sub-session in its tree is still running, and the refusal names it; the check used to cover only the session's own agent.
- The hover card stops fighting the row. It opens only on the title (the row's buttons keep their own hints), follows the panel's surface instead of an inverted bubble, shows the session's name, id and on-disk log path, and its text can now be selected — it no longer vanishes the moment the pointer moves. It closes on Escape, scroll, an outside press, a resize, or when the session it describes is gone, including when the last row is deleted.
Changed
- Rows hold their width budget. Card actions became icon buttons with accessible names, a sub-session's title is the preview control, and the title no longer collapses as the panel narrows.
- Small text clears 4.5:1 on the surface it lands on — the panel's footer, group counts, search placeholder, badge numbers and preview close control included.
v0.4.4 — zero-I/O recycle-bin list, host-matched surfaces
The recycle bin builds its list without reading a single session log, and the toast and header tooltip now match the host's own surfaces.
Performance
- The recycle bin no longer reads a session log to build its list. Every row used to decode its whole Zstd frame chain just to count turns and derive a title — 10-198 ms per session, on every request, on the web server's own thread. Titles and turn counts now come from the Session projection cache, the same zero-I/O face DSH's own session list uses;
fileSizeuses the listing snapshot'ssizeBytesinstead of a per-sessionstat(), andarchivedAtis the real archive time rather than the log's mtime (which is last activity, so the "最近删除" sort was wrong too).
Fixed
- The patched archive methods replaced the registry's own and misread its signature. DSH passes an options object (
{}/{ stopActivity: true }) where the plugin expected a title string, so{}was stored as a title and the panel then rendered that object as a React child, which throws; replacing the methods also dropped four invariants — the session-existence check, the activity gate, thestopActivityhand-off and the pin drop. They now delegate and only layer display metadata on top, and refusals map to proper HTTP errors instead of a 500. Unarchiving no longer leaves the stored title behind either. - A checkpoint from an older Session format generation blanked the title.
cachedSnapshotonly accepts the host's current generation, and the reference store's 3 → 4 migration left 481 of its 524 records older — ~99% would have been rejected. The list now falls back tocachedPredecessorTitle, and a turn count the cache cannot serve is reported asnull, never0.
Changed
- The sidebar session row no longer carries a second delete hover button. DSH 0.2 ships its own archive button on every row; the plugin's trash icon sat beside it doing the same thing under a different verb. Both it and the document-wide MutationObserver that drove it are gone. Destructive verbs stay in the 会话回收站 panel.
- The conversation-header action now reads 移入回收站 / Move to Recycle Bin instead of 删除会话 / Delete Session: it archives reversibly and never deleted anything.
- The toast and the header tooltip now match the host's own — top-centre banner (dark in both themes, 6000 ms hold, click-through) and a themed tooltip instead of the OS-drawn
title. Both specs are ported rather than imported:@deepseek-ai/dsh-client-ui-primitivesis inlined by Vite and cannot be required from a hand-written bundle. - Declared the host floor
dsh.engines.dsh = ">=0.2.0-rc.2"— tested on 0.2.0-rc.2, older hosts untested. DSH does not read this field; it documents the requirement for users and marketplaces.
v0.4.3 — the settings page and undo toast follow the app font
The settings page and the undo toast now follow the app-wide font.
Fixed
- UI and code text in the recycle bin follow Settings → 字体.
client.csspinned its own stacks at:root, so the page kept the stock face while every other settings section used the chosen one. The host tokens (--dsw-font-family/--ds-font-family-code) are now resolved at the point of use — an alias at:rootwould freeze the value before the shell's body-level override — with concrete--dstrb-font-fallback/--dstrb-mono-fallbackstacks for hosts that publish neither. - The explicit-light branch (
body:not([data-ds-dark-theme])) no longer re-declares the font tokens; fonts are not palette state, and re-declaring them there re-pinned the stock stack. --dstrb-font/--dstrb-monoremain usable as optional override hooks.
Verification
- New
tests/client-font-routing.test.js(5 cases, all failing against the pre-fix stylesheet); full suite 41/41. - Merged from #3 (takboo); CI is green on
mainfor the release commit.
v0.4.2 — English localization, following the host Language setting
English localization, following the host's own Language setting.
Added
- Every user-facing client string now has
zh/endictionaries, registered with the hostlocaleservice (@deepseek-ai/dsh-client-locale, mounted by the 0.1.5 Web app, whose Settings row owns the choice). An explicit Language selection wins; the browser language is only its fallback, and the 0.1.1 / 0.1.2 cohorts keep the built-in table plus the browser language.localeis deliberately not inexports.inject— a missing injection would park the whole fiber INACTIVE (thetypertregression). - Server fallback labels (未命名会话 / 其他项目 / 其他工作区) and the
SESSION_RUNNINGerror code are localized client-side; host behavior is unchanged.
Fixed
- Dropped the
x-dsh-localerequest header: it was sent on every call while the host only honorsx-dsh-plugin(its CSRF header).
Verification
- Client tests 9/9 — including "host setting beats the browser" in both directions and a fallback when the locale namespace is unresolvable — and the full suite 36/36.
- Merged from #2 (technigmaai) with the locale-source fix applied on top; the 0.4.1 read-access fix is included.
v0.4.1 — the recycle bin reads host-owned sessions again
A trashed conversation that the host still had open showed "0 轮对话" and a blank 查看 preview: the host half opened the stored session for reading without an access mode, which the 0.1.5 jsonl backend treats as a single-writer claim and rejects for a session it already owns.
Fixed
readSessionEventsopens stored sessions withreadaccess (open(id, 'read')). The 0.1.5 jsonl backend branches onaccess === "read", so the previous argument-less call took the single-writer path (claimWriteplus an exclusive lease) and threwSessionAlreadyOwnedErrorfor exactly the sessions the user was looking at — the list reportedturnCount: 0and the preview returned no messages.- The older cohort is unaffected because it has no
open()(it isinspect-only), so the extra argument is inert there. - A failed event read now warns once per session instead of staying silent.
Verification
- New "host still owns the session" stage in the real-host fixture — it fails before this fix, and the suite passes 18/18 against a real DSH 0.1.5-rc.2 package tree.
- Unit tests 32/32 across both host cohorts, including an assertion that reads request read access.
v0.4.0 — dual-cohort DSH support (0.1.1-rc.2 / 0.1.2-rc.1 / 0.1.5-rc.1)
安装 / Install
npm install dsh-session-recycle-bin@0.4.0
修复 / Fixed
- 设置里的「会话回收站」在 0.1.5 上整项不显示。 真实原因是该导航行被宿主设置面板裁在了可视区之外(
order: 200落在固定 808px 导航列的尾部)——现改为order: 25,并加了回归测试防止漂回。 - 0.1.5 上会话头部的「移入回收站」按钮点击无效(组件内 helper 被模块级代码调用导致
ReferenceError;当前会话 id 改从sessions.list快照的current字段读取)。 findLog()在 0.1.5 返回结构不同,导致永久删除失败、文件大小/轮数显示为 0 —— 两种形状现已归一化。- 同时修掉三处与 0.1.5 契约的真实偏差:注册多传
icon字段、dsh.client.inject为空、exports.inject声明了未提供的typert。
新增 / Added
- 宿主半边适配 0.1.5 持久化重写:
list()头归一化、改用open()/read()读会话事件、物理日志路径回退;六个dshpeer 范围放宽为显式并集^0.1.1-rc.2 || ^0.1.2-rc.1 || ^0.1.5-rc.1。 - 真机夹具
scripts/verify-real-host.mjs:0.1.2-rc.1 14/14、0.1.5-rc.1 14/14;单元测试 31/31。
注意 / Note
- 导航行被裁切是宿主缺陷(
dsh-client-ui-settings-general),对所有order偏大的分节都存在,建议上游反馈;本插件不去改宿主 DOM。
完整更新日志 / Full changelog: CHANGELOG.md · CHANGELOG.zh.md
npm: https://www.npmjs.com/package/dsh-session-recycle-bin/v/0.4.0