@idoall/dsh-session-colors 0.1.1 → 0.1.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 +16 -0
- package/README.md +3 -2
- package/README.zh.md +3 -2
- package/package.json +1 -1
- package/src/client.js +21 -6
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.1.2] - 2026-09-22
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Chips no longer stay at their old coordinates for up to 20 seconds when a
|
|
16
|
+
workspace is collapsed or expanded. Each mutation option set now gets its own
|
|
17
|
+
`MutationObserver`: a second `observe()` call on the same target **replaces**
|
|
18
|
+
the first one's options rather than merging them, so sharing one observer for
|
|
19
|
+
`childList` and for the `body` class had silently stopped row additions and
|
|
20
|
+
removals from being watched at all. The chips only moved when the 20-second peer
|
|
21
|
+
poll happened to re-render the layer.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- A regression test that fails if two option sets ever share one observer again.
|
|
26
|
+
|
|
11
27
|
## [0.1.1] - 2026-09-22
|
|
12
28
|
|
|
13
29
|
Documentation only — no code change.
|
package/README.md
CHANGED
|
@@ -114,12 +114,13 @@ stored as HSVA, so alpha round-trips exactly.
|
|
|
114
114
|
|
|
115
115
|
## Compatibility
|
|
116
116
|
|
|
117
|
-
Current release: plugin **`0.1.
|
|
117
|
+
Current release: plugin **`0.1.2`**, verified against DeepSeek Harness
|
|
118
118
|
**`0.1.6-alpha.2`**.
|
|
119
119
|
|
|
120
120
|
| Plugin version | Verified DeepSeek Harness | npm status | What it is |
|
|
121
121
|
| --- | --- | --- | --- |
|
|
122
|
-
| **`0.1.
|
|
122
|
+
| **`0.1.2`** | `0.1.6-alpha.2` | `latest` | Fixes chips staying at their old coordinates for ~20s when a workspace is collapsed or expanded: a second `MutationObserver.observe()` on the same target had silently replaced the `childList` watch. |
|
|
123
|
+
| `0.1.1` | `0.1.6-alpha.2` | published | Documentation only: the packaged README no longer says "not published", and the market screenshots are declared. |
|
|
123
124
|
| `0.1.0` | `0.1.6-alpha.2` | published | First release: Session colour marks, Host-side storage, visible inside a phone's sidebar drawer |
|
|
124
125
|
|
|
125
126
|
- **Verified DeepSeek Harness** is the exact DSH version this plugin was actually
|
package/README.zh.md
CHANGED
|
@@ -88,11 +88,12 @@ dsh plugin --profile <profile> add link:/path/to/dsh-session-colors
|
|
|
88
88
|
|
|
89
89
|
## 兼容性
|
|
90
90
|
|
|
91
|
-
当前版本:插件 **`0.1.
|
|
91
|
+
当前版本:插件 **`0.1.2`** 已针对 DeepSeek Harness **`0.1.6-alpha.2`** 验证。
|
|
92
92
|
|
|
93
93
|
| 插件版本 | 已验证的 DeepSeek Harness | npm 发布状态 | 该版本是什么 |
|
|
94
94
|
| --- | --- | --- | --- |
|
|
95
|
-
| **`0.1.
|
|
95
|
+
| **`0.1.2`** | `0.1.6-alpha.2` | `latest` | 修掉折叠/展开工作区后色块停在旧位置约 20 秒:同一个 target 上第二次 `MutationObserver.observe()` 把 `childList` 监听顶掉了。 |
|
|
96
|
+
| `0.1.1` | `0.1.6-alpha.2` | 已发布 | 仅文档:打包进 npm 的 README 不再写"尚未发布",并声明了市场截图。 |
|
|
96
97
|
| `0.1.0` | `0.1.6-alpha.2` | 已发布 | 首个版本:会话颜色标记、宿主侧存储、手机抽屉内可见 |
|
|
97
98
|
|
|
98
99
|
- **已验证的 DeepSeek Harness** 是这个插件**实际跑过**的确切 DSH 版本。这份清单只有一个存放处——[`package.json`](package.json) 的 `dsh.compatibility.dshReleases`——并且有测试保证两个 README 的兼容性段落与它逐字一致、且落在 `peerDependencies` 声明的范围内。未列出的 DSH 版本**不会被宣称为兼容**。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idoall/dsh-session-colors",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DSH web plugin: give any Session a colour mark, shown as a chip in the sidebar and picked from the conversation header. Marks are stored on the Host, so a colour chosen on one device is visible on every other one — including over LAN and tunnels.",
|
|
6
6
|
"main": "./src/index.js",
|
package/src/client.js
CHANGED
|
@@ -621,16 +621,31 @@ window.__ModuleLoader__.load({
|
|
|
621
621
|
}
|
|
622
622
|
document.addEventListener('transitionrun', onTransition, true)
|
|
623
623
|
document.addEventListener('transitionend', onTransition, true)
|
|
624
|
-
|
|
624
|
+
// Each option set needs its OWN observer. A second `observe()` call on
|
|
625
|
+
// the same target REPLACES the first one's options rather than merging
|
|
626
|
+
// them (DOM spec), so sharing one observer silently stopped childList
|
|
627
|
+
// from being watched at all: collapsing a workspace removed its rows
|
|
628
|
+
// without any re-sync, and the chips sat at their old coordinates until
|
|
629
|
+
// the peer poll happened to re-render the layer ~20s later.
|
|
630
|
+
const observers = []
|
|
625
631
|
try {
|
|
626
|
-
|
|
627
|
-
|
|
632
|
+
const rowsObserver = new MutationObserver(sync)
|
|
633
|
+
rowsObserver.observe(document.body, { childList: true, subtree: true })
|
|
634
|
+
observers.push(rowsObserver)
|
|
628
635
|
// The phone adapter opens its drawer by toggling a class on `body`.
|
|
629
636
|
// With transitions disabled the geometry still changes, just without a
|
|
630
637
|
// transition event to follow.
|
|
631
|
-
|
|
638
|
+
const drawerObserver = new MutationObserver(sync)
|
|
639
|
+
drawerObserver.observe(document.body, { attributes: true, attributeFilter: ['class'] })
|
|
640
|
+
observers.push(drawerObserver)
|
|
641
|
+
// A workspace collapse that hides rows instead of removing them
|
|
642
|
+
// produces no childList mutation, so follow the ARIA state and
|
|
643
|
+
// `hidden` as well.
|
|
644
|
+
const stateObserver = new MutationObserver(sync)
|
|
645
|
+
stateObserver.observe(document.body, { attributes: true, attributeFilter: ['aria-expanded', 'hidden'], subtree: true })
|
|
646
|
+
observers.push(stateObserver)
|
|
632
647
|
} catch {
|
|
633
|
-
|
|
648
|
+
// Without observers the layer still follows scroll, resize and transitions.
|
|
634
649
|
}
|
|
635
650
|
return () => {
|
|
636
651
|
cancelFrame(frame)
|
|
@@ -638,7 +653,7 @@ window.__ModuleLoader__.load({
|
|
|
638
653
|
window.removeEventListener('resize', sync)
|
|
639
654
|
document.removeEventListener('transitionrun', onTransition, true)
|
|
640
655
|
document.removeEventListener('transitionend', onTransition, true)
|
|
641
|
-
|
|
656
|
+
for (const watcher of observers) watcher.disconnect()
|
|
642
657
|
}
|
|
643
658
|
}, [snapshot])
|
|
644
659
|
|