dsh-split-workspace 0.11.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/README.md +107 -12
- package/lib/client.js +1069 -82
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,93 @@
|
|
|
4
4
|
|
|
5
5
|
This file records public releases of `dsh-split-workspace`; each version ends with a one-line English summary.
|
|
6
6
|
|
|
7
|
+
## [0.13.2] - 2026-11-19
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **真正修复「分屏最小化后再恢复,窗格标题栏按钮点不动」。** 根因是桌面端原生窗口的拖动区:被分屏盖住的原生会话仍然挂在画布下面,它的标题栏(栈顶 0–76px)声明了 Electron 的 `-webkit-app-region: drag`。原生拖动区在 DOM 之前吞掉鼠标事件,所以画布看着正常、`elementFromPoint` 也指向按钮,但点击根本进不了页面(实测没有任何 pointerdown;同一位置在浏览器里正常,因此 Web 端无法复现)。
|
|
12
|
+
- 从「分屏视图」面板直接创建分屏时下面没有原生会话,按钮一直是好的;一旦最小化回到会话再恢复,原生会话挂载在画布下方,它的拖动区正好覆盖窗格标题栏(44–81px),按钮就全部失效。
|
|
13
|
+
- 修复:给窗格标题栏声明 `-webkit-app-region: no-drag`,把这块区域从原生拖动区里扣掉。桌面端实测:恢复分屏后点击标题栏的 ⤢/⧉/?/分屏/关闭 全部恢复响应,帮助卡片正常弹出。
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **面板里「最小化分屏」不再卡住点击。** 原来在“分屏视图”面板里最小化会同步离开面板并挂载整棵原生会话视图(实测点击后约 580ms 才完成这一帧,期间界面冻结)。现在先隐藏画布、显示恢复胶囊和「正在返回会话」提示卡(点击后一两帧内可见),再把“切回原生会话”放到下一帧任务里执行;剩余的对话视图挂载成本仍在,但不再阻塞点击反馈。
|
|
18
|
+
- 面板最小化期间,「分屏视图」页不会再被“选中面板即恢复分屏”的逻辑撤销(内部加了 in-flight 标记)。
|
|
19
|
+
|
|
20
|
+
**English summary:** The real cause of dead pane-header buttons after restoring a minimized split was Electron's native window-drag region: the covered stock conversation stays mounted behind the overlay and its header declares `-webkit-app-region: drag` over the top ~76px of the column, so the compositor swallowed those clicks before they reached the DOM (no pointerdown at all; browsers ignore app-region, which is why the web build never reproduced it). The pane header now declares `-webkit-app-region: no-drag`, carving itself out of that region. Also, minimizing from the split-view panel no longer freezes the click: the canvas hides and a "returning to the conversation" card paints first, while the main-column switch (a full native conversation mount) runs in the next task.
|
|
21
|
+
|
|
22
|
+
## [0.13.1] - 2026-11-19
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **修复「分屏最小化 → 恢复分屏」后窗格内顶部按钮点不动的问题。** 恢复出来的画布如果残留了隐藏阶段的交互样式(暖缓存隐藏、窗口缩放冻结被最小化打断、被取消的窗格拖动),画面会正常绘制但整块区域对鼠标透明,窗格标题栏的 ⤢ / ⧉ / ? / 分屏 / 关闭 全部失效。现在:
|
|
27
|
+
- 暖缓存隐藏只使用 `visibility: hidden`(它本身就不参与命中测试),不再写 `pointer-events: none`,从源头消除「可见但点不到」的状态;
|
|
28
|
+
- 新增不变量样式:画布只要不是暖缓存隐藏,就强制可见且 `pointer-events: auto`;窗格标题栏及其按钮再单独声明 `pointer-events: auto`,即使祖先被误设为透明也能点;
|
|
29
|
+
- 画布每次显示后一帧做一次自检:清理残留的冻结 transform/尺寸、恢复为可交互、清掉被中断拖动遗留的 `data-dsv-source` 透明面板,并把修复次数记录到 `health().canvasRepairs`(正常应为 0)。
|
|
30
|
+
- `health()` 新增 `canvasRepairs`。
|
|
31
|
+
|
|
32
|
+
**English summary:** Fixed pane header buttons staying dead after restoring a minimized split: a canvas that is visible but left with hidden-phase interaction styles (warm hold, a window-resize freeze interrupted by minimize, a cancelled pane drag) now gets repaired. The warm hold only uses `visibility: hidden` (which already excludes hit-testing), a new invariant rule keeps every non-warm canvas visible and clickable, pane header buttons re-assert `pointer-events: auto`, and a one-frame self-check after each show clears leftover freeze/transform styles and interrupted-drag sources. Repairs are counted in `health().canvasRepairs` (0 in normal use).
|
|
33
|
+
|
|
34
|
+
## [0.13.0] - 2026-11-19
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- **最小化胶囊可放在边缘任意位置。** 最小化分屏后出现的「恢复分屏」胶囊现在可以拖到工作区任意位置,松手吸附到**最近的边缘**,沿边的位置保留拖动时的位置(不再只限四个角),并且位置会持久化,下次最小化仍在原处。
|
|
39
|
+
- `health()` 新增 `panelSelected`(当前主区是否选中「分屏视图」)与 `panelWarm`(画布是否处于暖缓存隐藏状态);`blockedReason` 在插件面板占用主区时返回 `panel`。
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- **切换「分屏视图」/普通会话 / 最小化 / 插件面板不再重建窗格。** 分屏画布改为单一常驻的覆盖层:选中「分屏视图」时主区页面本身是空的,画布覆盖同一列;隐藏时画布保留挂载 **20 秒**(暖缓存),期间来回切换几乎瞬时,不再重连会话、重建编辑器与对话视图。超过 20 秒才释放窗格树;隐藏期间保留布局,恢复是可见性切换而不是整棵树重排。
|
|
44
|
+
- 打开插件 / 技能 / 设置面板时分屏不再自动最小化成胶囊:画布暂时隐藏(窗格保持挂载),回到会话或「分屏视图」后自动恢复。点击其他会话仍会把分屏收成胶囊。
|
|
45
|
+
- **恢复分屏先显示画布**:原来会先同步切换被覆盖会话区的原生会话(`uiWorkspace.openSession`),这段原生切换可达数百毫秒,用户要等它完成才看到分屏;现在先恢复显示,再把被覆盖会话区的会话对齐延后 150ms、且当前已经是该会话时跳过。
|
|
46
|
+
- 暖缓存隐藏期间画布仍参与布局(这样恢复几乎零重排),因此最小化后的流式输出仍会产生布局开销,直到 20 秒窗口结束释放窗格树——这是「恢复瞬时」与「最小化省资源」之间的取舍。
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- 修复「分屏视图 ⇄ 非分屏会话」「最小化 ⇄ 恢复分屏」切换卡顿:不再在每次切换时卸载并重新挂载全部原生窗格。
|
|
51
|
+
|
|
52
|
+
**English summary:** The minimized split's restore chip can now be dragged anywhere and snaps to the nearest edge (any position along that edge, persisted), instead of only the four corners. The split canvas is now a single always-mounted overlay layer: selecting the Split view panel, switching to a plain conversation, minimizing, or opening a plugin panel only shows/hides it, with a 20-second warm hold that keeps the native pane tree mounted so those switches are near-instant; after the warm window the tree is dropped. Opening a plugin panel no longer minimizes the split into the chip (the canvas hides and reappears automatically), and restoring a minimized split shows the canvas first while the covered stock view's session alignment is deferred. `health()` gains `panelSelected` / `panelWarm`.
|
|
53
|
+
|
|
54
|
+
## [0.12.0] - 2026-11-19
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- **左侧栏新增「分屏视图」面板入口(与「插件」同级,0.12.0)。** 左侧栏顶部的全局面板导航里多了一行 **分屏视图**,行首是插件的分屏图标;点击它把主区切换到分屏视图面板:
|
|
59
|
+
- 已有两个及以上窗格时,面板直接显示和「恢复分屏」相同的界面(窗格、分隔条、窗格工具栏)。
|
|
60
|
+
- 还没有分屏时,面板显示 **添加分屏** 多选框;勾选两个或更多会话并确定后,立即在同一面板里显示分屏界面。
|
|
61
|
+
- 从面板里「最小化分屏」回到会话界面,「退出分屏」清空窗格并返回会话;切到其他会话或插件面板时分屏布局保留,随时点回「分屏视图」继续。
|
|
62
|
+
- 设置页「操作」里新增 **打开分屏视图**;主面板行、底部按钮、右键菜单用的是同一枚绘制图标。
|
|
63
|
+
- **会话右键「分屏插件」菜单增加图标。** 一级菜单和 **加入分屏 / 进入浮窗 / 进入独立窗口 / 进入系统窗口** 四个二级条目都带上了对应的 SVG 图标(contextMenu.icon 内联图标槽)。
|
|
64
|
+
|
|
65
|
+
### Changed
|
|
66
|
+
|
|
67
|
+
- 左下角分屏按钮与底部菜单的入口图标统一为侧栏「分屏视图」所用的同一枚图标。
|
|
68
|
+
- 设置页的「操作」新增「打开分屏视图」,并把状态区与菜单行为保持一致。
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- **修复 Windows 上「重启 DSH」菜单图标显示为乱码方框的问题。** 旧图标使用 U+23FB(POWER SYMBOL),Windows 默认 CJK 字体栈没有该字形,显示成方框/乱码。现在改为内嵌 SVG 绘制的重启(循环箭头)图标,不再依赖系统字体;新增的图标同样全部是 SVG。
|
|
73
|
+
- **优化窗口缩放卡顿(性能模式下同样卡)。** 拖动窗口边缘时,每个窗格的尺寸观察器会在每一帧提交新的窗格尺寸,触发整块窗格重渲染、composer 卡片重新测量与对齐行重算,窗格越多越卡;同时窗格容器还有 180ms 的宽高过渡在“追”窗口边缘。0.12.0 引入布局忙时(窗口缩放 / 拖动分隔条)的收敛机制:
|
|
74
|
+
- 缩放/拖动期间只保留浏览器自身的 CSS 重排;窗格尺寸、composer 几何、对齐行宽、浮窗钳制等 JS 测量与派生状态统一延迟到手势结束后执行一次。
|
|
75
|
+
- composer 测量副作用不再依赖窗格宽度,不再在每次宽度变化时重建 ResizeObserver。
|
|
76
|
+
- 缩放期间关闭窗格过渡/动画(html 上的 data-dsv-resizing 标记),去掉逐帧追赶窗口边缘的过渡成本。
|
|
77
|
+
- 分隔条拖动同样按“手势结束再测量”处理,拖动更顺滑。
|
|
78
|
+
- 新增 `window.__dshSplitWorkspace.resizeFreeze()` / `setResizeFreeze(true|false)`(默认开启,持久化),可在不喜欢“拖动时文字轻微拉伸”时关闭。
|
|
79
|
+
- **性能模式下,窗口缩放期间冻结画布内部布局**:画布保持手势开始时的内部布局,用 CSS transform 跟随窗口边缘缩放到新尺寸(拖动时文字轻微拉伸),松手后一次性重排为真实尺寸——这样每个窗格里的原生对话不会每一帧重新测量滚动区域。普通模式保留逐帧重排与过渡动画。
|
|
80
|
+
|
|
81
|
+
**English summary:** Adds a **Split view** entry to the sidebar's global-panel navigation (next to **Plugins**) that opens the split workspace as a main panel — the same canvas when two or more panes exist, or an inline add-split picker that opens the split as soon as two conversations are confirmed. The footer button, sidebar row and session context-menu group now share one drawn icon; every session-menu row gets an icon; the Windows mojibake on the **Restart DSH** row is fixed by replacing the U+23FB power symbol with a drawn SVG; and window resizing is much smoother because pane measurement, composer geometry, dock alignment and float clamping are deferred to the end of the resize/divider gesture instead of running on every frame (with pane transitions cut while the layout is busy).
|
|
82
|
+
|
|
83
|
+
## [0.11.1] - 2026-11-18
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- **修复重建后的客户端 bundle 无法热替换、必须刷新页面或重启 DSH 才能恢复菜单的问题。** 插件在浏览器端的工厂每次执行都会把只读诊断接口 `__test` 定义到 `window.__dshSplitWorkspace` 上(`configurable: false`)。DSH 在打开的页面里热替换重建后的客户端 bundle 时会再次执行同一个工厂,第二次定义抛出 `TypeError: Cannot redefine property: __test`,整个工厂就此中断:**左下角分屏按钮、会话右键「分屏插件」菜单和「设置 → 分屏工作区」同时消失**,DSH 把该插件记为“本页面的插件未能完成同步”,只能刷新页面或重启才能恢复。此前为了让改动生效而反复重启 DSH,原因就是这个异常,而不是 DSH 的热加载不生效。
|
|
88
|
+
- 现在每次 bundle 执行都创建一个**新的** `window.__dshSplitWorkspace` 对象,`__test` / `__svc` 等诊断成员改为通过带保护的安装函数定义:任何诊断接口都不能再让插件加载失败,被替换的 bundle 也不会再把上一次加载的闭包(`health()`、`retry()`、`__test` 里的各个函数)继续暴露出去。
|
|
89
|
+
- 覆盖的路径:热替换重建后的客户端 bundle、在设置 → 插件里禁用后再启用、以及从 0.11.0 热升级到 0.11.1——三种情况都在同一个页面内就地生效,不需要刷新或重启。
|
|
90
|
+
- 新增离线断言,防止重新引入“在继承的旧全局对象上重复定义成员”的写法。
|
|
91
|
+
|
|
92
|
+
**English summary:** Fixed the client bundle failing to hot-swap after a rebuild: the factory re-defined the read-only `__test` diagnostics seam on the inherited `window.__dshSplitWorkspace` object and threw `Cannot redefine property: __test`, which aborted the whole factory and left the footer button, session menus and Settings page missing until the page reloaded. Each bundle execution now publishes a fresh API object, and `__test` / `__svc` are installed through a guarded helper, so bundle replacement, disable→enable and the 0.11.0→0.11.1 hot upgrade all apply in place.
|
|
93
|
+
|
|
7
94
|
## [0.11.0] - 2026-11-18
|
|
8
95
|
|
|
9
96
|
### Added
|
package/README.md
CHANGED
|
@@ -68,6 +68,8 @@ dsh --profile web
|
|
|
68
68
|
- 分屏入口:点击侧边栏底部(设置旁)的分屏图标,或把侧边栏里的会话拖到对话区。
|
|
69
69
|
- 打开浏览器/桌面端控制台执行 `window.__dshSplitWorkspace.health()`,可看到版本、窗格数和几何状态。
|
|
70
70
|
- 如果看不到分屏入口:确认插件已启用且没有报错;如果侧边栏底部的 footer 没有渲染,插件会在对话区左下角显示兜底的分屏按钮。
|
|
71
|
+
- 恢复分屏后窗格标题栏的按钮点不动:0.13.1 及更早版本在桌面端会把被覆盖会话的原生窗口拖动区留在画布上方,点击被 Electron 原生层吞掉(浏览器里不会出现,所以 Web 端测不出来)。0.13.2 给窗格标题栏声明 `-webkit-app-region: no-drag` 修复。
|
|
72
|
+
- 恢复分屏后窗格标题栏的按钮点不动:0.13.1 及更早版本在桌面端会把被覆盖会话的原生窗口拖动区留在画布上方,点击被 Electron 原生层吞掉(浏览器里不会出现,所以 Web 端测不出来)。0.13.2 给窗格标题栏声明 `-webkit-app-region: no-drag` 修复。
|
|
71
73
|
|
|
72
74
|
### 开始分屏
|
|
73
75
|
|
|
@@ -82,6 +84,15 @@ dsh --profile web
|
|
|
82
84
|
- 右键会话 → **分屏插件**:一级菜单集中了会话的分屏与窗口操作,二级菜单包括 **加入分屏 / 退出分屏**(同一个开关,按当前状态显示)、**进入浮窗 / 退出浮窗**、**进入独立窗口 / 退出独立窗口**、**进入系统窗口 / 退出系统窗口**。每个条目都按当前状态显示“进入”或“退出”;窗口关闭(包括点窗口自身的关闭按钮)后,菜单会自动回到“进入”状态。
|
|
83
85
|
- **关闭窗格(标题栏 ✕)或退出分屏时,只要剩余会话少于两个就整体退出分屏**:窗格树和所有会话的分屏状态会一起清空,不会留下「菜单里显示分屏中、却没有被选中」的残留状态。只剩一个窗格的分屏不成立,所以不保留隐藏的单窗格树。
|
|
84
86
|
|
|
87
|
+
## 分屏视图菜单(左侧栏,0.12.0)
|
|
88
|
+
|
|
89
|
+
- 左侧栏顶部的面板导航新增 **分屏视图** 一行,和 **插件** 同级;行首是插件的分屏图标。左下角分屏按钮、会话右键 **分屏插件** 一级菜单也用同一个图标。
|
|
90
|
+
- 点击 **分屏视图**,主区切换到 **分屏视图面板**:已经有两个及以上窗格时,直接显示与“恢复分屏”相同的界面(窗格、分隔条、窗格工具栏都在这里);还没有分屏时,页面里是 **添加分屏** 多选框,勾选两个或更多会话并确定后立即显示分屏界面。
|
|
91
|
+
- 在面板里点左下角菜单的 **最小化分屏** 会回到会话界面;**退出分屏** 会清空窗格并返回会话。切到左侧栏的某个会话或插件面板时布局会保留,随时点回 **分屏视图** 继续。
|
|
92
|
+
- **切换不再重建窗格(0.13.0)**:画布始终挂载在覆盖层里,只是在「分屏视图」、普通会话、最小化和插件面板之间显示/隐藏。隐藏后的 **20 秒内**窗格保持挂载(暖缓存),所以在「分屏视图 ⇄ 会话」「最小化 ⇄ 恢复分屏」之间来回切换时几乎瞬时,不会重新挂载每次都要重连会话和编辑器的原生对话;超过 20 秒才释放窗格树(对长时间最小化省资源)。隐藏期间画布的布局仍保留,因此恢复是可见性切换而不是整棵树重排。
|
|
93
|
+
- **最小化胶囊(0.13.0)**:最小化后出现的「恢复分屏」胶囊可以拖到工作区任意位置,松手吸附到**最近的边缘**——沿边的位置随你放,不再只限四个角;位置会记住,下次最小化仍在原处。
|
|
94
|
+
- 左下角按钮菜单里的 **重启 DSH** 图标改为绘制的 SVG(旧版使用 U+23FB 电源符号,Windows 默认字体缺这个字形,会显示成乱码方框);菜单、侧栏、右键菜单里的图标全部是内嵌 SVG,不依赖系统字体。
|
|
95
|
+
|
|
85
96
|
## 使用帮助(界面指引)
|
|
86
97
|
|
|
87
98
|
插件内的 **分屏帮助**(菜单里的「分屏帮助」、窗格标题栏的 `?`,或设置页的「分屏帮助」)现在已经带三张界面指引截图,点击缩略图可以查看大图:
|
|
@@ -136,7 +147,7 @@ dsh --profile web
|
|
|
136
147
|
|
|
137
148
|
- **状态**:插件版本、窗格数、待分屏数、浮窗数、当前独立窗口。
|
|
138
149
|
- **性能模式**:开关(默认开启),影响动画、后台观察器和拖动缩略图。
|
|
139
|
-
-
|
|
150
|
+
- **操作**:打开分屏视图、添加分屏、退出分屏、最小化分屏、重置分屏、刷新界面、重启 DSH(桌面版)、帮助。
|
|
140
151
|
|
|
141
152
|
设置页里的“添加分屏”会先关闭设置面板再打开多选弹框,避免弹框被设置面板遮挡;其余操作就地执行并实时刷新状态。
|
|
142
153
|
|
|
@@ -150,6 +161,10 @@ dsh --profile web
|
|
|
150
161
|
- 拖动会话/窗格时**完全不渲染缩略图预览**(不克隆对话 DOM,也没有逐帧移动的预览窗口);拖入目标、布局预览和放置反馈仍然保留。
|
|
151
162
|
- 真实会话、输入、停止、审批、分屏 / 浮窗 / 独立窗口功能全部保留。
|
|
152
163
|
|
|
164
|
+
- **0.12.0:窗口缩放不再逐帧测量。** 拖动窗口边缘缩放时,每个窗格的尺寸观察器过去会在每一帧提交新的窗格尺寸(并重建 composer 测量、重算对齐行宽),窗格越多越卡。现在缩放窗口 / 拖动分隔条期间只保留浏览器自身的 CSS 重排,所有 JS 测量与派生状态(窗格窄/短判定、composer 卡片几何、对齐行宽、浮窗钳制)统一等待手势结束后执行一次;缩放期间同时关闭窗格过渡,避免 180ms 的宽度过渡“追着”窗口边缘跑。性能模式下更进一步:**窗口缩放时画布保持手势开始时的内部布局,用 CSS transform 跟随窗口边缘缩放到新尺寸**,这样每个窗格里的原生对话不会在每一帧重新测量滚动区域,松手后再一次性重排到真实尺寸(拖动过程中文字会有轻微拉伸,松手即恢复清晰)。性能模式同样受益。
|
|
165
|
+
|
|
166
|
+
开发机实测(Chromium 无头、性能模式、2 窗格、连续拖动窗口 40 步):冻结开启 vs 关闭,整段手势的主线程任务时长中位数 **2.1s vs 3.2s**,长任务 **1 个 vs 17 个**,阻塞时间 **9ms vs 461ms**,平均帧间隔 **25.7ms vs 59.1ms**;4 窗格时长任务 **6 个 vs 38 个**、阻塞时间 **85ms vs 989ms**。面板模式(`分屏视图`)因为不再有被遮住的原生会话,剩余开销更低。
|
|
167
|
+
|
|
153
168
|
**仍然可能卡的原因**:每个窗格都是一个完整的原生对话视图,N 个会话同时流式输出就是 N 份 React/DOM 渲染与滚动更新,这是 DSH 客户端本身的主要成本,插件无法消除(除非上游支持离屏暂停/虚拟化)。在 Windows + 低单核性能的机器上,建议同时保持 2–3 个活动窗格、少开浮窗、把不用的分屏最小化;输入框可切到紧凑 TUI 模式;如果装了 `dsh-prompt-history`,它的 TOC 同步在性能模式下会被暂停。
|
|
154
169
|
|
|
155
170
|
诊断入口:`window.__dshSplitWorkspace.health()` 查看 `performance`、`panes`、`geometry`、`active`;用 DevTools Performance 对比开启性能模式前后的长任务。
|
|
@@ -161,6 +176,10 @@ DSH 0.2.x(含 Desktop 0.2.2-rc.3)带 HMR:新安装的插件会被热加载
|
|
|
161
176
|
- 插件管理器明确提示 `restart-required`(Host 半边、被链接包的宿主模块发生变化,或包目录被移动);
|
|
162
177
|
- 安装后侧边栏底部几秒内没有出现分屏图标(少数没有 HMR 的旧版 DSH)。
|
|
163
178
|
|
|
179
|
+
**0.12.0 / 0.13.0 的新面板、图标、切换暖缓存和缩放优化都在客户端 bundle 里**,重建 `lib/client.js` 后同样由 HMR 热替换,不需要重启 DSH。
|
|
180
|
+
|
|
181
|
+
**0.11.1 修复:重建客户端 bundle 后不再需要重启。** 之前每次重建 `lib/client.js` 后分屏按钮、右键菜单和「设置 → 分屏工作区」都会消失,必须刷新页面或重启 DSH 才回来——原因是插件工厂重复定义只读诊断接口 `__test` 时抛出 `Cannot redefine property`,整次加载被中断(DSH 会把它记为“本页面的插件未能完成同步”)。现在每次 bundle 执行都会创建一个新的公开对象,所以**热替换重建后的 bundle、在设置 → 插件里禁用后再启用、以及从 0.11.0 热升级到 0.11.1,都在同一个页面内就地生效**,不需要刷新或重启。
|
|
182
|
+
|
|
164
183
|
DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart App and Host`)。从本插件的 0.9.0 起:
|
|
165
184
|
|
|
166
185
|
- 侧边栏底部 **分屏菜单 → 重启 DSH**:先确认(运行中的任务会中断),再由 Host 半调用系统级“退出并重新打开”(macOS 通过 AppleScript 正常退出,Windows 关闭窗口后终止进程并重启)。
|
|
@@ -172,6 +191,8 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
172
191
|
|
|
173
192
|
## 功能
|
|
174
193
|
|
|
194
|
+
- **切换零重建 + 手势暖缓存(0.13.0)**:分屏画布常驻,切换「分屏视图 / 普通会话 / 最小化 / 插件面板」不再卸载重挂原生窗格;最小化胶囊可拖到任意位置并吸附最近边缘。
|
|
195
|
+
- **左侧栏「分屏视图」面板(0.12.0)**:左侧栏顶部与「插件」同级的面板入口,点击在主区打开分屏视图;已有分屏时直接显示窗格界面,没有分屏时显示添加分屏多选框,选满两个会话立即分屏。
|
|
175
196
|
- **侧边栏分屏菜单**:底部分屏按钮弹出「添加分屏 / 退出分屏 / 最小化分屏 / 性能模式 / 刷新界面 / 重启 DSH / 分屏帮助 / 重置分屏」,其中退出和最小化与顶部工具栏完全一致,「分屏帮助」直接打开带截图的帮助卡片。
|
|
176
197
|
- **多选添加分屏**:弹框可搜索、可多选;已分屏时默认勾选当前窗格,可取消或追加,按最终勾选结果分屏。
|
|
177
198
|
- **会话右键集成**:原生右键菜单新增「分屏插件」二级菜单,其中「加入分屏 / 退出分屏」按状态显示为同一个开关;未分屏时先进入待分屏,满两个才分屏,退出到只剩一个自动退出分屏。
|
|
@@ -202,7 +223,7 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
202
223
|
- 没有固定窗格上限:窗口能显示多少会话就能加多少(窗格变窄时标题栏会自动紧凑)。
|
|
203
224
|
- 存在分屏时,共享的原生侧边栏跟随聚焦窗格;点击会话即载入该窗格,或把会话拖到分屏区域新增/替换窗格。
|
|
204
225
|
- 窗格树在刷新和重启后保留(包括手工拖出的堆叠或 L 形布局);增删窗格会重新适配自动网格,重启不会。
|
|
205
|
-
-
|
|
226
|
+
- **最小化**(工具栏或底部菜单)会隐藏分屏、显示原生单会话视图,同时保留窗格树;「恢复分屏」胶囊可以恢复(可拖到任意位置、吸附最近边缘,位置会记住)。点击其他会话会把分屏收成胶囊;打开插件/技能/设置面板时画布只是暂时隐藏(窗格保持挂载),回到会话或「分屏视图」后自动恢复,不再需要点恢复胶囊。
|
|
206
227
|
- 每个窗格只有一个标题:标题由窗格标题栏负责;原生标题栏保留视图页和操作,不重复面包屑。关闭按钮是红底描边的 **✕**,不是低对比度圆点。
|
|
207
228
|
- 如果安装了 `dsh-prompt-history`,它的可拖动 **会话目录 (☰)** 握把会在每个活动窗格的左边缘垂直居中显示一次。每次分屏调整(新增、关闭、重排、拖动分隔条、最大化或右侧栏推挤)都会把受影响的握把重新放回窗格左边缘与垂直中心;没有变化的窗格保留手动拖动的位置。隐藏的原生会话和非窗格视图里的副本会被隐藏,握把不再堆叠。
|
|
208
229
|
- 分屏工具栏的右侧栏按钮有**两种状态**:面板关闭时是右箭头(点击打开),打开时是高亮的左箭头(点击收起)。修复监听器会在分屏拆除后接管原生的打开/收起按钮,避免过期的 sidebar-right store 吞掉点击或隐藏入口。
|
|
@@ -214,7 +235,7 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
214
235
|
|
|
215
236
|
## 命令
|
|
216
237
|
|
|
217
|
-
- `window.__dshSplitWorkspace.health()
|
|
238
|
+
- `window.__dshSplitWorkspace.health()`:版本、宿主、窗格、几何、持久化树、崩溃保护;`panelWarm` 表示画布正处在暖缓存隐藏中,`canvasRepairs` 记录画布显示后自检修复交互样式的次数(正常为 0)。
|
|
218
239
|
- `window.__dshSplitWorkspace.split(sessionId)`:把会话加为窗格。
|
|
219
240
|
- `window.__dshSplitWorkspace.addToSplit(sessionId)` / `removeFromSplit(sessionId)`:加入 / 退出分屏(未分屏时先进入待分屏)。
|
|
220
241
|
- `window.__dshSplitWorkspace.float(sessionId)`:把会话变成浮窗(自动从分屏/待分屏移出)。
|
|
@@ -228,6 +249,7 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
228
249
|
- `window.__dshSplitWorkspace.appWindow()`:当前独立窗口状态(`{ id, minimized, maximized }` 或 `null`)。
|
|
229
250
|
- `window.__dshSplitWorkspace.setPerformanceMode(true/false)`:开关性能模式(持久化)。
|
|
230
251
|
- `window.__dshSplitWorkspace.performanceMode()`:当前是否处于性能模式。
|
|
252
|
+
- `window.__dshSplitWorkspace.resizeFreeze()` / `setResizeFreeze(true|false)`:性能模式下窗口缩放时是否冻结画布内部布局、用 CSS 缩放跟随窗口边缘(默认开启)。
|
|
231
253
|
- `window.__dshSplitWorkspace.reloadClient()`:刷新页面。
|
|
232
254
|
- `window.__dshSplitWorkspace.restartApp()`:退出并重新打开 DSH 桌面版(需要完整重启时使用)。
|
|
233
255
|
- `window.__dshSplitWorkspace.pending()`:当前待分屏的会话 id。
|
|
@@ -256,7 +278,7 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
256
278
|
| `09-pane-renderers` | 原生/降级对话与输入框渲染器 |
|
|
257
279
|
| `10-pane-frame` | 窗格标题栏、关闭/浮窗按钮、composer 测量 |
|
|
258
280
|
| `11-canvas-navigation` | 画布/分隔条、会话选择器、键盘导航、公共 API 前置 |
|
|
259
|
-
| `12-chrome` |
|
|
281
|
+
| `12-chrome` | 安全模式/帮助/提示、「分屏视图」主面板、窗口缩放冻结、更新通知、座位 |
|
|
260
282
|
| `13-drag-bridge` | 未激活时的拖入分屏桥 |
|
|
261
283
|
| `14-launcher` | 底部菜单、多选添加分屏弹框、会话菜单集成 |
|
|
262
284
|
| `15-float-window` | 浮窗组件与图层 |
|
|
@@ -397,6 +419,7 @@ dsh --profile web
|
|
|
397
419
|
- Entry points: the split icon in the sidebar footer (beside Settings), or drag a conversation from the sidebar onto the conversation column.
|
|
398
420
|
- Run `window.__dshSplitWorkspace.health()` in the browser/desktop console to see the version, pane count and geometry.
|
|
399
421
|
- If the split entry is missing: make sure the plugin is enabled and has no error. When the stock sidebar footer does not render this plugin's action, the plugin shows a fallback split button at the conversation area's bottom-left corner.
|
|
422
|
+
- Pane header buttons dead after restoring a minimized split: 0.13.1 and earlier left the covered conversation's native window-drag region above the canvas on Desktop, so Electron swallowed those clicks before the DOM (browsers ignore app-region, which is why the web build could not reproduce it). 0.13.2 declares `-webkit-app-region: no-drag` on the pane header.
|
|
400
423
|
|
|
401
424
|
**Start splitting**
|
|
402
425
|
|
|
@@ -411,6 +434,37 @@ dsh --profile web
|
|
|
411
434
|
- Right-click any conversation (or its row `⋯` button) → **Enter floating window** to detach it into a movable window. Drag its title bar to move it, drag any edge to resize, use **⇲ Dock to split** to put it back into a split, or **✕** to close the float. A conversation is never hosted in both modes: entering a float removes it from the split / pending split first.
|
|
412
435
|
- Right-click a conversation → **Open in independent window** to open it alone in an in-app window with close / minimize / maximize-restore / fullscreen controls — no browser is opened.
|
|
413
436
|
|
|
437
|
+
### Split view entry in the sidebar (0.12.0)
|
|
438
|
+
|
|
439
|
+
- The sidebar's global-panel navigation now has a **Split view** row next to
|
|
440
|
+
**Plugins**, with the plugin's split glyph. The bottom-left split button and
|
|
441
|
+
the session right-click **Split plugin** group use the same glyph.
|
|
442
|
+
- Clicking **Split view** switches the main column to the **Split view panel**:
|
|
443
|
+
with two or more panes it shows the same canvas you get from “Restore split”
|
|
444
|
+
(panes, dividers and the layout toolbar); with fewer panes it shows the
|
|
445
|
+
**Add split** multi-select page, and confirming two or more conversations
|
|
446
|
+
opens the split right there.
|
|
447
|
+
- **Minimize split** from the footer menu now returns to the conversation
|
|
448
|
+
view, and **Exit split** clears the panes and returns as well. Switching to a
|
|
449
|
+
conversation or another plugin panel in the sidebar keeps the layout; click
|
|
450
|
+
**Split view** again to continue.
|
|
451
|
+
- **Switching no longer re-creates the panes (0.13.0)**: the canvas always stays
|
|
452
|
+
mounted in the overlay layer and is only shown/hidden between the Split view
|
|
453
|
+
panel, a plain conversation, the minimized state and plugin panels. While
|
|
454
|
+
hidden it is kept mounted for **20 seconds** (warm hold), so Split view ⇄
|
|
455
|
+
conversation and minimize ⇄ restore are near-instant instead of re-attaching
|
|
456
|
+
every native conversation (session retain + editor guards) each time. After
|
|
457
|
+
the warm window the pane tree is dropped to free resources; the hidden canvas
|
|
458
|
+
also stays in layout, so showing it again is a visibility flip rather than a
|
|
459
|
+
full re-layout of N conversations.
|
|
460
|
+
- **Minimize chip (0.13.0)**: the restore chip shown while the split is
|
|
461
|
+
minimized can be dragged anywhere in the workspace and snaps to the **nearest
|
|
462
|
+
edge** on release — the position along that edge is kept, so it is no longer
|
|
463
|
+
limited to the four corners. The position persists across minimize cycles.
|
|
464
|
+
- The **Restart DSH** row now uses a drawn SVG instead of the U+23FB power
|
|
465
|
+
symbol (missing from the default Windows CJK font stack, where it rendered as
|
|
466
|
+
a mojibake box). Every new icon is inline SVG, so no system font is involved.
|
|
467
|
+
|
|
414
468
|
### Usage help (screenshots)
|
|
415
469
|
|
|
416
470
|
The in-app **Split help** card now carries three annotated screenshots — the
|
|
@@ -490,7 +544,7 @@ Besides the sidebar-footer split button, the plugin registers a **Settings → S
|
|
|
490
544
|
|
|
491
545
|
- **Status**: plugin version, pane count, pending split, floating windows, and the current independent window.
|
|
492
546
|
- **Performance mode**: the persisted switch (on by default) for animations, background observers and the drag preview.
|
|
493
|
-
- **Actions**: add split, exit split, minimize split, reset split, refresh interface, restart DSH (Desktop), help.
|
|
547
|
+
- **Actions**: open split view, add split, exit split, minimize split, reset split, refresh interface, restart DSH (Desktop), help.
|
|
494
548
|
|
|
495
549
|
“Add split” closes the Settings panel before opening the multi-select dialog so the dialog is never hidden behind it; the other actions run in place and refresh the status live.
|
|
496
550
|
|
|
@@ -518,6 +572,28 @@ turns off:
|
|
|
518
572
|
Real conversations, composers, approval flows, split/float/system-window
|
|
519
573
|
features all stay available.
|
|
520
574
|
|
|
575
|
+
- **0.12.0: window resizing no longer measures every frame.** While dragging
|
|
576
|
+
the window edge, each pane's size observer used to commit a new pane box on
|
|
577
|
+
every frame (re-rendering the pane and re-running the composer measurement and
|
|
578
|
+
dock alignment); more panes meant more jank. Now the browser's own CSS reflow
|
|
579
|
+
runs alone during the gesture, and all JS measurement and derived state (slim
|
|
580
|
+
header / short-pane decision, composer-card geometry, dock row width, float
|
|
581
|
+
clamping) runs once when the resize or divider drag settles. Pane transitions
|
|
582
|
+
are also cut while resizing, so a 180 ms width transition cannot chase the live
|
|
583
|
+
window edge. In performance mode, the canvas additionally keeps its gesture-start inner
|
|
584
|
+
layout during a window resize and follows the live window edge through a CSS
|
|
585
|
+
transform, so the stock conversation views inside the panes do not re-measure
|
|
586
|
+
their scrollers on every frame; at settle it relayouts once at the real size
|
|
587
|
+
(text is slightly scaled during the drag and crisps up immediately after).
|
|
588
|
+
Performance mode benefits too.
|
|
589
|
+
|
|
590
|
+
Measured on a dev machine (headless Chromium, performance mode, 2 panes, one
|
|
591
|
+
continuous 40-step window drag): freeze ON vs OFF — median main-thread task time
|
|
592
|
+
across the gesture **2.1 s vs 3.2 s**, long tasks **1 vs 17**, total blocking time
|
|
593
|
+
**9 ms vs 461 ms**, average frame interval **25.7 ms vs 59.1 ms**; with 4 panes,
|
|
594
|
+
long tasks **6 vs 38** and blocking **85 ms vs 989 ms**. The panel entry has less
|
|
595
|
+
left to do because no covered stock conversation stays mounted.
|
|
596
|
+
|
|
521
597
|
**What can still lag**: every pane is a full native conversation view, so N panes
|
|
522
598
|
streaming at once means N independent React/DOM render and scroll pipelines —
|
|
523
599
|
the dominant upstream cost, which a renderer plugin cannot remove (that would
|
|
@@ -538,6 +614,18 @@ installs/updates therefore need **no restart**. A restart is only needed when:
|
|
|
538
614
|
- the footer split icon still has not appeared a few seconds after install (some
|
|
539
615
|
older DSH builds without HMR).
|
|
540
616
|
|
|
617
|
+
**The 0.12.0 / 0.13.0 panel, icons, warm-switch and resize work all live in the client bundle**, so a rebuilt `lib/client.js` is hot-swapped by HMR as well — no DSH restart.
|
|
618
|
+
|
|
619
|
+
**Fixed in 0.11.1: rebuilding the client bundle no longer needs a restart.** A
|
|
620
|
+
rebuild of `lib/client.js` used to make the footer button, the session menus and
|
|
621
|
+
**Settings → Split workspace** disappear until the page was reloaded, because the
|
|
622
|
+
plugin factory re-defined the read-only `__test` seam on the inherited
|
|
623
|
+
`window.__dshSplitWorkspace` object and threw `Cannot redefine property` — DSH
|
|
624
|
+
reported the entry as a failed page synchronization. Each bundle execution now
|
|
625
|
+
publishes a fresh public object, so **a rebuilt bundle hot-swaps, a disable →
|
|
626
|
+
enable cycle and the 0.11.0 → 0.11.1 hot upgrade all apply in place** without a
|
|
627
|
+
reload or restart.
|
|
628
|
+
|
|
541
629
|
Production DSH has **no built-in Restart menu item** (development builds do).
|
|
542
630
|
Since dsh-split-workspace 0.9.0:
|
|
543
631
|
|
|
@@ -563,6 +651,8 @@ Since dsh-split-workspace 0.9.0:
|
|
|
563
651
|
|
|
564
652
|
### Features
|
|
565
653
|
|
|
654
|
+
- **No-rebuild switching + warm hold (0.13.0)** — the split canvas stays mounted, so Split view / plain conversation / minimized / plugin panels no longer tear down and re-create the native panes; the minimize chip drags anywhere and snaps to the nearest edge.
|
|
655
|
+
- **Split view sidebar entry (0.12.0)** — a global-panel row next to **Plugins** opens the split workspace in the main column: the pane canvas when a split exists, or the add-split multi-select page that opens the split as soon as two conversations are confirmed.
|
|
566
656
|
- **Sidebar split menu** — the footer button opens Add / Exit / Minimize / Reset; Exit and Minimize are the same actions as the split toolbar.
|
|
567
657
|
- **Multi-select add** — searchable dialog; pre-selects current panes, lets you uncheck or extend, and rebuilds the split from the final selection.
|
|
568
658
|
- **Session-menu integration** — the stock right-click menu gains Add to split / Leave split. Outside split mode the first pick waits in a pending split until a second conversation is added; removing down to one pane exits the split.
|
|
@@ -616,11 +706,13 @@ Since dsh-split-workspace 0.9.0:
|
|
|
616
706
|
- The pane tree persists across reloads and reopens with the layout you left
|
|
617
707
|
(including a hand-made stacked or L-shaped arrangement). Adding or closing a
|
|
618
708
|
pane re-fits the automatic grid; restarting does not.
|
|
619
|
-
- **Minimize** (toolbar) hides the split and shows the stock
|
|
620
|
-
view while keeping the pane tree. A "restore split" chip brings
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
the
|
|
709
|
+
- **Minimize** (toolbar or footer menu) hides the split and shows the stock
|
|
710
|
+
single-session view while keeping the pane tree. A "restore split" chip brings
|
|
711
|
+
it back (drag it anywhere — it snaps to the nearest edge and remembers its
|
|
712
|
+
position). Clicking another conversation tucks the split into the chip;
|
|
713
|
+
opening a plugin/skills/settings panel only hides the canvas temporarily (the
|
|
714
|
+
panes stay mounted) and it reappears when you return to a conversation or the
|
|
715
|
+
Split view panel, so no restore chip is needed there.
|
|
624
716
|
- One title per pane: the pane header owns the title; the stock header keeps its
|
|
625
717
|
view tabs and actions without repeating the breadcrumb. The close control is
|
|
626
718
|
a drawn **✕** in a red-tinted button, not a low-contrast dot.
|
|
@@ -654,7 +746,7 @@ architecture the upstream plugin uses.
|
|
|
654
746
|
|
|
655
747
|
### Commands
|
|
656
748
|
|
|
657
|
-
- `window.__dshSplitWorkspace.health()` — version, host, panes, geometry,
|
|
749
|
+
- `window.__dshSplitWorkspace.health()` — version, host, panes, geometry, `panelWarm` (canvas hidden in the warm hold) and `canvasRepairs` (interactivity self-checks that had to repair a canvas after showing it; 0 in normal use),
|
|
658
750
|
persisted tree, crash guard.
|
|
659
751
|
- `window.__dshSplitWorkspace.split(sessionId)` — add a session as a pane.
|
|
660
752
|
- `window.__dshSplitWorkspace.addToSplit(sessionId)` /
|
|
@@ -675,6 +767,9 @@ architecture the upstream plugin uses.
|
|
|
675
767
|
(`{ id, minimized, maximized }` or `null`).
|
|
676
768
|
- `window.__dshSplitWorkspace.setPerformanceMode(true/false)` /
|
|
677
769
|
`performanceMode()` — toggle/inspect the persisted performance mode.
|
|
770
|
+
- `window.__dshSplitWorkspace.resizeFreeze()` / `setResizeFreeze(true/false)` —
|
|
771
|
+
whether performance mode freezes the canvas layout during a live window
|
|
772
|
+
resize and follows the window edge with a CSS transform (on by default).
|
|
678
773
|
- `window.__dshSplitWorkspace.reloadClient()` — reload the page.
|
|
679
774
|
- `window.__dshSplitWorkspace.restartApp()` — close and reopen DSH Desktop
|
|
680
775
|
(for the rare changes that need a full restart).
|
|
@@ -711,7 +806,7 @@ architecture the upstream plugin uses.
|
|
|
711
806
|
| `09-pane-renderers` | native/fallback transcript + composer renderers |
|
|
712
807
|
| `10-pane-frame` | pane header, close/dock buttons, composer measurement |
|
|
713
808
|
| `11-canvas-navigation` | canvas/dividers, pickers, keyboard navigation, early API |
|
|
714
|
-
| `12-chrome` | safe mode/help/tips,
|
|
809
|
+
| `12-chrome` | safe mode/help/tips, the split-view main panel, live-resize canvas freeze, update notice, seat |
|
|
715
810
|
| `13-drag-bridge` | inactive drag-to-split bridge |
|
|
716
811
|
| `14-launcher` | footer menu, multi-select add dialog, session menu integration |
|
|
717
812
|
| `15-float-window` | floating window components/layer |
|