Skip to content

Releases

0.2.0 — 设置页开关反转为「显示」语义

Choose a tag to compare

@SUZUNAMI SUZUNAMI released this 22 Sep 06:59

0.2.0 — 设置页开关反转为「显示」语义

变更

  • 开关方向反转:打开 = 在侧边栏显示,关掉 = 隐藏并归档其会话。
    此前是「选上 = 隐藏」,与直觉相反。
  • 设置项改名:面板标题「侧边栏显示的工作区」,导航栏短标签「工作区显示」
    (导航栏宽度不够,全称会被截成「侧边栏显示的工…」,所以刻意用了短标签)。
  • 隐藏行自动沉底:稳定排序,显示中的行保持原有的相对顺序。
  • 计数并入文案:「共 N 个 · 显示 N 个 · 隐藏 N 个」;全部显示时为
    「共 N 个工作区,全部在显示中」。
  • 按钮改名:「全部恢复」→「全部显示」,只在确有行被隐藏时才可用。

底层完全没动

存储格式仍是 dsh-workspace-hide.hidden.v2(同一份 hidden 清单),归档/撤销归档的
范围判断、canRestore 提示、失效项处理、v1→v2 迁移都不变。反转只发生在
WorkspaceRow 一处(checked: hidden !== true,onChange 再取反)。
升级不需要做任何迁移动作。

安装

dsh plugin add dsh-workspace-hide@0.2.0

装完重启 DSH Desktop,打开「设置」,左侧出现「工作区显示」。

为什么默认是「显示」

新装时什么都没有被隐藏,所以每一行都是打开(显示)状态。这套语义下不存在
「新建的工作区默认消失」这种坑。


English

What changed

  • The settings switch is inverted: on = shown in the sidebar, off = hidden with its
    sessions archived.
    It used to be "ticked = hidden", which read backwards.
  • Renamed: panel title "Workspaces shown in the sidebar", short rail label
    "Workspace visibility" (the rail cannot fit the full sentence).
  • Hidden rows sink to the bottom of the list (stable sort; visible rows keep their
    relative order).
  • Counts moved into the summary text: "N total · N shown · N hidden".
  • Button renamed: "Restore all" → "Show all".

Nothing changed underneath

The storage format is still dsh-workspace-hide.hidden.v2 (the same hidden list), as
are the archive/unarchive scope, canRestore hints, stale-entry handling, and the
v1→v2 migration. The inversion lives in exactly one place.
Upgrading requires no migration.

Full changelog: README.md · README.en.md