@idoall/dsh-session-colors 0.1.0 → 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 CHANGED
@@ -8,6 +8,44 @@ 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
+
27
+ ## [0.1.1] - 2026-09-22
28
+
29
+ Documentation only — no code change.
30
+
31
+ ### Fixed
32
+
33
+ - The npm package no longer tells visitors it is unpublished. The `0.1.0` tarball
34
+ was packed before the README was updated, so the package page carried a grey
35
+ "not published" badge and an install section that said the package was not on
36
+ npm yet. npm packages are immutable, so this needed a new version.
37
+
38
+ ### Added
39
+
40
+ - `screenshots.json` declares the three screenshots the plugin-market detail view
41
+ shows. It lives in this repository, so replacing one later is a push here rather
42
+ than a pull request to the list.
43
+
44
+ ### Notes
45
+
46
+ - First tag-driven release: pushing `v0.1.1` publishes through npm Trusted
47
+ Publishing (OIDC), with no npm token and no manual second factor.
48
+
11
49
  ## [0.1.0] - 2026-09-22
12
50
 
13
51
  First release.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <p align="center">Give any Session a colour and spot it at a glance in the sidebar.</p>
4
4
 
5
5
  <p align="center">
6
- <a href="https://www.npmjs.com/package/@idoall/dsh-session-colors"><img alt="npm" src="https://img.shields.io/badge/npm-not%20published-lightgrey"></a>
6
+ <a href="https://www.npmjs.com/package/@idoall/dsh-session-colors"><img alt="npm" src="https://img.shields.io/npm/v/@idoall/dsh-session-colors?label=npm&color=CB3837"></a>
7
7
  <a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-0F172A"></a>
8
8
  </p>
9
9
 
@@ -71,9 +71,11 @@ Requirements:
71
71
  - Node.js 20 or newer
72
72
  - **Verified DSH version: `0.1.6-alpha.2`** (see [Compatibility](#compatibility))
73
73
 
74
- `@idoall/dsh-session-colors` is **not published on npm yet**, so install the
75
- repository directory for now (once published, the same plugin command installs
76
- the npm version):
74
+ ```sh
75
+ dsh plugin --profile <profile> add @idoall/dsh-session-colors@0.1.0
76
+ ```
77
+
78
+ Working on the plugin itself? Install the directory instead:
77
79
 
78
80
  ```sh
79
81
  dsh plugin --profile <profile> add link:/path/to/dsh-session-colors
@@ -112,12 +114,14 @@ stored as HSVA, so alpha round-trips exactly.
112
114
 
113
115
  ## Compatibility
114
116
 
115
- Current release: plugin **`0.1.0`**, verified against DeepSeek Harness
117
+ Current release: plugin **`0.1.2`**, verified against DeepSeek Harness
116
118
  **`0.1.6-alpha.2`**.
117
119
 
118
120
  | Plugin version | Verified DeepSeek Harness | npm status | What it is |
119
121
  | --- | --- | --- | --- |
120
- | **`0.1.0`** | `0.1.6-alpha.2` | **Not published** (repository only) | First release: Session colour marks, Host-side storage, visible inside a phone's sidebar drawer |
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. |
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 |
121
125
 
122
126
  - **Verified DeepSeek Harness** is the exact DSH version this plugin was actually
123
127
  run against. That list has one home — `dsh.compatibility.dshReleases` in
package/README.zh.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <p align="center">给任意会话上一个颜色,在侧栏一眼认出它。</p>
4
4
 
5
5
  <p align="center">
6
- <a href="https://www.npmjs.com/package/@idoall/dsh-session-colors"><img alt="npm" src="https://img.shields.io/badge/npm-%E6%9C%AA%E5%8F%91%E5%B8%83-lightgrey"></a>
6
+ <a href="https://www.npmjs.com/package/@idoall/dsh-session-colors"><img alt="npm" src="https://img.shields.io/npm/v/@idoall/dsh-session-colors?label=npm&color=CB3837"></a>
7
7
  <a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-0F172A"></a>
8
8
  </p>
9
9
 
@@ -53,7 +53,11 @@
53
53
  - Node.js 20 或更新版本
54
54
  - **已验证的 DSH 版本:`0.1.6-alpha.2`**(见[兼容性](#兼容性))
55
55
 
56
- npm 上的 `@idoall/dsh-session-colors` **尚未发布**,所以现在装的是本仓库目录(发布后可用同样的插件命令装 npm 版本):
56
+ ```sh
57
+ dsh plugin --profile <profile> add @idoall/dsh-session-colors@0.1.0
58
+ ```
59
+
60
+ 要改插件本身就用目录安装:
57
61
 
58
62
  ```sh
59
63
  dsh plugin --profile <profile> add link:/path/to/dsh-session-colors
@@ -84,11 +88,13 @@ dsh plugin --profile <profile> add link:/path/to/dsh-session-colors
84
88
 
85
89
  ## 兼容性
86
90
 
87
- 当前版本:插件 **`0.1.0`** 已针对 DeepSeek Harness **`0.1.6-alpha.2`** 验证。
91
+ 当前版本:插件 **`0.1.2`** 已针对 DeepSeek Harness **`0.1.6-alpha.2`** 验证。
88
92
 
89
93
  | 插件版本 | 已验证的 DeepSeek Harness | npm 发布状态 | 该版本是什么 |
90
94
  | --- | --- | --- | --- |
91
- | **`0.1.0`** | `0.1.6-alpha.2` | **未发布**(仅本仓库) | 首个版本:会话颜色标记、宿主侧存储、手机抽屉内可见 |
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 不再写"尚未发布",并声明了市场截图。 |
97
+ | `0.1.0` | `0.1.6-alpha.2` | 已发布 | 首个版本:会话颜色标记、宿主侧存储、手机抽屉内可见 |
92
98
 
93
99
  - **已验证的 DeepSeek Harness** 是这个插件**实际跑过**的确切 DSH 版本。这份清单只有一个存放处——[`package.json`](package.json) 的 `dsh.compatibility.dshReleases`——并且有测试保证两个 README 的兼容性段落与它逐字一致、且落在 `peerDependencies` 声明的范围内。未列出的 DSH 版本**不会被宣称为兼容**。
94
100
  - `peerDependencies` 声明的范围是 `>=0.1.6-0 <0.2.0`(`dsh-client-ui-layout` 与 `dsh-client-ui-conversation`):这是**允许加载**的范围,不等于已验证。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idoall/dsh-session-colors",
3
- "version": "0.1.0",
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
- let observer
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
- observer = new MutationObserver(sync)
627
- observer.observe(document.body, { childList: true, subtree: true })
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
- observer.observe(document.body, { attributes: true, attributeFilter: ['class'] })
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
- observer = undefined
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
- if (observer !== undefined) observer.disconnect()
656
+ for (const watcher of observers) watcher.disconnect()
642
657
  }
643
658
  }, [snapshot])
644
659