dsh-todo-float-ball 0.11.0 → 0.11.1

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
@@ -3,6 +3,46 @@
3
3
  All notable changes to this project are documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
+ ## [0.11.1] - 2026-09-13
7
+
8
+ > Maintenance release: typography cleanup only. No behaviour, API or UI change
9
+ > of any kind — the shipped `lib/client.js` is the same program with the
10
+ > whitespace residue of the 0.11.0 scripted edits taken out.
11
+
12
+ ### Fixed
13
+
14
+ - **Header comment reported the wrong version** (`lib/client.js`, top-of-file
15
+ banner). The banner still said `v0.9.1` after the package had moved through
16
+ 0.10.0 and 0.11.0; it now reads `v0.11.1`. Comment text only — nothing here
17
+ is read at runtime.
18
+
19
+ ### Changed
20
+
21
+ - **Blank-line residue compressed** (`lib/client.js`). The scripted edits that
22
+ produced 0.11.0 (Plan-A9 / A10 / A11) left 47 stray blank lines behind: 43
23
+ inside `renderList()` — one between every statement, and even between the
24
+ continuation lines of a shared comment — 2 whitespace-only lines inside the
25
+ `buildUI()` panel-markup concatenation, and 2 extras in a triple blank run
26
+ between `renderList()` and `renderPinned()`. Blank lines 104 → 57,
27
+ trailing whitespace 2 → 0, and no blank run longer than a single line is left.
28
+ The surviving blank lines are the 57 that separate top-level declarations and
29
+ the comment-led groups inside `buildUI()` — the file's original style.
30
+ - **Two-statement lines split** (`lib/client.js`). Three lines each carried two
31
+ statements: `ui.ctitle.textContent = …` followed by the `ui.capCur` caption
32
+ update (Plan-A11), `ui.pinSec = …` followed by `ui.capCur = …`, and
33
+ `e.stopPropagation();` followed by `var li = …`. Every statement now owns
34
+ its line.
35
+ - **Leftover empty CSS element removed** (`lib/client.js`, `cssText()`). The
36
+ column-caption edit left an `""` element in the shared CSS rule array, which
37
+ joined into a stray empty line in the generated stylesheet. The element line
38
+ is gone; the surrounding rules are byte-identical.
39
+ - **Zero semantic change, verified mechanically.** A whitespace-insensitive
40
+ token comparison of `lib/client.js` before and after (code tokens, string
41
+ literals and comments kept separately) shows exactly two differences: the
42
+ header version text and the deleted `""` CSS element. `node --check` passes,
43
+ and both regression harnesses are unchanged — `dev-verify-refresh.cjs`
44
+ 14/14 and `dev-verify-merge.cjs` 59/59.
45
+
6
46
  ## [0.11.0] - 2026-09-13
7
47
 
8
48
  > Client-half release. Pinned (📌) sessions now render exactly like the current
@@ -29,11 +69,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
29
69
  conversation no longer expands it in every other one; the pinned panels and
30
70
  the current panel now share the same per-sid buckets (the Plan-A8
31
71
  `pinnedHistOpen` / `pinnedOpenHistOpen` maps are gone).
32
- - **Fold / 🧹 / ♻️ controls act on their own session**
33
- (`lib/client.js`, `actionSid()` + `data-ownsid`). Those rows used to resolve
34
- the *current* session, so a 🧹 clicked inside a pinned panel cleared the
35
- wrong list. Every action row is tagged with the sid it was rendered for;
36
- `ACT_ALIAS` keeps the legacy Plan-A8 action names working.
72
+ - **Fold / 🧹 / ♻️ controls carry the session they belong to**
73
+ (`lib/client.js`, `actionSid()` + `data-ownsid`). Now that one renderer serves
74
+ both list kinds, every action row is tagged with the sid it was rendered for
75
+ and the dispatcher resolves it (`data-ownsid` → legacy `data-sid` → the
76
+ current session as the last fallback), so a control inside a pinned panel can
77
+ never act on the current list. `ACT_ALIAS` maps the legacy Plan-A8 action
78
+ names onto the unified ones, so nothing that used to work stops working.
37
79
  - **Pinned header counts report the current plan only**
38
80
  (`lib/client.js`, `countsOf(snapshotRowsOf(sid))`). The pinned row's
39
81
  done/total previously folded archived history into the numbers, breaking the
