dsh-todo-float-ball 0.9.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 +264 -0
- package/README.md +51 -1
- package/README.zh.md +28 -1
- package/lib/client.js +1611 -1115
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,270 @@
|
|
|
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
|
+
|
|
46
|
+
## [0.11.0] - 2026-09-13
|
|
47
|
+
|
|
48
|
+
> Client-half release. Pinned (📌) sessions now render exactly like the current
|
|
49
|
+
> view — one shared history renderer, per-session fold state, per-session
|
|
50
|
+
> controls — and the panel gained a two-column layout switch with captions.
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- **One shared history renderer for current and pinned lists**
|
|
55
|
+
(`lib/client.js`, `historySectionHtml(sid, list)`, Plan-A9). Pinned sessions
|
|
56
|
+
used to carry their own copy of the fold logic (Plan-A8) which had no
|
|
57
|
+
`🧹 Clear all history` row and no `♻️ Restore all hidden history` row. Both
|
|
58
|
+
list kinds are now produced by the same function, so the pinned panel and
|
|
59
|
+
the current panel are the same experience by construction, not by
|
|
60
|
+
duplication.
|
|
61
|
+
- **Snapshot / history split ignores the hidden filter**
|
|
62
|
+
(`lib/client.js`, `snapshotRowsOf()` + `historySectionHtml()`). The split
|
|
63
|
+
was taken on the already filtered list, so hiding one snapshot row pulled an
|
|
64
|
+
archived row up into the flat area and shifted every fold boundary. The raw
|
|
65
|
+
(unfiltered) list is now cut at `snapLen` first and each part is filtered
|
|
66
|
+
afterwards — fold counts and boundaries are stable while you hide rows.
|
|
67
|
+
- **Fold state is per session** (`lib/client.js`, `historyOpen` /
|
|
68
|
+
`historyOpenOpen` became sid-keyed maps). Expanding "已完成历史" in one
|
|
69
|
+
conversation no longer expands it in every other one; the pinned panels and
|
|
70
|
+
the current panel now share the same per-sid buckets (the Plan-A8
|
|
71
|
+
`pinnedHistOpen` / `pinnedOpenHistOpen` maps are gone).
|
|
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.
|
|
79
|
+
- **Pinned header counts report the current plan only**
|
|
80
|
+
(`lib/client.js`, `countsOf(snapshotRowsOf(sid))`). The pinned row's
|
|
81
|
+
done/total previously folded archived history into the numbers, breaking the
|
|
82
|
+
statistics rule established in 0.10.0.
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
|
|
86
|
+
- **Panel layout switch (⇄)** (`lib/client.js`, Plan-A10). A new ⇄ button in
|
|
87
|
+
the panel header toggles between the stacked layout (current list above,
|
|
88
|
+
pinned sessions below) and a side-by-side layout (left column = current
|
|
89
|
+
list, right column = pinned sessions). The choice is persisted in
|
|
90
|
+
`localStorage["dsh-todo-float-ball-layout"]`, restored on load, and the
|
|
91
|
+
panel repositions itself after the switch.
|
|
92
|
+
- **Column captions in the side-by-side layout** (`lib/client.js`, Plan-A11).
|
|
93
|
+
Each column gets a caption line: the left one shows the current
|
|
94
|
+
conversation title (`▸ <title>`, kept in sync with the header title), the
|
|
95
|
+
right one shows `📌 固定会话`. In the stacked layout the captions are hidden,
|
|
96
|
+
so nothing changes there.
|
|
97
|
+
|
|
98
|
+
### Changed
|
|
99
|
+
|
|
100
|
+
- `package.json` version 0.10.0 → 0.11.0.
|
|
101
|
+
- Client-half changes only; the host half (`lib/index.js`,
|
|
102
|
+
`cordis.patch.yml`, discipline injection, health routes) is unchanged.
|
|
103
|
+
- `lib/client.js` is stored with LF line endings from this release (it matches
|
|
104
|
+
the byte-for-byte copy that actually runs here); no content change beyond
|
|
105
|
+
the fixes above.
|
|
106
|
+
- Internal cleanup: the click dispatcher no longer carries an empty duplicate
|
|
107
|
+
`copyItem` branch that appeared while this batch was in flight (it never
|
|
108
|
+
shipped in a release; no user-visible effect).
|
|
109
|
+
- The `lib/client.js` header comment still reads `v0.9.1` (cosmetic drift; the
|
|
110
|
+
authoritative version is `package.json`, and this file is published exactly
|
|
111
|
+
as deployed).
|
|
112
|
+
- Regression baseline at release time: `node --check` clean, the local
|
|
113
|
+
DOM-stub probes passed 14/14 (refresh) and 59/59 (history merge / fold /
|
|
114
|
+
cleanup / restore) checks.
|
|
115
|
+
|
|
116
|
+
## [0.10.0] - 2026-09-13
|
|
117
|
+
|
|
118
|
+
> Local-only release. A major client-half UX overhaul around session history:
|
|
119
|
+
> merged snapshots no longer wipe older todos, the ball's counters now mean
|
|
120
|
+
> "the current plan", and everything older is an archived, foldable,
|
|
121
|
+
> cleanable, restorable, copyable layer that never leaks into the numbers.
|
|
122
|
+
|
|
123
|
+
### Fixed
|
|
124
|
+
|
|
125
|
+
- **History merge — old tasks no longer disappear** (`lib/client.js`,
|
|
126
|
+
`setSessionTodos`). Snapshots were merged into history by replacing the
|
|
127
|
+
per-session bucket with the newest snapshot wholesale, so any task absent
|
|
128
|
+
from the new snapshot vanished from the panel. A snapshot is now stored as
|
|
129
|
+
the leading `snapLen` items of the bucket and previous records whose items
|
|
130
|
+
are not contained in the new snapshot are appended after it — the current
|
|
131
|
+
plan always renders first and intact, older items survive as archive rows
|
|
132
|
+
and are never resurrected into the live counts. This also root-fixes the
|
|
133
|
+
user-reported regression introduced by the 0.9.1 removal of the
|
|
134
|
+
monotonic-progress guard (a legitimate "fewer done items" snapshot used to
|
|
135
|
+
erase history; it now simply re-defines the snapshot prefix).
|
|
136
|
+
- **Statistics — the ball counts only the current plan** (`lib/client.js`,
|
|
137
|
+
`snapshotList()` + all render paths). Ball-face `done/total`, the progress
|
|
138
|
+
ring, the header summary, and the "N items left" notice all previously
|
|
139
|
+
counted merged history rows, so finished archive entries inflated the
|
|
140
|
+
numbers and the ring never returned to 0/0 after a plan was replaced. All
|
|
141
|
+
four now read exclusively the latest snapshot; history is a pure archive
|
|
142
|
+
with no effect on any counter.
|
|
143
|
+
- **2s safety-net poll no longer undoes user hides** (`lib/client.js`).
|
|
144
|
+
Signature dedup moved ahead of the visibility filter application, so the
|
|
145
|
+
periodic `syncFromSessions()` refresh can no longer resurrect rows the
|
|
146
|
+
user hid a second earlier.
|
|
147
|
+
- Removed the panel-footer recommendation line for the third-party plugin
|
|
148
|
+
`dsh-client-auto-continue` (user request: no third-party plugin ads).
|
|
149
|
+
|
|
150
|
+
### Added
|
|
151
|
+
|
|
152
|
+
- **Per-row hide (✕)** (`lib/client.js`, `HIDE_KEY`). Every history row gets
|
|
153
|
+
an ✕ button (shown on hover) that hides it at the display layer only.
|
|
154
|
+
Hidden ids are stored per session in
|
|
155
|
+
`localStorage["dsh-todo-float-ball-hidden-v1"]`; the data layer, the
|
|
156
|
+
signature and the merge logic see zero difference.
|
|
157
|
+
- **Independent history fold rows** (`lib/client.js`, Plan-A3/A3.1). Two
|
|
158
|
+
separate collapse rows — `▾ Completed history (N)` and
|
|
159
|
+
`▸ Abandoned history tasks (M)` — each counted from its own status set and
|
|
160
|
+
collapsed by default; the latest snapshot always renders fully expanded.
|
|
161
|
+
The per-session bucket gained a `snapLen` field to mark the snapshot
|
|
162
|
+
prefix (also used by the statistics fix above).
|
|
163
|
+
- **Batch cleanup (🧹)** (`lib/client.js`, Plan-A5). Each fold row carries a
|
|
164
|
+
🧹 button that hides everything in that fold, plus a
|
|
165
|
+
`🧹 Clear all history (X)` row that hides both folds at once.
|
|
166
|
+
- **Row copy button (📋)** (`lib/client.js`, Plan-A6). Every row gets a 📋
|
|
167
|
+
button that copies the full task text from a `data-copy` attribute — not
|
|
168
|
+
the 80-char display truncation — via `execCommand('copy')` first with a
|
|
169
|
+
clipboard-API fallback, and gives a real ✓/⚠ feedback.
|
|
170
|
+
- **One-click restore (♻️)** (`lib/client.js`, Plan-A7). A
|
|
171
|
+
`♻️ Restore all hidden history (X)` row appears only while at least one
|
|
172
|
+
row of the session is hidden and unhides everything at once (the inverse
|
|
173
|
+
of ✕/🧹).
|
|
174
|
+
- **Pinned sessions: per-row hide without cross-session leaks**
|
|
175
|
+
(`lib/client.js`, Plan-A2.2). Rows inside a pinned (📌) session list can be
|
|
176
|
+
hidden independently: pinned `<ul>`s carry a `data-ownsid` attribute and
|
|
177
|
+
`sessionTodosVisible()` filters per owning session, so a hidden id stored
|
|
178
|
+
under session A can never hide a row rendered for session B.
|
|
179
|
+
|
|
180
|
+
### Changed
|
|
181
|
+
|
|
182
|
+
- `package.json` version 0.9.1 → 0.10.0.
|
|
183
|
+
- Client-half changes only; the host half (`lib/index.js`,
|
|
184
|
+
`cordis.patch.yml`, discipline injection, health routes) is unchanged.
|
|
185
|
+
- The `lib/client.js` header comment still reads `v0.9.1` (cosmetic drift;
|
|
186
|
+
the authoritative version is `package.json`).
|
|
187
|
+
|
|
188
|
+
## [0.9.1] - 2026-09-12
|
|
189
|
+
|
|
190
|
+
> Local-only release. Fixes the two ways the ball could sit on stale todo data,
|
|
191
|
+
> and makes the plugin usable straight after install with no configuration step.
|
|
192
|
+
|
|
193
|
+
### Fixed
|
|
194
|
+
|
|
195
|
+
- **Refresh defect 1 — the progress-regression guard is gone**
|
|
196
|
+
(`lib/client.js`, `setSessionTodos`). `todo_write` is a whole-list
|
|
197
|
+
replacement, so a fresh snapshot may legitimately carry FEWER completed items
|
|
198
|
+
than the previously rendered one (list re-organised, a status re-adjusted, an
|
|
199
|
+
item re-opened, a round rewriting the plan). The old plan-aware monotonic
|
|
200
|
+
guard compared done-counts within an identical content set and silently
|
|
201
|
+
discarded those snapshots as "stale", which is exactly why the ball kept
|
|
202
|
+
showing outdated progress. A new snapshot now always wins; the existing
|
|
203
|
+
signature (`status|content` join) check remains the only dedupe, so an
|
|
204
|
+
unchanged payload still costs nothing.
|
|
205
|
+
- **Refresh defect 2 — the 2s watcher now pulls todo data**
|
|
206
|
+
(`lib/client.js`, `watchBallVisibility`). The interval only refreshed ball
|
|
207
|
+
visibility and the theme, never the todos: if the
|
|
208
|
+
`ctx.sessions.list.subscribe()` callback stopped firing (shell re-render,
|
|
209
|
+
dropped projection frame, remount), the ball stayed on stale data until a
|
|
210
|
+
manual page reload. `syncFromSessions()` is now called from that tick as a
|
|
211
|
+
safety net. It stays cheap by construction: `setSessionTodos()` returns early
|
|
212
|
+
on an identical signature and `syncFromSessions()` only re-renders when
|
|
213
|
+
something actually moved (`setSessionTodos` now reports whether it accepted a
|
|
214
|
+
snapshot).
|
|
215
|
+
|
|
216
|
+
### Added
|
|
217
|
+
|
|
218
|
+
- **Install-and-go defaults** (`lib/client.js`: `DEFAULTS` + `getCfg` /
|
|
219
|
+
`peekCfg` / `ensureDefaultCfg`). Preferences live in `localStorage`, which is
|
|
220
|
+
per-origin — a fresh install, a new profile, a cleared browser profile, or a
|
|
221
|
+
changed port all start empty and used to require re-configuring by hand. Every
|
|
222
|
+
switch now carries a code default, seeded into `localStorage` once on first
|
|
223
|
+
run so the value also stays visible and editable afterwards:
|
|
224
|
+
|
|
225
|
+
| Key | Default |
|
|
226
|
+
|---|---|
|
|
227
|
+
| `dsh-tfb-ball-visible` | `1` (always visible) |
|
|
228
|
+
| `dsh-tfb-theme` | `graphite` |
|
|
229
|
+
| `dsh-todo-float-ball-capsule` | `0` (round ball, not pill) |
|
|
230
|
+
| `dsh-todo-float-ball-pos` | bottom-right for the current viewport |
|
|
231
|
+
|
|
232
|
+
`injectDiscipline` (host-side prompt section) already defaulted to `true` and
|
|
233
|
+
is unchanged. Seeding only ever writes an ABSENT key — an existing user's
|
|
234
|
+
stored choice is never overwritten (covered by a regression test). The seeded
|
|
235
|
+
position is clamped into the viewport, and the restore path still falls back to
|
|
236
|
+
the CSS default when a stored point no longer fits, so a stale seed cannot park
|
|
237
|
+
the ball off-screen.
|
|
238
|
+
|
|
239
|
+
### Changed
|
|
240
|
+
|
|
241
|
+
- `lib/client.js` header comment `v0.3.0` → `v0.9.1` (it had drifted from
|
|
242
|
+
`package.json` while the data layer was rebuilt on the official `sessions`
|
|
243
|
+
service; the historical `v0.3.0 —` note below it is kept intentionally).
|
|
244
|
+
- Theme handling collapsed onto one `isTheme()` predicate and `getCfg`, replacing
|
|
245
|
+
three copies of the same skin whitelist (`loadTheme`, `setTheme`,
|
|
246
|
+
`applyThemeNow`).
|
|
247
|
+
- `package.json` version 0.9.0 → 0.9.1.
|
|
248
|
+
|
|
249
|
+
### Verified
|
|
250
|
+
|
|
251
|
+
- `node --check lib/client.js` passes; the file stays UTF-8 **without BOM**
|
|
252
|
+
(BOM is what makes DSH report `Unexpected token '�'`).
|
|
253
|
+
- New `dev-verify-refresh.cjs` (run: `node dev-verify-refresh.cjs lib/client.js`)
|
|
254
|
+
drives the real browser bundle through its `__ModuleLoader__` factory under a
|
|
255
|
+
DOM/localStorage stub: 14/14 checks pass on 0.9.1, while the same probe on the
|
|
256
|
+
pre-0.9.1 build fails exactly on the two refresh defects and the missing seeds
|
|
257
|
+
(7/14) — so the tests demonstrably detect the bugs they fix. It also asserts
|
|
258
|
+
that stored preferences are never overwritten by the seeding.
|
|
259
|
+
- `injectDiscipline` (host prompt section) is unchanged and still `true` in
|
|
260
|
+
`cordis.patch.yml`.
|
|
261
|
+
|
|
262
|
+
### Notes
|
|
263
|
+
|
|
264
|
+
- Client-half changes only (`lib/client.js`); the host half (`lib/index.js`,
|
|
265
|
+
the discipline prompt section and the loopback health routes) is untouched.
|
|
266
|
+
- `syncFromSessions()` gained a `currentSessions` null-guard, because the 2s
|
|
267
|
+
watcher now calls it unconditionally even when the sessions service is absent.
|
|
268
|
+
|
|
269
|
+
|
|
6
270
|
## [0.9.0] - 2026-09-10
|
|
7
271
|
|
|
8
272
|
> Local-only release (not published to npm yet). Adds an optional, ON-by-default
|
package/README.md
CHANGED
|
@@ -30,6 +30,56 @@ It is a pure, read-only companion: the plugin never modifies the official panel,
|
|
|
30
30
|
| Dual-end support | Works in DSH Desktop (Electron window) and the web UI (browser) with the same code, because both render the same page; the UI mounts on `<html>` to dodge `transform`-related `position:fixed` breakage |
|
|
31
31
|
| Privacy-friendly | Zero telemetry, zero data upload. The only host-side surface is a loopback-only health route (`/dsh-todo-float-ball/health`) |
|
|
32
32
|
| **Discipline injection (v0.9.0)** | The host injects 5 hardest todo rules (~340 chars, `order=190`) into the system prompt of **every session** — **works as soon as the plugin is installed, no skill needs to be loaded**; turn it off with `injectDiscipline: false` |
|
|
33
|
+
| **History archive & panel tools (v0.10.0)** | Merged snapshots no longer wipe older todos — they become a foldable history archive; per-row ✕ hide, two independent fold rows, 🧹 batch cleanup, ♻️ one-click restore, 📋 full-text copy; all counters reflect only the latest snapshot |
|
|
34
|
+
| **Pinned-panel parity & layout switch (v0.11.0)** | 📌 pinned sessions render through the *same* history renderer as the current view (folds, 🧹, ♻️, per-session state and per-session action scoping); the panel header gained a ⇄ button to flip between a stacked layout and a side-by-side layout (left = current list, right = pinned sessions) with per-column captions |
|
|
35
|
+
|
|
36
|
+
## Pinned sessions & panel layout (v0.11.0)
|
|
37
|
+
|
|
38
|
+
- **One renderer, two lists** — the current conversation and every pinned (📌)
|
|
39
|
+
conversation are rendered by the same `historySectionHtml()` function: latest
|
|
40
|
+
snapshot flat, then `▾ Completed history (N)` and
|
|
41
|
+
`▸ Abandoned history tasks (M)`, each fold with its own 🧹, plus
|
|
42
|
+
`🧹 Clear all history` and `♻️ Restore all hidden history`. Pinned panels got
|
|
43
|
+
the last two rows for the first time in this release.
|
|
44
|
+
- **Per-session state** — fold open/closed and hidden rows are keyed by session
|
|
45
|
+
id, so expanding or cleaning one conversation never moves another one; every
|
|
46
|
+
control carries the id of the list it was rendered for (`data-ownsid`).
|
|
47
|
+
- **Stable snapshot boundary** — the snapshot/history split is taken on the raw
|
|
48
|
+
list and the hidden-row filter is applied afterwards, so hiding a snapshot row
|
|
49
|
+
can no longer drag an archived row into the live area or shift a fold count.
|
|
50
|
+
- **⇄ layout switch** — stacked (current list above, pinned below) or
|
|
51
|
+
side-by-side (left current, right pinned). The preference is stored in
|
|
52
|
+
`localStorage["dsh-todo-float-ball-layout"]` and restored on load.
|
|
53
|
+
- **Column captions** — in side-by-side mode the left column is captioned with
|
|
54
|
+
the current conversation title and the right one with `📌 固定会话`; in stacked
|
|
55
|
+
mode the captions stay hidden and nothing about the old layout changes.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## History & panel management (v0.10.0)
|
|
59
|
+
|
|
60
|
+
A plan is rewritten many times during a long task. From v0.10.0 the panel keeps
|
|
61
|
+
the **latest snapshot** as the live list and archives everything older instead
|
|
62
|
+
of discarding it:
|
|
63
|
+
|
|
64
|
+
- **Merge, not replace** — a fresh snapshot updates the leading `snapLen` rows
|
|
65
|
+
of the session bucket; previous items that are not part of the new snapshot
|
|
66
|
+
are appended after it, so old tasks never disappear.
|
|
67
|
+
- **Statistics mean "the current plan"** — the ball face (`done/total`), the
|
|
68
|
+
progress ring, the header summary and the "N items left" notice count only
|
|
69
|
+
the latest snapshot (`snapshotList()`); history is a pure archive.
|
|
70
|
+
- **Per-row hide (✕)** — hover a history row and click ✕ to hide it. Hidden
|
|
71
|
+
rows live in `localStorage` (`dsh-todo-float-ball-hidden-v1`, per session);
|
|
72
|
+
the data layer is untouched. Pinned (📌) sessions hide rows independently —
|
|
73
|
+
a hidden row in session A can never hide a row in session B (`data-ownsid`).
|
|
74
|
+
- **Two fold rows** — `▾ Completed history (N)` and `▸ Abandoned history
|
|
75
|
+
tasks (M)` are independent collapsible rows (collapsed by default); the
|
|
76
|
+
latest snapshot always renders fully expanded.
|
|
77
|
+
- **Batch cleanup (🧹)** — each fold row has a 🧹 button to clear that fold,
|
|
78
|
+
plus a `🧹 Clear all history (X)` row that hides both folds at once.
|
|
79
|
+
- **One-click restore (♻️)** — `♻️ Restore all hidden history (X)` appears
|
|
80
|
+
only while something is hidden and unhides everything in the session.
|
|
81
|
+
- **Row copy (📋)** — copies the *full* task text (not the 80-char display
|
|
82
|
+
truncation), with a real ✓/⚠ feedback.
|
|
33
83
|
|
|
34
84
|
## Discipline injection (v0.9.0)
|
|
35
85
|
|
|
@@ -60,7 +110,7 @@ After the restart you should see the ball in the bottom-right corner. Verify the
|
|
|
60
110
|
|
|
61
111
|
```
|
|
62
112
|
http://127.0.0.1:43120/dsh-todo-float-ball/health
|
|
63
|
-
→ {"ok":true,"plugin":"dsh-todo-float-ball","version":"
|
|
113
|
+
→ {"ok":true,"plugin":"dsh-todo-float-ball","version":"<the installed package.json version>"}
|
|
64
114
|
```
|
|
65
115
|
|
|
66
116
|
## How it works
|
package/README.zh.md
CHANGED
|
@@ -30,6 +30,33 @@ DSH 里的 AI 在推进多步骤任务时,会用内置的 `todo_write` 工具
|
|
|
30
30
|
| 双端可用 | DSH Desktop 桌面端(Electron 窗口)与网页端(浏览器)同一份代码通用;UI 挂载在 `<html>` 根节点,规避 `transform` 导致的 `position:fixed` 失效 |
|
|
31
31
|
| 隐私友好 | 零遥测、零数据上传。宿主端只注册一个仅限本机回环访问的健康检查路由(`/dsh-todo-float-ball/health`) |
|
|
32
32
|
| **纪律注入(v0.9.0)** | 宿主端向**每次会话的系统提示**注入 5 条最硬的 todo 纪律(约 340 字,`order=190`)——**装上插件即生效,无需加载任何技能**;可用 `injectDiscipline: false` 关闭 |
|
|
33
|
+
| **历史归档与面板管理(v0.10.0)** | 快照合并不再冲掉旧任务——旧任务进入可折叠的历史归档;行级 ✕ 隐藏、两个独立折叠行、🧹 批量清理、♻️ 一键恢复、📋 整行复制;球面计数只反映最新快照 |
|
|
34
|
+
| **固定会话同款体验 + 面板布局切换(v0.11.0)** | 📌 固定会话与当前对话走**同一个历史渲染器**(两个折叠行、🧹、♻️、按会话独立的开合与操作归属);面板头部新增 ⇄ 按钮,可在【上下堆叠】与【左右并排】之间切换,并带列标题 |
|
|
35
|
+
|
|
36
|
+
## 固定会话与面板布局(v0.11.0)
|
|
37
|
+
|
|
38
|
+
- **一套渲染器,两种清单**——当前对话与每个 📌 固定会话都由同一个
|
|
39
|
+
`historySectionHtml()` 渲染:最新快照平铺,其后是 `▾ 已完成历史(N 条)` 与
|
|
40
|
+
`▸ 被抛弃的历史任务(M 条)`,每个折叠行自带 🧹,另有
|
|
41
|
+
`🧹 一键清理全部历史` 与 `♻️ 一键恢复全部隐藏的历史`。固定会话面板是从本版本起才拿到后两行的。
|
|
42
|
+
- **状态按会话隔离**——折叠开合与隐藏记录都以会话 id 为键,在 A 会话里展开或清理不会影响 B 会话;每个操作行都带着它所属会话的 `data-ownsid`。
|
|
43
|
+
- **快照边界稳定**——快照/历史的切分先按未过滤的原始列表取 `snapLen`,再各自过滤隐藏行,隐藏一条快照行不会再把历史行顶进快照区、也不会改变折叠计数。
|
|
44
|
+
- **⇄ 布局切换**——上下堆叠(当前清单在上、固定会话在下)⇄ 左右并排(左列当前清单、右列固定会话);偏好写入 `localStorage["dsh-todo-float-ball-layout"]`,下次打开自动恢复。
|
|
45
|
+
- **列标题**——左右并排时左列显示当前对话标题(与头部同源同步),右列显示 `📌 固定会话`;上下堆叠时列标题隐藏,视觉与之前完全一致。
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## 历史归档与面板管理(v0.10.0)
|
|
49
|
+
|
|
50
|
+
一个长任务里计划会被反复重写。v0.10.0 起面板把**最新快照**作为当前清单,
|
|
51
|
+
更早的条目不再被丢弃,而是归档进历史:
|
|
52
|
+
|
|
53
|
+
- **合并而非替换**——新快照更新会话桶开头 `snapLen` 行,旧记录里不属于新快照的条目追加在其后,旧任务永不消失。
|
|
54
|
+
- **统计口径 = 当前计划**——球面 `完成数/总数`、进度环、头部汇总、「还有 N 项未完成」提示全部只统计最新快照(`snapshotList()`);历史是纯档案,不进任何计数。
|
|
55
|
+
- **行级隐藏(✕)**——悬停历史行点 ✕ 即隐藏。隐藏记录按会话存在 `localStorage`(`dsh-todo-float-ball-hidden-v1`),数据层零改动。固定会话(📌)的行独立隐藏——会话 A 的隐藏记录绝不会隐藏会话 B 的行(`data-ownsid` 归属过滤)。
|
|
56
|
+
- **两个折叠行**——`▾ 已完成历史(N 条)` 与 `▸ 被抛弃的历史任务(M 条)` 是独立折叠行(默认收起);最新快照始终完整平铺。
|
|
57
|
+
- **批量清理(🧹)**——每个折叠行带 🧹 清本区按钮,另有 `🧹 一键清理全部历史(X 条)` 一行同时清两区。
|
|
58
|
+
- **一键恢复(♻️)**——`♻️ 一键恢复全部隐藏的历史(X 条)` 仅在有隐藏条目时出现,一次恢复本会话全部隐藏行。
|
|
59
|
+
- **整行复制(📋)**——复制**完整**任务文本(非 80 字显示截断),带真实 ✓/⚠ 反馈。
|
|
33
60
|
|
|
34
61
|
## 纪律注入(v0.9.0)
|
|
35
62
|
|
|
@@ -60,7 +87,7 @@ npm install dsh-todo-float-ball
|
|
|
60
87
|
|
|
61
88
|
```
|
|
62
89
|
http://127.0.0.1:43120/dsh-todo-float-ball/health
|
|
63
|
-
→ {"ok":true,"plugin":"dsh-todo-float-ball","version":"
|
|
90
|
+
→ {"ok":true,"plugin":"dsh-todo-float-ball","version":"<已安装 package.json 里的版本号>"}
|
|
64
91
|
```
|
|
65
92
|
|
|
66
93
|
## 实现原理
|