Repository navigation
Releases: winditer/dsh-recent-tasks
Release list
v0.3.0
侧边栏与上面那几行官方面板行共用同一套列位与同一套间距;已失效的「始终置于工作区列表末尾」设置被删除。
横向对齐
- 「工作区」和「最近任务」的文字都在 46px(与「自动化任务 / 插件市场 / 插件」的文字同列),两者的折叠箭头都在 22px(与面板图标同列、箭头字形同心)。
- 「工作区」展开后,每个子工作区分组的文件夹图标在 46px。
- 「最近任务」展开后,对话名在 46px,与「最近任务」自己的文字同列;子工作区分组下的对话名与它自己分组的标题同列(68px)。
- 树模式的 12px 层级步进保留。
纵向节奏
- 「工作区」与「最近任务」之间取列表自身的 4px,与面板行之间的
gap:4px一致(相对 0.2.1:原先多加了 12px,显得比其他区块松)。
移除
- 通用设置里的「始终置于工作区列表末尾」已无作用,直接删除:插件不再重排工作区顺序,你拖到哪里它就待在哪里。
实现与验证
- 只认官方稳定属性(
data-row-key、role、内联--dsh-workspace-indent)与插件自己的data-dsh-rt-*:不含官方 class 哈希、不含!important;DSH 升级若挪走抓手会自行停用并回到官方原样。 - 75 个测试全绿;无头 Chrome 用真实官方 CSS + 本插件 CSS 重建 DOM 实测:16/16 个横向数值偏差 0.00px、纵向间隙 4px、无横向溢出(列表 270/270,侧栏 280)。
安装
dsh plugin --profile desktop add https://github.com/winditer/dsh-recent-tasks/releases/download/v0.3.0/dsh-recent-tasks-0.3.0.tgzv0.2.1 对齐:与面板行同列 / Alignment with the panel rows
侧边栏对齐到上面那几行官方面板行的两列与同一套纵向节奏,并删除已失效的「始终置于工作区列表末尾」设置。
对齐
- 「工作区」和「最近任务」的文字都在 46px(与「自动化任务 / 插件市场 / 插件」的文字同列),两者的折叠箭头都在 22px(与面板图标同列、箭头字形同心)。
- 「工作区」展开后,每个子工作区分组的文件夹图标在 46px。
- 「最近任务」展开后,对话名在 46px,与「最近任务」自己的文字同列;子工作区分组下的对话名与它自己分组的标题同列(68px)。
- 纵向:「工作区」与「最近任务」之间用列表自身的 4px 节奏,与面板行之间的
gap:4px一致(原先多加了 12px,显得比其他区块松)。 - 树模式的 12px 层级步进保留。实现只用官方稳定属性 + 插件自己的
data-dsh-rt-*,不含官方 class 哈希、不含!important。
移除
- 通用设置里的「始终置于工作区列表末尾」已无作用,直接删除:插件不再重排工作区顺序,你拖到哪里它就待在哪里。
验证
- 75 个测试全绿(
npm run verify)。 - 无头 Chrome 里用真实官方 CSS + 本插件 CSS 重建 DOM 实测:16/16 个对齐数值偏差 0.00px、纵向间隙 4px、无横向溢出(列表 270/270,侧栏 280)。
安装
dsh plugin --profile desktop add https://github.com/winditer/dsh-recent-tasks/releases/download/v0.2.1/dsh-recent-tasks-0.2.1.tgzv0.2.0 — 侧边栏层级:最近任务成为独立折叠区块 / Recent tasks as a section-level block
中文
侧边栏层级调整:「最近任务」现在是与「工作区」同层的独立折叠区块。
- 两块各自折叠:官方行自带的箭头收起它自己那一组;标题行前新增的箭头收起其它工作区分组(「最近任务」不受影响)。
- 「最近任务」下的对话行相对它的标题缩进一级;它仍然是真工作区记录、仍钉在末位,官方行为(改名、搜索、拖拽排序、折叠)一个没丢。
- 折叠状态只存在你自己的浏览器里(
dsh.recent-tasks.workspaces-collapsed.v1),不上报、不同步。 - 前提不成立时自动停用且不留残留:单列表、搜索中、56px 细栏、树模式下被嵌套、官方结构变化;切回来立刻恢复。
:has()不可用时只丢开关、保留换装。 - 纯表现层:不写工作区数据、不调 host、全文只用一个选择器,且只认官方稳定属性(
data-row-key/role/ 内联--dsh-workspace-indent)——从不依赖随版本变化的官方 class 哈希。
发布前抓掉的一个真故障:这一版的第一稿在真机上根本不会生效——官方把每一行都包在 HoverCard 的 <span> 里(ui-workspace:2043 / :2272,包裹体是 jsxs("span", {className: cn(Gn.root, …)})),因此"行的父节点就是分组容器""会话行在容器直下"两个前提都不成立,定位链直接判停用、缩进规则永不匹配。现已沿父链上溯到列表的直接子元素、并递归打标签;独立复核在真实浏览器引擎里用 0.2.1-rc.2 的官方 CSS 复跑验证通过,回归测试的假 DOM 也改成按真实结构包裹。
测试 75/75(npm run verify,含制品契约守卫;6 条关键守卫另做变异测试证明会挂)。
安装:dsh plugin --profile desktop add <附带的 tarball>,或 npm i dsh-recent-tasks。
English
The sidebar hierarchy change: Recent tasks is now its own collapsible block beside the workspaces section.
- The two blocks collapse independently: the official arrow collapses its own group, while the new arrow in front of the section title collapses the other workspace groups (Recent tasks stays put).
- Chat rows under Recent tasks sit one indent step in from its title. It is still a real workspace record pinned last, and nothing official is lost (rename, search, drag-reorder, collapse).
- The collapse flag lives only in your browser (
dsh.recent-tasks.workspaces-collapsed.v1); it is never reported or synced. - It disables itself and leaves nothing behind when the anchors are not right: flat list, search, the 56px rail, tree-mode nesting, or an official structure change — and it re-applies the moment they come back. Where
:has()is unsupported it drops only the toggle and keeps the restyle. - Presentation only: no workspace data written, no host call, one document-wide selector, and it keys on official stable attributes only (
data-row-key,role, the inline--dsh-workspace-indent) — never on the build-hash class names.
A real defect caught before release: the first cut would never have activated on a real machine — every official row is wrapped in a HoverCard <span> (ui-workspace:2043 / :2272, jsxs("span", {className: cn(Gn.root, …)})), so "the row's parent is the group container" and "sessions are its direct children" were both false: the adapter disabled itself and the indent rule matched nothing. It now climbs to the list's direct child and tags recursively; an independent review replayed it in a real browser engine against the extracted 0.2.1-rc.2 CSS, and the regression tests' fake DOM models the wrapper.
75/75 tests pass (npm run verify, including the artifact contract guards; six key guards were mutation-tested).
Install: dsh plugin --profile desktop add <attached tarball>, or npm i dsh-recent-tasks.
v0.1.0
首个版本 / First release.
中文
DSH 侧边栏里常驻末位、可折叠的「最近任务」工作区分组:侧边栏入口(+ 最近任务对话)与 Mod+Alt+N / Mod+Shift+N 快捷键在专用目录里开新对话,对话因此归入这个分组,而不是「未分组」。该分组是真正的工作区记录,而非插件画出来的仿制品——折叠、展开、改名、拖拽排序、置顶、归档、搜索都正常可用,会话的沙箱根目录就是该文件夹,也没有任何官方代码或内置 workspace 文案被打补丁。目录、分组名、常驻末尾与自动重建都是实时设置(设置 → 通用),经官方配置层落进 profile 的 cordis.patch.yml 并热生效。
安装:
dsh plugin --profile desktop add github:winditer/dsh-recent-tasks
# 或直接用本 Release 附件里的预构建包(免构建):
dsh plugin --profile desktop add https://github.com/winditer/dsh-recent-tasks/releases/download/v0.1.0/dsh-recent-tasks-0.1.0.tgzWeb profile 换成 --profile web。
English
An always-last, collapsible Recent tasks workspace group in the DSH sidebar: the sidebar entry (+ 最近任务对话) and the Mod+Alt+N / Mod+Shift+N shortcut start a chat in a dedicated folder, so it lands in that group instead of 未分组. The group is a genuine workspace record rather than a plugin-drawn look-alike — collapse, expand, rename, drag order, pin, archive and search all behave normally, sessions started there get that folder as their sandbox root, and no official code or built-in workspace locale string is patched. Folder, group name, pin-last and auto-repair are live settings (Settings → General), written into the profile's cordis.patch.yml through the official config layer and hot-applied.
Assets
dsh-recent-tasks-0.1.0.tgz— the prebuilt npm package: host half (lib/index.js), prebuilt browser bundle (dist/client.js), and the self-declaredcordis.patch.yml. Nothing is compiled on the consuming side, and pnpm's blocked lifecycle scripts are not needed.
Details
- 49 tests (
node --test test/*.test.js) over the protocol, host half, client logic and bundle contract. - No runtime dependencies, no native modules, no install scripts, no network access.
- Requires DSH
0.2.0-rc.1or newer (developed and verified on0.2.0-rc.2, cordis~4.0.4).