package/lib/client.js CHANGED
@@ -5,7 +5,7 @@ window.__ModuleLoader__.load({
5
5
  var exports = module.exports;
6
6
 
7
7
  // ============================================================
8
- // dsh-todo-float-ball — client half (browser). v0.9.1
8
+ // dsh-todo-float-ball — client half (browser). v0.11.1
9
9
  //
10
10
  // A persistent, draggable floating ball that mirrors todo_write lists.
11
11
  //
@@ -783,7 +783,6 @@ window.__ModuleLoader__.load({
783
783
  ".tfb-panel.tfb-hz .tfb-colcap{display:block}",
784
784
  ".tfb-panel.tfb-hz .tfb-col-cur{flex:1 1 45%;min-width:250px;max-width:none;box-sizing:border-box;padding-right:10px;border-right:1px solid rgba(255,255,255,.10)}",
785
785
  ".tfb-panel.tfb-hz .tfb-col-pin{flex:1 1 50%;min-width:260px;box-sizing:border-box;padding-left:10px}",
786
- "",
787
786
  ".tfb-head{display:flex;align-items:center;gap:6px;margin-bottom:6px;padding-bottom:6px;border-bottom:1px solid rgba(45,212,168,.25)}",
788
787
  ".tfb-title{font-weight:700;font-size:13px;white-space:nowrap}",
789
788
  ".tfb-ctitle{flex:1;min-width:0;font-size:11px;color:#9aa3b2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:text}",
@@ -959,98 +958,54 @@ window.__ModuleLoader__.load({
959
958
  }
960
959
 
961
960
  function renderList() {
962
-
963
961
  if (!ui.list) return;
964
-
965
962
  // Plan-A4: header summary reports the CURRENT SNAPSHOT only (history
966
-
967
963
  // folds are an archive and stay out of every counter).
968
-
969
964
  var c = snapshotList().length ? countsOf(snapshotList()) : { done: 0, active: 0, total: 0 };
970
-
971
965
  if (ui.ctitle) {
972
-
973
966
  // while the rename editor is live, don't rebuild the title cell
974
-
975
967
  if (editing.sid === normSid(currentSid)) { /* keep editor */ }
976
-
977
968
  else {
978
-
979
- ui.ctitle.textContent = currentSid ? sessionTitle(currentSid) : ""; if (ui.capCur) ui.capCur.textContent = "▸ " + (ui.ctitle.textContent || "当前对话");
980
-
969
+ ui.ctitle.textContent = currentSid ? sessionTitle(currentSid) : "";
970
+ if (ui.capCur) ui.capCur.textContent = "▸ " + (ui.ctitle.textContent || "当前对话");
981
971
  ui.ctitle.title = currentSid ? "点击重命名此对话" : "";
982
-
983
972
  }
984
-
985
973
  }
986
-
987
974
  if (ui.summary) {
988
-
989
975
  var parts = [];
990
-
991
976
  if (c.done > 0) parts.push(c.done + " 完成");
992
-
993
977
  if (c.active > 0) parts.push(c.active + " 进行中");
994
-
995
978
  var pend = c.total - c.done - c.active;
996
-
997
979
  if (pend > 0) parts.push(pend + " 待办");
998
-
999
980
  ui.summary.textContent = parts.join(" · ");
1000
-
1001
981
  }
1002
-
1003
982
  if (ui.pinBtn) {
1004
-
1005
983
  var on = currentSid && isPinned(currentSid);
1006
-
1007
984
  ui.pinBtn.classList.toggle("tfb-on", !!on);
1008
-
1009
985
  ui.pinBtn.title = on ? "取消固定当前会话" : "固定当前会话(切换对话后仍监控)";
1010
-
1011
986
  ui.pinBtn.textContent = on ? "📍" : "📌";
1012
-
1013
987
  }
1014
-
1015
988
  var list = currentList();
1016
-
1017
989
  if (!list.length) {
1018
-
1019
990
  ui.list.innerHTML = '<li class="tfb-empty">当前会话暂无任务清单<br><span style="font-size:10px">AI 使用 todo_write 后自动显示;📌 可固定会话</span></li>';
1020
-
1021
991
  } else {
1022
-
1023
992
  // Plan-A9: the whole body (snapshot rows + the two history folds +
1024
993
  // batch-clear + restore) comes from the ONE shared renderer, scoped
1025
994
  // to the current session; renderPinned() reuses it per pinned sid.
1026
995
  var html = historySectionHtml(currentSid, sessionTodos(currentSid));
1027
-
1028
996
  ui.list.innerHTML = html;
1029
-
1030
997
  // Plan-A4: counts from the CURRENT SNAPSHOT only. (User request
1031
-
1032
998
  // 2026-09-13: the dsh-client-auto-continue recommendation line is
1033
-
1034
999
  // removed — no third-party plugin advertising in this UI.)
1035
-
1036
1000
  var cc = countsOf(snapshotRowsOf(currentSid));
1037
-
1038
1001
  if (cc.done < cc.total) {
1039
-
1040
1002
  var left = cc.total - cc.done;
1041
-
1042
1003
  ui.list.innerHTML += '<li class="tfb-empty" style="padding:6px 0 2px;font-size:10px">⚠️ 还有 ' + left + ' 项未完成</li>';
1043
-
1044
1004
  }
1045
-
1046
1005
  }
1047
-
1048
1006
  renderPinned();
1049
-
1050
1007
  }
1051
1008
 
1052
-
1053
-
1054
1009
  function renderPinned() {
1055
1010
  if (!ui.pinSec) return;
1056
1011
  if (pinned.length === 0) { ui.pinSec.innerHTML = ""; return; }
@@ -1262,12 +1217,10 @@ window.__ModuleLoader__.load({
1262
1217
  '<div class="tfb-colcap" data-cap="cur"></div>' +
1263
1218
  '<ul class="tfb-list"></ul>' +
1264
1219
  "</div>" +
1265
-
1266
1220
  '<div class="tfb-col tfb-col-pin">' +
1267
1221
  '<div class="tfb-colcap" data-cap="pin">📌 固定会话</div>' +
1268
1222
  '<div class="tfb-pinsec"></div>' +
1269
1223
  "</div>" +
1270
-
1271
1224
  '<div class="tfb-hint"><button class="tfb-btn" data-act="resetPos" type="button" title="一键归位右下角">🎯 归位</button> · 切换对话自动跟随 · 📌 固定 · 🎨 皮肤 · Esc 折叠</div>' +
1272
1225
  "</div>";
1273
1226
  shadow.appendChild(root);
@@ -1284,7 +1237,8 @@ window.__ModuleLoader__.load({
1284
1237
  ui.ctitle = root.querySelector(".tfb-ctitle");
1285
1238
  ui.summary = root.querySelector(".tfb-summary");
1286
1239
  ui.pinBtn = root.querySelector('[data-act="pin"]');
1287
- ui.pinSec = root.querySelector(".tfb-pinsec"); ui.capCur = root.querySelector('[data-cap="cur"]');
1240
+ ui.pinSec = root.querySelector(".tfb-pinsec");
1241
+ ui.capCur = root.querySelector('[data-cap="cur"]');
1288
1242
  ui.themeMenu = root.querySelector(".tfb-theme-menu");
1289
1243
 
1290
1244
  // restore position (clamped inside viewport)
@@ -1490,7 +1444,8 @@ window.__ModuleLoader__.load({
1490
1444
  // Plan-A2.2: resolve the row's OWN session (a pinned list row
1491
1445
  // belongs to its pinned sid, not to the current one) — walk up to
1492
1446
  // the enclosing .tfb-pinlist's parent pinrow when present.
1493
- e.stopPropagation(); var li = t.closest ? t.closest(".tfb-item") : null;
1447
+ e.stopPropagation();
1448
+ var li = t.closest ? t.closest(".tfb-item") : null;
1494
1449
  var txtEl = li ? li.querySelector(".tfb-txt") : null;
1495
1450
  if (txtEl) {
1496
1451
  // Plan-A2.2: the row's own session. Pinned lists carry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-todo-float-ball",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "DSH todo 悬浮球:常驻可拖动悬浮球实时显示当前会话 todo_write 任务清单进度(总数/完成数/进行中),Shadow DOM 样式隔离,点击折叠/展开完整清单,状态颜色(待办灰/进行中橙脉动/完成绿)。数据双路同步:MutationObserver 抓官方 todo 面板为主 + 拦截会话投影帧为辅。双端可用(Desktop 桌面端 + Web 网页端)。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",