dsh-group-status 0.2.0 → 0.2.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.en.md +25 -12
  3. package/README.md +25 -12
  4. package/lib/client.js +709 -191
  5. package/lib/client.js.map +1 -1
  6. package/lib/tsconfig.tsbuildinfo +1 -1
  7. package/lib/types/client/BadgeSettingsCard.d.ts +24 -0
  8. package/lib/types/client/BadgeSettingsCard.d.ts.map +1 -0
  9. package/lib/types/client/BadgeSettingsCard.js +73 -0
  10. package/lib/types/client/BadgeSettingsCard.js.map +1 -0
  11. package/lib/types/client/WorkspacePicker.d.ts +2 -2
  12. package/lib/types/client/WorkspacePicker.d.ts.map +1 -1
  13. package/lib/types/client/badge-field.d.ts +44 -0
  14. package/lib/types/client/badge-field.d.ts.map +1 -0
  15. package/lib/types/client/badge-field.js +77 -0
  16. package/lib/types/client/badge-field.js.map +1 -0
  17. package/lib/types/client/badge-settings.d.ts +15 -3
  18. package/lib/types/client/badge-settings.d.ts.map +1 -1
  19. package/lib/types/client/badge-settings.js +38 -6
  20. package/lib/types/client/badge-settings.js.map +1 -1
  21. package/lib/types/client/group-status.d.ts +66 -1
  22. package/lib/types/client/group-status.d.ts.map +1 -1
  23. package/lib/types/client/group-status.js +109 -0
  24. package/lib/types/client/group-status.js.map +1 -1
  25. package/lib/types/client/index.d.ts.map +1 -1
  26. package/lib/types/client/index.js +31 -1
  27. package/lib/types/client/index.js.map +1 -1
  28. package/lib/types/client/locales.d.ts +44 -0
  29. package/lib/types/client/locales.d.ts.map +1 -1
  30. package/lib/types/client/locales.js +44 -0
  31. package/lib/types/client/locales.js.map +1 -1
  32. package/lib/types/client/rows/GroupBadge.d.ts +12 -7
  33. package/lib/types/client/rows/GroupBadge.d.ts.map +1 -1
  34. package/lib/types/client/rows/GroupBadge.js +56 -45
  35. package/lib/types/client/rows/GroupBadge.js.map +1 -1
  36. package/lib/types/client/rows/Rows.d.ts +6 -6
  37. package/lib/types/client/rows/Rows.d.ts.map +1 -1
  38. package/lib/types/client/rows/Rows.js +5 -5
  39. package/lib/types/client/rows/Rows.js.map +1 -1
  40. package/lib/types/client/rows/WorkspaceBrowser.d.ts +1 -1
  41. package/lib/types/client/rows/WorkspaceBrowser.d.ts.map +1 -1
  42. package/lib/types/client/rows/WorkspaceBrowser.js +47 -24
  43. package/lib/types/client/rows/WorkspaceBrowser.js.map +1 -1
  44. package/lib/types/client/session-actions/ArchiveSession.d.ts +3 -3
  45. package/lib/types/client/session-actions/ArchiveSession.d.ts.map +1 -1
  46. package/lib/types/client/session-actions/ForkSession.d.ts +1 -1
  47. package/lib/types/client/session-actions/ForkSession.d.ts.map +1 -1
  48. package/lib/types/client/session-actions/PinSession.d.ts +2 -2
  49. package/lib/types/client/session-actions/PinSession.d.ts.map +1 -1
  50. package/lib/types/client/session-actions/RenameSession.d.ts +2 -2
  51. package/lib/types/client/session-actions/RenameSession.d.ts.map +1 -1
  52. package/lib/types/client/session-actions/RowActionToast.d.ts +1 -1
  53. package/lib/types/client/session-actions/RowActionToast.d.ts.map +1 -1
  54. package/lib/types/client/tree.d.ts +5 -5
  55. package/lib/types/client/tree.d.ts.map +1 -1
  56. package/lib/types/client/tree.js +4 -14
  57. package/lib/types/client/tree.js.map +1 -1
  58. package/lib/types/index.d.ts +8 -33
  59. package/lib/types/index.d.ts.map +1 -1
  60. package/lib/types/index.js +13 -1
  61. package/lib/types/index.js.map +1 -1
  62. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@
4
4
 
5
5
  ## 未发布
6
6
 
7
+ - **feat** 多层聚合:父分组折叠时,徽标聚合所有后代分组的会话状态,不再只看直接成员。嵌套的 workspace 目录结构现在能正确反映整棵子树的活动。
8
+ - **fix** 上面这条「多层聚合」交付时是坏的:折叠的父文件夹会**漏算处于展开状态的中间层文件夹**的会话。`directStatusesForGroups` 沿用了「展开即 `EMPTY_LIVE_STATUS`」的占位写法,而聚合器把这个值当输入消费,于是展开的中间层对祖先贡献 0。现在展开的分组同样被测量,「不画徽标」退回渲染层决定。实测:dsh-group-status 展开且 1 个运行中、dsh-gitea-dispatch 1、dsh-later 3 时,dsh-plugins 的折叠徽标由 `4` 修正为 `5`。
9
+ - **fix** 折叠文件夹时完全没有淡出动画。`AnimatedRows` 的 `resetKey` 混入了 `sessionLimits`,而上游在折叠时会把该组的 limit 重置回默认值 → `resetKey` 变化 → 动画被整个跳过。属上游行为(vendor 基线 `d70ad82`),非本仓库引入。副作用:「展开其余 N 个会话」现在也会淡入而非瞬时呈现。
10
+ - **test** 徽标管线的测试此前是**自欺**的:`groupOf()` 在测试里手工赋值 `group.liveStatus`,而那份手工副本编码的正是上面第一个错误语义——所以少算 bug 能一路绿灯合入。改为走真实管线 `deriveGroups → directStatusesForGroups → aggregateGroupStatuses`,并给聚合路径补上全折叠 / 全展开两侧的 perf 护栏。变异验证:把 bug 塞回去,红 6 个测试(此前 0 个)。
11
+ - **refactor** 未经聚合的行现在在类型上不可表示:`StatusedGroupNode`(`liveStatus` 必填)+ `withAggregatedStatus` 生产者。上游的 `GroupNode.liveStatus?` 与 vendored 文件的签名均未改动。
12
+ - **refactor** 删掉 `tree.ts` 里无人使用的 re-export(两个值只有测试在用,4 个跨插件 summary 类型零消费方)。`tree.ts` 相对上游基线的新增分歧 31 → 18 行。
13
+ - **docs** 修正 README 的徽标数字公式:漏了「运行中的子智能体」一项,且「有徽标就带数字」与 `countThreshold` 默认值 2 自相矛盾。
14
+ - **perf** 代价说明:为正确性放弃了「展开的分组跳过聚合计算」这一优化,展开分组现在也会被测量(折叠祖先需要它的数字)。该成本由新增的 perf 用例守住。
15
+ - **feat** 设置项从 1 个扩展到 7 个:5 个按状态显隐(进行中 / 待审批 / 已完成 / 定时任务 / 等待评审)+ 悬停明细开关 + 数字显示阈值。设置卡片分 3 个 section,每个开关独立控制对应来源的点/图标是否出现在折叠徽标、悬停明细与计数中。
16
+ - **feat** 数字显示阈值(`countThreshold`):取代原来的布尔开关 `alwaysShowCount`。现在可以设置一个数字阈值,只有当聚合数量 >= 该阈值时才在徽标上显示数字。默认 2(即 count=1 时省略,因为状态点已表达"有东西");设为 1 则始终显示;设为 3 则 count=1 和 count=2 时都不显示。
17
+ - **fix** 设置项 `showCompletedInBadge` 在 GUI 里根本没有入口:宿主只把 `Config` 投影成客户端表单,插件页要插件自己往 `plugins.bundle.config` 注册卡片才画得出来。现在侧栏 **插件** → dsh-group-status 的 bundle 详情页有这张卡片,保存后写进 profile patch 并即时生效。外观与交互不自造——用官方 `SettingsForm` / `SettingsFormModel` / `Switch`,与「插件 → 官方 → 子智能体」同一套框架与取值。README 此前描述的路径是文档超前于实现,文案与升级手册已同步。
18
+ - **test** 新增字段规格(真实现)与卡片接线(官方组件契约等价桩)用例。
19
+
7
20
  ## 0.2.0-rc.2-fork1
8
21
 
9
22
  - **feat** 折叠分组聚合徽标:收起的文件夹行显示进行中(转圈)、待审批(黄点)、已完成(绿点)的聚合状态,带数字与悬停明细。
package/README.en.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  [中文](./README.md) | **English**
8
8
 
9
- [![version](https://img.shields.io/badge/version-0.2.0--rc.2--fork1-0EA5E9)](https://github.com/WuJiaoJue/dsh-group-status)
9
+ [![version](https://img.shields.io/badge/version-0.2.0-0EA5E9)](https://github.com/dsh-plugin-collection/dsh-group-status)
10
10
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
11
11
  [![DSH](https://img.shields.io/badge/DeepSeek%20Harness-0.2.0--rc.2-4D6BFE)](https://github.com/deepseek-ai/deepseek-harness)
12
12
 
@@ -49,31 +49,37 @@ Fold any group that has live sessions; a badge appears after the folder name:
49
49
  Rules:
50
50
 
51
51
  - **Completed reaches the badge**: `done` (completed-unread) now shows a green dot while folded, reusing the same `StateDot` state as the session row; a group with nothing but completed sessions shows a badge just like any other.
52
- - **The count** = approvals + running + completed + sessions with scheduled tasks + sessions waiting for review. Whenever a badge renders it carries the count, including a single-session `1`.
52
+ - **The count** = approvals + running (**including running subagents**) + completed + sessions with scheduled tasks + sessions waiting for review. Whether the number renders at all is gated by `countThreshold` (default 2 — a lone item shows dots only).
53
53
  - **Hover details**: the folder row's hover card appends lines in the order `approval · plan review · answer · running · subagents · waiting review · scheduled tasks · completed`, e.g. `1 Waiting for answer · 1 Running`.
54
54
  - **Expanding defers to the rows**: the aggregate badge only renders while collapsed; expanded groups keep their per-row statuses with no duplication.
55
55
  - **Accessible**: the badge is `role="img"` with a localized `aria-label` (e.g. `1 Waiting for answer · 1 Running`) and the same text as its `title`.
56
56
 
57
57
  ### Settings
58
58
 
59
- Settings → Plugins → **dsh-group-status** (the config form on the plugin's page):
59
+ **Plugins** in the sidebar → **dsh-group-status** (the config form on the bundle's page, between its description and the component rows):
60
60
 
61
61
  | Field | Default | Meaning |
62
62
  |---|---|---|
63
+ | `showRunningInBadge` | `true` | Whether the folded badge shows the "running" spinning dot |
64
+ | `showPendingInBadge` | `true` | Whether the folded badge shows the "pending" yellow dot (approval / plan review / waiting for answer) |
63
65
  | `showCompletedInBadge` | `true` | Whether the folded badge shows a green "completed" dot |
66
+ | `showScheduledInBadge` | `true` | Whether the folded badge shows the "scheduled" clock icon (data from dsh-later) |
67
+ | `showWaitingReviewInBadge` | `true` | Whether the folded badge shows the "waiting for review" list-pen icon (data from dsh-gitea-dispatch) |
68
+ | `showHoverDetails` | `true` | Whether the hover card shows the aggregated status detail lines |
69
+ | `countThreshold` | `2` | The count is shown on the badge only when the total is >= this value (default 2, i.e. omits the count when it equals 1 — the dots already convey "something is happening"; set to 1 to always show) |
64
70
 
65
- Switching it off takes `done` out of the folded row's aggregate entirely — no green dot, no contribution to the badge count, and it no longer keeps the badge alive, so a group with nothing but completed sessions shows no badge again. **The green dot on a session row itself is unaffected**: that is row-level state, not a folder hint.
71
+ Switching a source off takes it out of the folded row's aggregate entirely — no dot/icon, no contribution to the badge count, no hover detail line, and it no longer keeps the badge alive. **The state dot on a session row itself is unaffected**: that is row-level state, not a folder hint. With `showHoverDetails` off, the hover card shows only the title, path, and creation time.
66
72
 
67
- Changes apply live, with no refresh. When the settings face cannot be read (e.g. the Host serves no settings service), it falls back to the default "show", matching the schema default — failing to read a config is not the user turning it off.
73
+ Saving applies it live, with no refresh; the Host writes it into the profile patch's `dsh-group-status` entry `config`, so it survives a page reload. When the settings face cannot be read (e.g. the Host serves no settings service), it falls back to the default "show", matching the schema default — failing to read a config is not the user turning it off.
68
74
 
69
75
  ---
70
76
 
71
77
  ## Feature overview
72
78
 
73
- - **Visible when folded**: the aggregate only exists while collapsed; an expanded sidebar is pixel-identical to stock.
79
+ - **Visible when folded**: the aggregate only exists while collapsed; an expanded sidebar is pixel-identical to stock. Nested groups are supported too — when a parent group is folded, its badge aggregates sessions from all descendant groups.
74
80
  - **Same source of truth as rows**: priority, colors and wording all reuse the row derivation and `StateDot`; blank and archived sessions are skipped.
75
81
  - **Cross-plugin aggregation** (optional): scheduled tasks from dsh-later, waiting PR reviews from dsh-gitea-dispatch — works fine with neither installed.
76
- - **Usable with zero config**: sensible defaults out of the box; the one setting, `showCompletedInBadge`, can drop the green "completed" dot from the folded badge.
82
+ - **Usable with zero config**: sensible defaults out of the box; 7 settings let you fine-tune which sources appear in the folded badge, hover details, and count display.
77
83
  - **No stock files touched**: not a single file of the published `dsh-client-ui-workspace` is modified; all changes live in this repo's source, and the profile patch is two lines (add this package, disable the stock row).
78
84
  - **Localized**: follows the DSH UI language (中文 / English) by reusing the stock locale keys; only `status.waitingReview` and `status.scheduled` are new.
79
85
 
@@ -87,7 +93,7 @@ When sessions inside a group have scheduled tasks or wait on a PR review, the ba
87
93
 
88
94
  | Publisher | Provides | Consumer entry point |
89
95
  |---|---|---|
90
- | [dsh-later](https://github.com/WuJiaoJue/dsh-later) | `useScheduleSummary()`: session id → `{ count, pausedCount, nextAt, state }` | `require('dsh-later/client')` |
96
+ | [dsh-later](https://github.com/dsh-plugin-collection/dsh-later) | `useScheduleSummary()`: session id → `{ count, pausedCount, nextAt, state }` | `require('dsh-later/client')` |
91
97
  | dsh-gitea-dispatch | `useWaitingSummary()`: session id → `{ prNumber, state }` | `require('dsh-gitea-dispatch/client')` |
92
98
 
93
99
  - When either plugin is **absent or disabled, the integration degrades silently**: no icon, everything else keeps working, no errors and no idle polling.
@@ -107,17 +113,24 @@ The working shape is: copy the template into the provider → the provider calls
107
113
 
108
114
  ### Install into DSH
109
115
 
110
- This package is a **fork override**: it registers the same slots as the stock `dsh-client-ui-workspace` and disables the stock row (patch in `cordis.patch.yml`). Build artifacts are committed, so installing from GitHub needs no local build:
116
+ **npm install (recommended, pre-built, no auth required):**
111
117
 
112
118
  ```bash
113
- dsh plugin --profile web add "github:WuJiaoJue/dsh-group-status"
119
+ dsh plugin --profile web add dsh-group-status
114
120
  # Takes effect after restarting dsh web (the whole sidebar package is swapped)
115
121
  ```
116
122
 
123
+ Or install from GitHub:
124
+
125
+ ```bash
126
+ dsh plugin --profile web add "github:dsh-plugin-collection/dsh-group-status"
127
+ # restart dsh web
128
+ ```
129
+
117
130
  For local development, link a checkout and rebuild as you edit `src/`:
118
131
 
119
132
  ```bash
120
- git clone https://github.com/WuJiaoJue/dsh-group-status.git
133
+ git clone https://github.com/dsh-plugin-collection/dsh-group-status.git
121
134
  cd dsh-group-status
122
135
  pnpm install && pnpm build
123
136
 
@@ -176,7 +189,7 @@ Seven further upstream specs only run inside the DSH monorepo: they either need
176
189
  ## Known limitations
177
190
 
178
191
  - **Upstream bumps need a manual rebase**: the upstream source is vendored (`src/`, `tests/`) and this is not a stable public API; slot names, component signatures and context contracts may shift under it. Steps are in the [upgrade runbook](./docs/upgrading.md).
179
- - **One extra full traversal while collapsed**: aggregation shares the expanded derivation, so huge groups (hundreds of sessions) cost one extra traverse per status change — same order as expanded rendering, acceptable.
192
+ - **One extra full measurement pass per status change**: aggregation shares the expanded derivation, and to make collapsed parents count correctly **expanded groups get measured too** — they draw no badge themselves, but a collapsed ancestor needs their numbers. Huge groups (hundreds of sessions) cost one extra traverse plus a fold up the tree per status change — same order as expanded rendering, acceptable. A perf spec guards this cost.
180
193
  - **It produces no status itself**: the cross-plugin icons depend entirely on the summary APIs published by dsh-later / dsh-gitea-dispatch. Without them you simply lose those two icons.
181
194
  - **The count is coarser than the details**: scheduled tasks are counted per *session*, not per task; the exact task count lives in dsh-later's own UI.
182
195
  - **Collapsed sidebar only**: this plugin only adds an aggregate display — it does not touch the session state machine or the per-row badge predicates.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  **中文** | [English](./README.en.md)
8
8
 
9
- [![version](https://img.shields.io/badge/version-0.2.0--rc.2--fork1-0EA5E9)](https://github.com/WuJiaoJue/dsh-group-status)
9
+ [![version](https://img.shields.io/badge/version-0.2.0-0EA5E9)](https://github.com/dsh-plugin-collection/dsh-group-status)
10
10
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
11
11
  [![DSH](https://img.shields.io/badge/DeepSeek%20Harness-0.2.0--rc.2-4D6BFE)](https://github.com/deepseek-ai/deepseek-harness)
12
12
 
@@ -49,31 +49,37 @@
49
49
  规则:
50
50
 
51
51
  - **已完成进徽标**:`done`(已完成未读)折叠时也显示绿点,和会话行的绿点同一个 `StateDot` 状态;一组只剩已完成时徽标照常出现。
52
- - **数字** = 待审批 + 进行中 + 已完成 + 有定时任务的会话 + 等待评审的会话;有徽标就带数字,只有一个会话时也会显示 `1`。
52
+ - **数字** = 待审批 + 进行中(**含运行中的子智能体**)+ 已完成 + 有定时任务的会话 + 等待评审的会话;数字是否出现受 `countThreshold` 控制(默认 2,即只剩 1 项时只画点、不显数字)。
53
53
  - **悬停明细**:文件夹行 hover 卡在路径、创建时间下面,按 `等待审批 · 计划待审 · 等待回答 · 进行中 · 子智能体 · 等待评审 · 定时任务 · 已完成` 的顺序追加明细行,例如 `1 等待回答 · 1 进行中`。
54
54
  - **展开即让位**:聚合徽标只在折叠时出现;展开后子行自带状态,不重复显示。
55
55
  - **无障碍**:徽标是 `role="img"` + 本地化 `aria-label`(如 `1 等待回答 · 1 进行中`),悬停 `title` 同文案,读屏与鼠标都读得到。
56
56
 
57
57
  ### 设置项
58
58
 
59
- 设置 → 插件 → **dsh-group-status**(插件详情页的配置表单):
59
+ 侧栏 **插件** → **dsh-group-status**(bundle 详情页的配置表单,在描述与「包含的组件」之间):
60
60
 
61
61
  | 字段 | 默认 | 说明 |
62
62
  |---|---|---|
63
+ | `showRunningInBadge` | `true` | 折叠徽标是否显示「进行中」转圈 |
64
+ | `showPendingInBadge` | `true` | 折叠徽标是否显示「待审批 / 待评审 / 待回答」黄点 |
63
65
  | `showCompletedInBadge` | `true` | 折叠徽标是否显示「已完成」绿点 |
66
+ | `showScheduledInBadge` | `true` | 折叠徽标是否显示「定时任务」时钟图标(数据来自 dsh-later) |
67
+ | `showWaitingReviewInBadge` | `true` | 折叠徽标是否显示「等待评审」列表笔图标(数据来自 dsh-gitea-dispatch) |
68
+ | `showHoverDetails` | `true` | 悬停卡是否显示聚合状态明细行 |
69
+ | `countThreshold` | `2` | 徽标数字显示阈值:数量 >= 此值时才显示数字(默认 2,即 count=1 时省略——点已表达"有东西在发生";设为 1 则始终显示) |
64
70
 
65
- 关闭后,`done` 完全退出折叠行的聚合提示——不画绿点、不计入徽标数字、不参与「是否显示徽标」的判断,等于回到「一组只剩已完成时不出现徽标」。**会话行自身的绿点不受影响**:那是行级状态,不是分组提示。
71
+ 按状态关掉后,对应的来源完全退出折叠行的聚合提示——不画点/图标、不计入徽标数字、不进悬停明细、不参与「是否显示徽标」的判断。**会话行自身的状态点不受影响**:那是行级状态,不是分组提示。`showHoverDetails` 关闭后,悬停卡只显示标题、路径与创建时间。
66
72
 
67
- 改动即时生效,无需刷新。设置面读不到时(例如宿主未提供设置服务)回落为默认「显示」,与 schema 默认值同源——读不到配置不等于用户关掉了。
73
+ 点「保存」后即时生效,无需刷新;设置由宿主写进 profile patch 的 `dsh-group-status` 条目 `config`,刷新页面后仍在。设置面读不到时(例如宿主未提供设置服务)回落为默认「显示」,与 schema 默认值同源——读不到配置不等于用户关掉了。
68
74
 
69
75
  ---
70
76
 
71
77
  ## 特性一览
72
78
 
73
- - **收起可见**:聚合状态只在分组折叠时出现,展开后的侧栏与官方版本逐像素一致。
79
+ - **收起可见**:聚合状态只在分组折叠时出现,展开后的侧栏与官方版本逐像素一致。嵌套分组也支持——父分组折叠时,徽标聚合所有后代分组的会话状态。
74
80
  - **与行内同源**:优先级、颜色、文案全部复用行内状态的派生逻辑与 `StateDot`,跳过空白会话与已归档会话。
75
81
  - **跨插件聚合**(可选):dsh-later 的定时任务、dsh-gitea-dispatch 的等待评审,两个都没装也照常工作——见下。
76
- - **零配置可用**:默认开箱即用;唯一的设置项 `showCompletedInBadge` 可关掉折叠徽标上的「已完成」绿点。
82
+ - **零配置可用**:默认开箱即用;7 个设置项可精细控制折叠徽标的来源显隐、悬停明细与数字样式。
77
83
  - **本体零改动**:官方 `dsh-client-ui-workspace` 包文件一个不动;改动全在本仓库源码里,profile 补丁只有两条(装本包、禁用官方行)。
78
84
  - **多语言**:跟随 DSH 界面语言(中文 / English),复用官方文案键,只新增了 `status.waitingReview` 与 `status.scheduled`。
79
85
 
@@ -87,7 +93,7 @@
87
93
 
88
94
  | 数据源 | 提供 | 消费方接入 |
89
95
  |---|---|---|
90
- | [dsh-later](https://github.com/WuJiaoJue/dsh-later) | `useScheduleSummary()`:会话 id → `{ count, pausedCount, nextAt, state }` | `require('dsh-later/client')` |
96
+ | [dsh-later](https://github.com/dsh-plugin-collection/dsh-later) | `useScheduleSummary()`:会话 id → `{ count, pausedCount, nextAt, state }` | `require('dsh-later/client')` |
91
97
  | dsh-gitea-dispatch | `useWaitingSummary()`:会话 id → `{ prNumber, state }` | `require('dsh-gitea-dispatch/client')` |
92
98
 
93
99
  - 两个插件**未安装 / 未启用时静默降级**:图标不出现,其余徽标照常,不会报错也不会空转。
@@ -107,17 +113,24 @@
107
113
 
108
114
  ### 安装到 DSH
109
115
 
110
- 本包是一个 **fork 覆盖包**:注册与官方 `dsh-client-ui-workspace` 相同的槽位,并把官方那一行 disable(补丁见 `cordis.patch.yml`)。构建产物随仓库提交,从 GitHub 直接装即可,不需要本地构建:
116
+ **npm 安装(推荐,预构建产物,无需授权):**
111
117
 
112
118
  ```bash
113
- dsh plugin --profile web add "github:WuJiaoJue/dsh-group-status"
119
+ dsh plugin --profile web add dsh-group-status
114
120
  # 重启 dsh web 后生效(侧栏是整包替换,需重新生成浏览器模块)
115
121
  ```
116
122
 
123
+ 或者从 GitHub 安装:
124
+
125
+ ```bash
126
+ dsh plugin --profile web add "github:dsh-plugin-collection/dsh-group-status"
127
+ # 重启 dsh web 后生效
128
+ ```
129
+
117
130
  本机开发时用 link,改完 `src/` 重建即可生效:
118
131
 
119
132
  ```bash
120
- git clone https://github.com/WuJiaoJue/dsh-group-status.git
133
+ git clone https://github.com/dsh-plugin-collection/dsh-group-status.git
121
134
  cd dsh-group-status
122
135
  pnpm install && pnpm build
123
136
 
@@ -176,7 +189,7 @@ pnpm test:spec # 只跑上游 spec 套件
176
189
  ## 已知限制
177
190
 
178
191
  - **上游换代必须手工 rebase**:本包 vendored 了上游源码(`src/`、`tests/`),用的不是稳定公共 API;上游动槽位名、组件签名或上下文契约时要跟着改,步骤见[升级手册](./docs/upgrading.md)。
179
- - **折叠时多一次全量遍历**:聚合计数与展开态共用同一份派生,超大分组(数百会话)每次状态变更多一次 traverse,与展开渲染同量级,可接受。
192
+ - **每次状态变更多一轮全量测量**:聚合计数与展开态共用同一份派生;为了让折叠的父级算得准,**展开的分组同样要被测量**(它自己不画徽标,但祖先要用它的数字)。超大分组(数百会话)每次状态变更多一轮 traverse + 一次沿树上卷,与展开渲染同量级,可接受;该成本由 `tests/group-status.client.spec.ts` 的 perf 用例守住。
180
193
  - **状态不自己产生**:跨插件图标完全依赖 dsh-later / dsh-gitea-dispatch 暴露的摘要 API,它们不装就只是没有那两个图标,不影响本体。
181
194
  - **数字比明细粗**:定时任务按「组内有定时任务的会话数」计,不按任务条数累计;具体条数在 dsh-later 自己的界面上看。
182
195
  - **只覆盖侧栏折叠态**:本插件只加聚合显示,不改会话状态机、不改行内 badge 的判据。