@skillre/dsh-plugin-work-dashboard 0.6.0 → 0.9.0
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/README.en.md +12 -6
- package/README.md +32 -8
- package/compatibility.json +44 -4
- package/docs/PLAN-0.7-0.9.md +230 -0
- package/lib/blockers.d.ts +45 -0
- package/lib/blockers.js +160 -0
- package/lib/client/api.d.ts +8 -1
- package/lib/client/api.js +1 -0
- package/lib/client/css/base.d.ts +1 -1
- package/lib/client/css/base.js +39 -0
- package/lib/client/css/blockers.d.ts +18 -0
- package/lib/client/css/blockers.js +196 -0
- package/lib/client/css/detail.d.ts +1 -1
- package/lib/client/css/detail.js +24 -0
- package/lib/client/css/overview.d.ts +5 -4
- package/lib/client/css/overview.js +23 -34
- package/lib/client/css/summary.d.ts +13 -0
- package/lib/client/css/summary.js +187 -0
- package/lib/client/format.d.ts +57 -0
- package/lib/client/format.js +96 -0
- package/lib/client/styles.js +3 -1
- package/lib/client/text.js +216 -38
- package/lib/client/view-contract.d.ts +9 -1
- package/lib/client.js +2104 -894
- package/lib/form.d.ts +218 -0
- package/lib/form.js +1075 -0
- package/lib/index.js +29 -0
- package/lib/store.js +13 -2
- package/lib/transport.d.ts +7 -1
- package/lib/transport.js +10 -0
- package/lib/types.d.ts +89 -0
- package/lib/types.js +16 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -13,11 +13,15 @@ The plugin used to be called "POC console" and served one ledger. It became a *c
|
|
|
13
13
|
```
|
|
14
14
|
Work Dashboard (plugin)
|
|
15
15
|
└── POC Operations (module 1, the only implemented one)
|
|
16
|
-
├──
|
|
16
|
+
├── KPI strip total / in progress / budget / blocked / G0 passed + stage chips
|
|
17
|
+
├── Portfolio band stage funnel (with in-stage completion) / system-company / type mix / amount concentration / dimension coverage / gap rules
|
|
18
|
+
├── Budget panel G0 passed / awaiting review / no amount, plus the system split and concentration
|
|
17
19
|
├── Projects the same list, read three ways: cards · board · table
|
|
18
|
-
├──
|
|
20
|
+
├── Blockers five sources merged and grouped by project: gap rules / stalled / no amount / no progress / no stage date
|
|
21
|
+
├── Project detail stage-aware skeleton: basic info / worklist, then the blocks the current gate needs
|
|
19
22
|
├── Risk board severity swimlanes + a distribution figure
|
|
20
|
-
|
|
23
|
+
├── Global timeline grouped by month + a monthly distribution + the silent projects
|
|
24
|
+
└── Export form a self-contained v3 collection form whose YAML can be committed as-is
|
|
21
25
|
```
|
|
22
26
|
|
|
23
27
|
## Three bundled skills
|
|
@@ -109,9 +113,11 @@ Grouped by **rule** rather than flattened: twelve rules across twenty-three proj
|
|
|
109
113
|
- **Risk board**: severity swimlanes (high → medium → low → unrated) with a distribution figure above them; both come from one bucketing pass, so the figure and the list cannot disagree.
|
|
110
114
|
- **Global timeline**: grouped by month, with a month divider and a monthly distribution per group, newest first inside each group; rounds with no evidence or no customer feedback are marked explicitly.
|
|
111
115
|
|
|
112
|
-
###
|
|
116
|
+
### Collection form
|
|
113
117
|
|
|
114
|
-
The
|
|
118
|
+
The **Export form** button in the header generates a self-contained HTML file for the projects the current filters show: double-click to fill in, drafts autosave locally, the gap rules' counts (2–3 criteria, 3–5 scenarios, at most 3 risks) are checked live, and it downloads real YAML — one file per project. Selecting nothing produces a blank new-project form.
|
|
119
|
+
|
|
120
|
+
The generated YAML is the v3 shape and reads back through this plugin's own parser; the form only asks for v3 fields (the five G0 prerequisites, the plan, and one appended progress entry), unlike the v1 generator it replaces.
|
|
115
121
|
|
|
116
122
|
## The twelve gap rules
|
|
117
123
|
|
|
@@ -220,7 +226,7 @@ See [UNINSTALL.md](UNINSTALL.md). All data lives in the GitHub repository, so un
|
|
|
220
226
|
|
|
221
227
|
| DSH version | Result | Verified | Notes |
|
|
222
228
|
|---|---|---|---|
|
|
223
|
-
| 0.2.2-rc.2 | passed | 2026-11-13 | packed install + bounded startup + real clone + 31 isolated checks (incl. the three skills really reaching the skill catalog) (see `compatibility.json`) |
|
|
229
|
+
| 0.2.2-rc.2 | passed | 2026-11-13 | packed install + bounded startup + real clone + 31 isolated checks (incl. the three skills really reaching the skill catalog) + 15 live market npm-install checks (see `compatibility.json`) |
|
|
224
230
|
| 0.2.2-rc.1 | passed | 2026-11-06 | same behaviour + 69 browser assertions; 0.6.0 does not touch the client bundle, so that record still holds |
|
|
225
231
|
|
|
226
232
|
Machine-readable evidence is in `compatibility.json`; screenshots and reports are in `docs/evidence/`. **Desktop Client (Electron) was not verified**: its profile is managed by the app and this CLI harness cannot drive it, so a Desktop-specific visual check is still outstanding before Desktop delivery.
|
package/README.md
CHANGED
|
@@ -15,11 +15,15 @@
|
|
|
15
15
|
```
|
|
16
16
|
工作看板(插件)
|
|
17
17
|
└── POC 运营(模块 1,唯一已实现)
|
|
18
|
-
├──
|
|
18
|
+
├── KPI 顶条 总数 / 进行中 / 预算合计 / 有阻障 / G0 已通过 + 阶段 chip
|
|
19
|
+
├── 组合面板 阶段漏斗(含阶段内完成度)/ 体系公司 / 类型构成 / 金额集中度 / 四维覆盖 / 缺口规则
|
|
20
|
+
├── 预算面板 G0 已通过 / 待评审 / 未填金额 三桶 + 体系分布 + 集中度
|
|
19
21
|
├── 项目总览 同一批项目的三种读法:卡片 · 看板 · 表格
|
|
20
|
-
├──
|
|
22
|
+
├── 阻障栏 五类来源合并、按项目分组:缺口规则 / 阶段停滞 / 未填金额 / 无进展 / 缺阶段起始日
|
|
23
|
+
├── 项目详情 阶段感知骨架:基本信息 / 待补清单 + 按 Gate 重排的区块(其余折叠,字段不丢)
|
|
21
24
|
├── 风险看板 按等级分泳道 + 严重度分布条
|
|
22
|
-
|
|
25
|
+
├── 全局时间线 按月份分组 + 月度分布条 + 无进展项目清单
|
|
26
|
+
└── 导出表单 按 v3 字段生成自包含 HTML 收集表单,导出的 YAML 可直接提交
|
|
23
27
|
```
|
|
24
28
|
|
|
25
29
|
## 随包安装的三个技能
|
|
@@ -93,23 +97,43 @@ POC 台账最容易烂在「感觉做成了」上:项目说结果达成,但
|
|
|
93
97
|
### 四维与阶段
|
|
94
98
|
|
|
95
99
|
- **四维状态**:目标达成、证据、客户认可、下一步**永远四格分开**,每格独立显示有/无。
|
|
96
|
-
- **阶段轨道**:G0→G4
|
|
97
|
-
-
|
|
100
|
+
- **阶段轨道**:G0→G4 横向轨道;表格里是五点紧凑版,详情页是完整版。完成状态由 v3 各阶段自己的字段推出(G0 取 `gate0.complete`、G1 取 `plan.gate1.conclusion`、G2 取 `plan.gate2.ready`、G3 取最新进展的 `gate3_2`、G4 取 `outcome.achievement`)——v3 已没有 `gates.G0..G4.complete` 数组,按当前阶段位置推断会把从没签核过的阶段报成已完成。
|
|
101
|
+
- **详情页**分两栏:左栏是常驻的项目档案(客户公司/体系、金额、竖向阶段轨道、四维、缺口、人员、上下条导航),右栏是**阶段感知**的滚动阅读区——骨架按当前 Gate 重排,其余区块收进「其他区块」折叠,字段一个不少:
|
|
102
|
+
- **阶段上下文**:顶部声明当前 Gate 的读法与下一道门,并诚实标出本阶段是否已记录完成。
|
|
103
|
+
- **待补清单**:直接点名缺哪个字段(如 `decision_chain`、`amount_wan`),空态变成可执行的编辑指引。
|
|
104
|
+
- **基本信息**:客户名、体系、客户技术人、业务决策人、决策链、测后决策——缺失时明说,不留空。
|
|
98
105
|
- **进展流**(核心):每次进展是一张卡片,带认可度色调的节点、目标→实际、范围 chips、可点开的证据、客户同步与认可、G3-1/G3-2、由百分比解析出的完成度条、以及「下一步」区块(没有下一步时明确说出来)。
|
|
99
106
|
- **四维结果**:四张独立卡片,各带「自动推导 / 人工填」标签。
|
|
100
107
|
- **G0 计量**:五格完整度计量条,其中 `tech_owner` 取自身份区;两条叙述字段以原文散文块呈现。
|
|
101
108
|
- **计划**:指标表格、编号场景列表、带严重度点的风险列表。
|
|
102
109
|
- **结论**:三段散文 + 里程碑提示框(没有下一步里程碑时按缺口 R11 渲染成红色发现,而不是空字段)。
|
|
103
110
|
|
|
111
|
+
各阶段的骨架顺序:
|
|
112
|
+
|
|
113
|
+
| 阶段 | 先看什么 |
|
|
114
|
+
|---|---|
|
|
115
|
+
| G0 | 基本信息 → G0 工作台 → 计划 |
|
|
116
|
+
| G1 / G2 | 基本信息 → 计划 → 进展流 |
|
|
117
|
+
| G3 | 进展流 → 四维 → 基本信息 |
|
|
118
|
+
| G4 | 四维 → 结论 → 基本信息 |
|
|
119
|
+
| closed | 结论 → 四维 → 基本信息 |
|
|
120
|
+
| 未识别 | 历史全量顺序(不猜) |
|
|
121
|
+
|
|
104
122
|
### 增强视图
|
|
105
123
|
|
|
124
|
+
- **阻障栏**:把五类来源合成一个按项目分组的列表——12 条缺口规则、阶段停滞、未填金额、无进展记录、缺阶段起始日。R12 已经报出的停滞不会被第二个来源重复计数。每个来源一个可点 chip,计数随当前筛选变化。
|
|
106
125
|
- **风险看板**:按严重度分成泳道(高 → 中 → 低 → 未评级),上方一条严重度分布条,两者来自同一次分桶,所以图和列表不会互相矛盾。
|
|
107
126
|
- **未评级排在最后**:不是「不严重」,而是还没判断;排在最前会埋掉真正被评估为严重的风险。
|
|
108
127
|
- **全局时间线**:按月份分组,每组一个月份分隔条与月度分布,组内按日期从新到旧;无证据 / 无客户反馈的轮次显式标出。
|
|
109
128
|
|
|
110
|
-
###
|
|
129
|
+
### 导出收集表单
|
|
130
|
+
|
|
131
|
+
页头「导出表单」按当前筛选可见的项目生成一个**自包含 HTML**:双击即可填写,自动保存到本机,
|
|
132
|
+
实时校验缺口规则要求(指标 2–3 条、场景 3–5 个、风险 ≤3),填完下载真实 YAML,
|
|
133
|
+
一个项目一个文件。不选任何项目则生成空白新建表单。
|
|
111
134
|
|
|
112
|
-
|
|
135
|
+
生成的 YAML 是 v3 结构,能被本插件原样读回;表单只收集 v3 真实字段(G0 五必填 / 计划 / 进展追加),
|
|
136
|
+
不会像 v1 表单那样问已经删掉的字段。
|
|
113
137
|
|
|
114
138
|
原设计(P1 重写目标):
|
|
115
139
|
|
|
@@ -314,7 +338,7 @@ node scripts/verify-market-install.mjs # 线上索引 → 真实安装 → 动
|
|
|
314
338
|
|
|
315
339
|
| DSH 版本 | 结果 | 验证日期 | 说明 |
|
|
316
340
|
|---|---|---|---|
|
|
317
|
-
| 0.2.2-rc.2 | 通过 | 2026-11-13 | 打包安装 + 有界启动 + 真实 clone + 31
|
|
341
|
+
| 0.2.2-rc.2 | 通过 | 2026-11-13 | 打包安装 + 有界启动 + 真实 clone + 31 项隔离集成(含三个技能确实进入技能目录)+ 15 项线上市场 npm 安装(见 `compatibility.json`) |
|
|
318
342
|
| 0.2.2-rc.1 | 通过 | 2026-11-06 | 同上行为 + 69 项浏览器断言;0.6.0 未改动客户端产物,该记录仍然有效 |
|
|
319
343
|
|
|
320
344
|
机器可读证据在 `compatibility.json`,截图与报告在 `docs/evidence/`。**未验证 Desktop Client(Electron)**:它的 profile 由应用管理,本 CLI 测试台无法驱动,Desktop 发布前需在那里重做一次视觉检查。
|
package/compatibility.json
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"notes": "Packed tarball 0.1.0 installed into an owned, disposable, non-Desktop web profile (DSH 0.2.2-rc.1). This release migrates the plugin to the v3 POC data model. The parser reads identity + gate0 + plan + progress[] + outcome; the four dimensions come from `outcome`; the progress stream is a new core view; the gap rule set grew from 8 to 12 (R1-R12); and the stat strip is now POC总数 / G0通过 / 进行中 / 金额合计. The v3 numbers were verified against the real ledger data first: 23 projects, 6050万 total, 1 G0 passed, 0 G0 complete, R1 on all 23, R2 on 7 — matching the update note's acceptance list exactly. dsh --profile <test> --dump-config composed the row; a bounded real startup served the Web app; the authenticated transport exercised the exact /api/skillre-work-dashboard/execute route (cold cache empty, manual refresh cloned the ledger, board computed v3 summaries and gaps, detail returned the progress stream, a second refresh used fetch + reset --hard, unknown project and unauthenticated request failed cleanly), and cleanup removed the owned profile with verified absence. The real DSH Web UI was then driven in headless Chromium: 43/43 assertions passed, including the seven-column v3 table, the amount column, the latest-progress column, the progress-stream section, four separate dimension cards, the twelve-rule pending list, and a new guard that no raw template placeholder reaches the DOM. Two real defects were caught during that verification and fixed: gap TITLES were rendered through t() instead of format() so parameterised titles leaked literal {amountWan}; and the detail identity line still carried the removed v1 {tier} key. The export form is deliberately hidden in this release: it still models v1 fields, and shipping it would hand colleagues YAML the v3 ledger cannot read. It is preserved at src/form.v1-deferred.ts for the P1 rewrite. The published 0.2.0 market entry was then verified end to end: the LIVE hosted index listed 工作看板 0.2.0, its own install spec (git+https://github.com/skillre/dsh-plugin-work-dashboard#42b7c9f2bf951cdd1715feda48b47bf81286bc0c) was installed into a fresh owned profile, --dump-config composed the row, a bounded startup served the app, and list/detail/risks/timeline all answered (detail correctly reported unknown-project on the cold cache). Cleanup removed the owned profile and verified it was gone.",
|
|
103
103
|
"evidence": [
|
|
104
104
|
"docs/evidence/isolated-mount-0.6.0.json",
|
|
105
|
-
"docs/evidence/market-install-0.
|
|
105
|
+
"docs/evidence/market-install-0.6.0.json",
|
|
106
106
|
"docs/evidence/ui-verification.json",
|
|
107
107
|
"docs/evidence/work-dashboard-empty.png",
|
|
108
108
|
"docs/evidence/work-dashboard-cards.png",
|
|
@@ -136,7 +136,47 @@
|
|
|
136
136
|
"skills/poc-submit/SKILL.md",
|
|
137
137
|
"skills/poc-export/scripts/export-form.mjs"
|
|
138
138
|
],
|
|
139
|
-
"note": "Packed tarball 0.6.0 installed into an owned, disposable, non-Desktop web profile (DSH 0.2.2-rc.2). This release is a packaging and CI correction, not a feature change: the plugin behaviour verified in 0.5.0 is unchanged. scripts/preview.mjs and scripts/prepare-release.mjs now import the shared scripts/display-contract.mjs instead of each carrying a drifted local copy of the rules, and package.json#files gains the explicit \"!docs/PREVIEW.md\" exclusion. That closes a real leak: the published 0.5.0 tarball shipped docs/PREVIEW.md, the internal whiteboard registry holding Feishu document links and tokens, because the local reimplementation of npm file selection treated a directory entry in files as an allow-list rather than as contributing ignores. Coverage is now decided by a real npm pack probe, so the repository check, prepare-release and the fleet audit share one verdict and cannot disagree with npm. Two CI defects were also fixed, both of which were failing on main: the plugin.spec cache roots were built from TMPDIR, which runners set to /tmp and which is shallower than the three-segment floor the mount guard enforces (the guard is correct, the fixture was not), and tests/view.spec.tsx failed all 41 assertions on Node 26 because Node 26 defines its own globalThis.localStorage stub that shadows the jsdom Storage vitest would otherwise install. Both were reproduced and re-verified on real Node 26 (41/41 failing before the fix, 41/41 passing after). Verification for this release: npm run check passes (preview check, typecheck, 189 unit tests, lib-drift, pack check); 31 isolated checks passed against the packed tarball on a genuinely mounted DSH 0.2.2-rc.2, including that the three bundled skills reached the skill catalog at boot; cleanup removed the owned profile and its cache and the removal was verified. Desktop Client (Electron) visual verification was not performed for this release; the UI assertions recorded from 0.5.0 still describe the same shipped client bundle."
|
|
139
|
+
"note": "Packed tarball 0.6.0 installed into an owned, disposable, non-Desktop web profile (DSH 0.2.2-rc.2). This release is a packaging and CI correction, not a feature change: the plugin behaviour verified in 0.5.0 is unchanged. scripts/preview.mjs and scripts/prepare-release.mjs now import the shared scripts/display-contract.mjs instead of each carrying a drifted local copy of the rules, and package.json#files gains the explicit \"!docs/PREVIEW.md\" exclusion. That closes a real leak: the published 0.5.0 tarball shipped docs/PREVIEW.md, the internal whiteboard registry holding Feishu document links and tokens, because the local reimplementation of npm file selection treated a directory entry in files as an allow-list rather than as contributing ignores. Coverage is now decided by a real npm pack probe, so the repository check, prepare-release and the fleet audit share one verdict and cannot disagree with npm. Two CI defects were also fixed, both of which were failing on main: the plugin.spec cache roots were built from TMPDIR, which runners set to /tmp and which is shallower than the three-segment floor the mount guard enforces (the guard is correct, the fixture was not), and tests/view.spec.tsx failed all 41 assertions on Node 26 because Node 26 defines its own globalThis.localStorage stub that shadows the jsdom Storage vitest would otherwise install. Both were reproduced and re-verified on real Node 26 (41/41 failing before the fix, 41/41 passing after). Published to the registry on 2026-11-13; the LIVE market entry now installs @skillre/dsh-plugin-work-dashboard@0.6.0 from npm into a fresh owned profile and 15 checks passed (composed row, bounded startup, list/detail/risks/timeline all answering), then the owned profile was removed and the removal verified. Verification for this release: npm run check passes (preview check, typecheck, 189 unit tests, lib-drift, pack check); 31 isolated checks passed against the packed tarball on a genuinely mounted DSH 0.2.2-rc.2, including that the three bundled skills reached the skill catalog at boot; cleanup removed the owned profile and its cache and the removal was verified. Desktop Client (Electron) visual verification was not performed for this release; the UI assertions recorded from 0.5.0 still describe the same shipped client bundle."
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"dsh": "0.2.2-rc.3",
|
|
143
|
+
"verifiedAt": "2026-11-17",
|
|
144
|
+
"result": "passed",
|
|
145
|
+
"checks": [
|
|
146
|
+
"dsh-version",
|
|
147
|
+
"local-remote-and-gh-stub",
|
|
148
|
+
"profile-template-created",
|
|
149
|
+
"profile-tarball-install",
|
|
150
|
+
"packed-dependency-and-selection",
|
|
151
|
+
"dump-config",
|
|
152
|
+
"packed-payload-present",
|
|
153
|
+
"packed-skills-present",
|
|
154
|
+
"cache-absent-before-mount",
|
|
155
|
+
"bounded-startup",
|
|
156
|
+
"bundled-skills-registered",
|
|
157
|
+
"api-cold-cache-empty",
|
|
158
|
+
"api-refresh-clone",
|
|
159
|
+
"api-board-computed",
|
|
160
|
+
"api-portfolio-analysis",
|
|
161
|
+
"api-detail",
|
|
162
|
+
"api-refresh-fetch",
|
|
163
|
+
"api-unknown-project",
|
|
164
|
+
"api-auth-fence",
|
|
165
|
+
"cache-is-real-clone",
|
|
166
|
+
"cache-credential-not-persisted",
|
|
167
|
+
"api-risk-board-sorted",
|
|
168
|
+
"api-global-timeline-sorted",
|
|
169
|
+
"api-timeline-reports-silent-projects",
|
|
170
|
+
"api-blockers-merged-from-five-sources",
|
|
171
|
+
"api-blockers-no-double-count",
|
|
172
|
+
"api-export-form-fill",
|
|
173
|
+
"api-export-form-blank",
|
|
174
|
+
"refresh-works-after-submit",
|
|
175
|
+
"cache-wiped-on-restart",
|
|
176
|
+
"api-refresh-after-restart",
|
|
177
|
+
"cleanup-verified"
|
|
178
|
+
],
|
|
179
|
+
"notes": "Isolated non-Desktop profile; packed tarball @skillre/dsh-plugin-work-dashboard@0.9.0 (sha256 58058de0aa4427a2...). Scope: Host mount, Connection route, cache lifecycle, risk board, global timeline, blocker aggregation, export-form generation, bundled skill registration, and owned-profile cleanup. NOT covered by this run: any Client UI check — no browser was driven, so the web-ui rows recorded under 0.2.2-rc.2 remain the only UI evidence and do not describe 0.9.0."
|
|
140
180
|
}
|
|
141
181
|
],
|
|
142
182
|
"observations": {
|
|
@@ -144,8 +184,8 @@
|
|
|
144
184
|
"desktopClientNote": "The Web UI was verified directly. The Electron Desktop Client shares the same renderer but was not launched for this release; a Desktop-specific visual check remains outstanding.",
|
|
145
185
|
"chartsWithoutDependency": "Every figure is hand-built SVG or flex geometry because the client bundle may only externalise `react`. No charting dependency was added.",
|
|
146
186
|
"displayContract": "Adopted: locale meta.detail + one preview image per language + docs shipped in the package (evidence excluded).",
|
|
147
|
-
"updateMechanism": "
|
|
148
|
-
"npmChannel": "
|
|
187
|
+
"updateMechanism": "Published to the npm registry on 2026-11-13 as @skillre/dsh-plugin-work-dashboard@0.6.0 (dist-tag latest). This is the first publish, and it changes the plugin's delivery story: the package is now installable from a registry spec under its own name, which is the only shape the plugin manager grants an in-place Versions section to. `npm run update:readiness -- work-dashboard` therefore reports OK, where every earlier version reported 'not published on the configured registry'. The market entry is npm-sourced for the same reason: the previous Git-pinned entry was never updatable, and the fleet builder dropped it as soon as the index was rebuilt.",
|
|
188
|
+
"npmChannel": "First publish completed manually on 2026-11-13 with `npm publish --access public`; npm cannot attach a Trusted Publisher to a package that did not exist, so this single step could not be automated. The published artifact was verified to match the locally packed and mounted tarball exactly (integrity sha512-dpA+I/3YCOHXWzOxaC+xqyKKsRciyowgFD8C4Q7dSp8xAPA/ESWl+VKIMVyYMSAVG2XxF/3Va0+a4kde/h7/hQ==, shasum a7525d28), and the published tarball was re-downloaded and confirmed to contain the 62 expected files with docs/PREVIEW.md absent. Still outstanding: configuring the GitHub Actions Trusted Publisher (`npm trust github ... --allow-publish`), which npm gates behind one interactive 2FA confirmation, so the OIDC workflow cannot publish subsequent versions until that is done."
|
|
149
189
|
},
|
|
150
190
|
"notes": [
|
|
151
191
|
"Verified against the packed tarball installed into an owned, disposable non-Desktop DSH profile; the profile and its cache were removed afterwards and the removal was verified.",
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# 工作看板 0.7–0.9 · 实施计划
|
|
2
|
+
|
|
3
|
+
> **状态:已实施(0.9.0)**。本文件保留原始计划,便于对照「计划了什么 / 实际做了什么」。
|
|
4
|
+
> 实测结果、验证证据与偏差见文末「实施记录」。
|
|
5
|
+
|
|
6
|
+
> 本文件是 P0–P3 优化的落地计划,不是设计愿景。每条都写清了**改哪个文件、验收什么、为什么不先做别的**。
|
|
7
|
+
> 目标来自一次对真实台账(`skillre/workbranch` @ `7b81b63`,30 个项目)的实测:progress 0 条、plan 全空、
|
|
8
|
+
> outcome 全空、四维覆盖 0/30。插件最精细的四块(进展流、四维、时间线、风险看板)在真实数据上**全是空态**。
|
|
9
|
+
> 优化优先级由这个错位决定,而不是由组件美观度决定。
|
|
10
|
+
|
|
11
|
+
## 0. 读数:现状与目标的差距
|
|
12
|
+
|
|
13
|
+
| 维度 | 现状 | 目标 |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| 详情页骨架 | 写死五段,与 `stage` 无关 | 按 Gate 决定骨架 |
|
|
16
|
+
| 空数据 | 30 个项目重复 30 次"还没有进展记录" | 变成可执行的工作清单 |
|
|
17
|
+
| 阻障 | 三套口径(缺口规则 / 风险看板 / 金额缺失) | 一处统一聚合,可分来源下钻 |
|
|
18
|
+
| 总览 | 数字散在图里 | 顶部 KPI 条 + 预算独立面板 |
|
|
19
|
+
| 阶段分布 | 30/30 都在 G0,六根柱退化成一根 | 增加阶段内完成度,不靠阶段位置也能读出进展 |
|
|
20
|
+
| 详情基本信息 | 客户名(`org`)根本没渲染 | 客户名 / 客户人 / 责任人 / 预算 / 决策链齐全 |
|
|
21
|
+
| 其他按钮 | 只有刷新/设置/风险/时间线四个 | 增加导出收集表单(复用 `poc-export`) |
|
|
22
|
+
|
|
23
|
+
## 1. 版本切分
|
|
24
|
+
|
|
25
|
+
| 版本 | 主题 | 内容 |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| **0.7.0** | 让页面在真实数据下有内容 | P0-1 阶段感知详情页 · P0-2 空态改工作清单 · P0-3 阻障口径统一 |
|
|
28
|
+
| **0.8.0** | 总览收口 | P1-1 KPI 顶条 · P1-2 预算面板 · P1-3 阶段内完成度 · P1-4 基本信息补全 |
|
|
29
|
+
| **0.9.0** | 让数据开始流进来 | P2 v3 导出收集表单(复用 `poc-export` 的能力,重写 `form.v1-deferred.ts`) |
|
|
30
|
+
| 持续 | 工程债 | P3 死代码、重复函数、i18n、README 漂移 |
|
|
31
|
+
|
|
32
|
+
`1.0.0`(新建/编辑 + PR 提交闭环)不在本次范围:它需要 Host 写能力与 draft PR 提交路径,
|
|
33
|
+
与"只读看板"的定位是两件事,应单独一轮设计。
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 2. P0(0.7.0)
|
|
38
|
+
|
|
39
|
+
### P0-3 阻障口径统一(先做,因为 P0-1/P0-2 都要读它)
|
|
40
|
+
|
|
41
|
+
**问题**:待处理栏只覆盖 12 条缺口规则。真实数据里"4 个项目没填金额""1 个项目没有
|
|
42
|
+
`stage_since`""30 个项目没有进展记录"这些阻障在栏外。
|
|
43
|
+
|
|
44
|
+
**做法**:Host 新增聚合 `BlockerBoard`,把四类阻障合成一个带来源标签的列表:
|
|
45
|
+
|
|
46
|
+
1. `gap` —— 12 条缺口规则(已有 `scanGaps`)
|
|
47
|
+
2. `stalled` —— 阶段停滞(复用 R12 的判定,但不重复计数)
|
|
48
|
+
3. `missing-amount` —— `amount_wan` 为 0
|
|
49
|
+
4. `no-progress` —— 没有任何 progress 记录
|
|
50
|
+
5. `no-stage-since` —— 没有 `stage_since`,因此无法判断停滞
|
|
51
|
+
|
|
52
|
+
**为什么合并**:这五类在用户眼里是同一个问题——"哪里卡住了"。分开放在三个地方,
|
|
53
|
+
用户要自己拼。合并后一个列表能排序、能计数、能下钻。
|
|
54
|
+
|
|
55
|
+
**文件**:`src/blockers.ts`(新)、`src/types.ts`、`src/transport.ts`、`src/index.ts`、
|
|
56
|
+
`src/client/shell.tsx`、`src/client/overview.tsx`、`src/client/text.ts`
|
|
57
|
+
|
|
58
|
+
**验收**:
|
|
59
|
+
- 真实台账上,阻障总数 = 缺口数 + 金额缺失 + 无进展 + 无 stage_since(去重后不重复计数)
|
|
60
|
+
- 每个阻障带来源标签,可按来源筛选
|
|
61
|
+
- 空态文案说清"没有阻障"而不是"没有数据"
|
|
62
|
+
|
|
63
|
+
### P0-1 阶段感知详情页
|
|
64
|
+
|
|
65
|
+
**问题**:详情页是 `ProgressStream → DimensionGrid → Gate0Meter → PlanPanels → OutcomePanel`
|
|
66
|
+
写死的五段。G0 阶段的项目打开后,看到的是三个空区块,而"我还差哪几项才能进 G1"要自己拼。
|
|
67
|
+
|
|
68
|
+
**做法**:按 `summary.stage` 决定骨架顺序与显隐:
|
|
69
|
+
|
|
70
|
+
| 阶段 | 骨架 |
|
|
71
|
+
|---|---|
|
|
72
|
+
| **G0** | G0 工作台(五必填逐项 + 决策链 + 评审状态)→ 为什么测(why_customer / why_us)→ 进展流(可空) |
|
|
73
|
+
| **G1** | 计划面板(痛点 / 指标 / 场景 / 优势)→ G1 结论 → 进展流 |
|
|
74
|
+
| **G2** | G2 前置条件 → 进展流 → 计划 |
|
|
75
|
+
| **G3** | 进展流 → 证据链 → 客户认可 → 四维 |
|
|
76
|
+
| **G4** | 四维 → 结论 → Next Milestone → 进展流 |
|
|
77
|
+
| `closed` | 结论 → 四维 → 进展流(归档视图) |
|
|
78
|
+
| 未知 | 保持现有全量顺序 |
|
|
79
|
+
|
|
80
|
+
**关键约束**:不是隐藏区块,是**排序 + 收起到折叠区**。任何字段都不能因为阶段而不可达——
|
|
81
|
+
否则用户没法核对上一阶段的记录。
|
|
82
|
+
|
|
83
|
+
**文件**:`src/client/detail.tsx`、`src/client/css/detail.ts`、`src/client/text.ts`、`tests/view.spec.tsx`
|
|
84
|
+
|
|
85
|
+
**验收**:G0 项目首屏出现"G0 工作台"且不出现空的进展流;G4 项目首屏出现四维;
|
|
86
|
+
所有阶段都能展开看到全部五个区块。
|
|
87
|
+
|
|
88
|
+
### P0-2 空态改工作清单
|
|
89
|
+
|
|
90
|
+
**问题**:30 个项目同时空,页面重复 30 次"还没有进展记录",信息量为零。
|
|
91
|
+
|
|
92
|
+
**做法**:`dtProgressEmpty*` 这类空态从"描述性空"改成"可执行清单":
|
|
93
|
+
- G0 空态 → 列出还缺哪几个必填字段 + 一句"填完导出表单给组员"
|
|
94
|
+
- 无进展 → 列出"这个项目还没有第一条进展记录" + 指向导出表单位置
|
|
95
|
+
|
|
96
|
+
**文件**:`src/client/detail.tsx`、`src/client/overview.tsx`、`src/client/text.ts`
|
|
97
|
+
|
|
98
|
+
**验收**:空态区块包含具体字段名(不是泛泛的"暂无数据");测试断言字段名出现在空态里。
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 3. P1(0.8.0)
|
|
103
|
+
|
|
104
|
+
### P1-1 KPI 顶条
|
|
105
|
+
|
|
106
|
+
`总数 / 进行中 / 各阶段数 / 预算合计 / 阻障数`,点击任一项等价于应用对应筛选。
|
|
107
|
+
数据来自已有的 `snapshot.stats`(**注意:这块现在算了但从没渲染,P3 一并处理**)。
|
|
108
|
+
|
|
109
|
+
### P1-2 预算面板
|
|
110
|
+
|
|
111
|
+
总额拆分(已评审通过 / 待评审 / 未填)、按体系分布、集中度、未填金额警示。
|
|
112
|
+
现在这是三张图偶然拼出来的,改成一块有明确口径的面板。
|
|
113
|
+
|
|
114
|
+
### P1-3 阶段内完成度
|
|
115
|
+
|
|
116
|
+
六根柱在 30:0:0:0:0:0 的数据下没有信息量。改为双层:外层是漏斗位置,内层是当前 Gate
|
|
117
|
+
的完成度(G0 = 五必填 x/5)。
|
|
118
|
+
|
|
119
|
+
### P1-4 详情基本信息补全
|
|
120
|
+
|
|
121
|
+
- 客户名:`org.system / org.company`(Host 已下发,Client 从未渲染)
|
|
122
|
+
- 客户人:`tech_owner`(客户技术责任人)+ `exec_sponsor`(业务决策人)
|
|
123
|
+
- 责任人:`owner`
|
|
124
|
+
- 预算:`amount_wan`
|
|
125
|
+
- 决策链:`gate0.decision_chain` 从 G0 计量条提出来,作为基本信息的一块
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 4. P2(0.9.0)导出收集表单
|
|
130
|
+
|
|
131
|
+
`src/form.v1-deferred.ts`(912 行)是 v1 模型的产物,已排除出构建。它模型的是
|
|
132
|
+
`why_customer_test` / `success_criteria` / `result` 等 v3 已删除的字段。
|
|
133
|
+
|
|
134
|
+
**做法**:按 v3 模型重写,保留原实现的四个硬骨头(单文件无 CDN、按项目集派生 autosave key、
|
|
135
|
+
正确引号的 YAML 序列化、一项目一文件的批量下载)。表单只问 v3 真实字段,重点是 G0 五必填
|
|
136
|
+
与 progress 追加。
|
|
137
|
+
|
|
138
|
+
**验收**:生成的 HTML 离线可用;导出的 YAML 能被 `PocStore.load()` 原样读回(用测试断言往返)。
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 5. P3 工程债(穿插进行)
|
|
143
|
+
|
|
144
|
+
| 问题 | 证据 | 处理 |
|
|
145
|
+
|---|---|---|
|
|
146
|
+
| `Snapshot.stats` 算了从不渲染 | Client 全目录零引用 | P1-1 消费它 |
|
|
147
|
+
| `Stats.awaitingCustomer` 恒为 0 | `let awaitingCustomer = 0` 从未自增 | 真正计算或删除 |
|
|
148
|
+
| 公司筛选不可达 | `buildFilterOptions` 算 `companies`,`FilterChips` 不渲染 | 补一个 chip 组 |
|
|
149
|
+
| `filtersAreEmpty` 导入未使用 | `shell.tsx:60` | 删除 |
|
|
150
|
+
| `detail.org` 下发但从未使用 | `detail.tsx` 零引用 | P1-4 消费它 |
|
|
151
|
+
| `formatWan` ×3 / `formatDate` ×3 / `stageLabel` ×2 | overview/detail/shell | 抽到 `src/client/format.ts` |
|
|
152
|
+
| 英文界面出现中文全角冒号 | `shell.tsx:814` | 提到字典键 |
|
|
153
|
+
| README 写 `gates.G0..G4.complete` | v3 已无此字段 | 修正 |
|
|
154
|
+
| 9px 字号占比过高 | CSS 统计 | 关键标签提到 ≥11px |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 6. 每期的验证门
|
|
159
|
+
|
|
160
|
+
1. `npm run typecheck`
|
|
161
|
+
2. `npm test`(现有 189 项不得回退)
|
|
162
|
+
3. `node scripts/preview.mjs check`
|
|
163
|
+
4. `npm run pack:check`(发布前)
|
|
164
|
+
5. 隔离 profile 真实挂载(`scripts/verify-isolated.mjs`,自己拥有、用完即清)
|
|
165
|
+
|
|
166
|
+
静态通过、测试通过、挂载通过、发布通过是**四个不同的结论**,报告时分别标注。
|
|
167
|
+
|
|
168
|
+
## 7. 非目标
|
|
169
|
+
|
|
170
|
+
- 不引入第三方图表/日期库(客户端只能 external `react`)
|
|
171
|
+
- 不改数据源 schema(`schemas/poc-schema.md` 是台账仓的事)
|
|
172
|
+
- 不在用户 profile 里安装/更新(安装权属于用户)
|
|
173
|
+
- 不做写回与 PR 提交(1.0 单独设计)
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 实施记录(0.9.0)
|
|
178
|
+
|
|
179
|
+
### 实际落地
|
|
180
|
+
|
|
181
|
+
| 计划项 | 状态 | 落点 |
|
|
182
|
+
|---|---|---|
|
|
183
|
+
| P0-3 阻障口径统一 | ✅ | `src/blockers.ts` + `snapshot.blockers` + `BlockersPanel` |
|
|
184
|
+
| P0-1 阶段感知详情页 | ✅ | `SKELETON_FOR` 骨架表 + `StageContext` + `dt-fold` 折叠 |
|
|
185
|
+
| P0-2 空态改工作清单 | ✅ | `Worklist` 组件(点名缺失字段) |
|
|
186
|
+
| P1-1 KPI 顶条 | ✅ | `KpiStrip`(5 格 + 阶段 chip) |
|
|
187
|
+
| P1-2 预算面板 | ✅ | `BudgetPanel`(三桶 + 体系分布 + 未填警告) |
|
|
188
|
+
| P1-3 阶段内完成度 | ✅ | `StageProgressFigure` |
|
|
189
|
+
| P1-4 基本信息补全 | ✅ | `BasicInfo`(客户名此前从未渲染) |
|
|
190
|
+
| P2 导出收集表单 | ✅ | `src/form.ts` + `export-form` RPC + `ExportFormDialog` |
|
|
191
|
+
| P3 工程债 | ✅ | 见下 |
|
|
192
|
+
|
|
193
|
+
### 偏差与说明
|
|
194
|
+
|
|
195
|
+
1. **P0-3 改成随快照下发**。原计划是独立端点 `blockers`。实施时改成 `Snapshot.blockers`:
|
|
196
|
+
阻障和列表来自同一批记录,两次请求在刷新后可能不一致,而 Client 本来就持有整份快照。
|
|
197
|
+
2. **骨架顺序多了 `basic`**。原计划只重排五个既有区块;实施时发现「客户名」这个字段
|
|
198
|
+
Host 一直下发、Client 从未渲染,于是新增基本信息区块并让它多数阶段排第一。
|
|
199
|
+
3. **导出表单在 Host 生成**,不在浏览器。生成器需要 `yaml`,把它打进 client bundle 会给
|
|
200
|
+
一个从不解析 YAML 的页面增加约 100 KiB。
|
|
201
|
+
4. **删除了 `src/form.v1-deferred.ts`(912 行)**,而不是保留。v3 表单已就位,留一份
|
|
202
|
+
模型着已删字段的旧文件只会让后来者误用它。
|
|
203
|
+
|
|
204
|
+
### 验证证据
|
|
205
|
+
|
|
206
|
+
| 级别 | 证据 | 覆盖 |
|
|
207
|
+
|---|---|---|
|
|
208
|
+
| 静态 | `npm run typecheck`、`npm run pack:check`、`node scripts/preview.mjs check` | 类型、发布清单、显示契约 |
|
|
209
|
+
| 单元/组件 | `npm test` — 251 项 | 规则、聚合、表单 YAML 往返、jsdom 渲染 |
|
|
210
|
+
| 真实台账 | `node scripts/render-check.mjs`、`node scripts/export-check.mjs` | 30 个项目上阻障/工作清单/表单生成 |
|
|
211
|
+
| 真实挂载 | `docs/evidence/isolated-mount-0.9.0.json` | 隔离 profile、打包 tarball、API、缓存生命周期、清理 |
|
|
212
|
+
| 真实浏览器 | `docs/evidence/ui-verification-0.9.0.json` + 3 张截图 | 页面挂载、五个新面板、阶段骨架、导出对话框 |
|
|
213
|
+
|
|
214
|
+
### 真实浏览器验证抓到的缺陷
|
|
215
|
+
|
|
216
|
+
**对话框渲染在 `.wd-shell` 之外**(已修复,`37616d9`)。本插件所有样式限定在 `.wd-shell`
|
|
217
|
+
下,两个对话框却是它的兄弟节点,于是 `position: fixed` 根本不生效(实测 computed position
|
|
218
|
+
为 `static`),覆盖层退化成文档流里的普通块、被排到页面末尾。
|
|
219
|
+
|
|
220
|
+
jsdom 看不见布局,所以 64 项组件测试全绿也测不出来——这正是「真实 UI 验证不能由静态测试
|
|
221
|
+
替代」的具体例子。修复后补了回归测试:对话框必须渲染在 `.wd-shell` 作用域内。
|
|
222
|
+
|
|
223
|
+
### 未完成 / 已知限制
|
|
224
|
+
|
|
225
|
+
- **1.0.0 范围(新建/编辑 + PR 提交)未做**:需要 Host 写能力与 draft PR 路径,与只读看板定位不同。
|
|
226
|
+
- **UI 证据来自 Chrome for Testing(headless)**,不是 Electron Desktop Client。Desktop 交付前
|
|
227
|
+
仍需在真实 Electron 客户端复验一次。
|
|
228
|
+
- `docs/PREVIEW.md` 的画板行仍未填(`preview.mjs check` 的既有 warning),与本次改动无关。
|
|
229
|
+
- 真实台账的 30 个项目**全部停在 G0、零进展**,所以 G3/G4 骨架、进展流、时间线在真实数据上
|
|
230
|
+
仍只由测试夹具覆盖,没有生产数据佐证。
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The unified blocker board: every reason a project is stuck, in one list.
|
|
3
|
+
*
|
|
4
|
+
* The dashboard used to answer "what is stuck" in three unrelated places: the
|
|
5
|
+
* pending rail (the 12 gap rules), the risk board (an independent page), and a
|
|
6
|
+
* one-line footnote about missing amounts. A reader had to merge them mentally,
|
|
7
|
+
* and the merge was never complete — a project with no amount and no progress
|
|
8
|
+
* appeared in none of the three.
|
|
9
|
+
*
|
|
10
|
+
* This module does that merge once, on the Host, so the Client cannot disagree
|
|
11
|
+
* with itself. Five sources, each with its own level and priority:
|
|
12
|
+
*
|
|
13
|
+
* 1. `gap` — the twelve v3 rules. Delegated to `scanGaps` so this board and the
|
|
14
|
+
* pending rail can never report different gap counts.
|
|
15
|
+
* 2. `stalled` — the stage has not moved past `stallDays`. Deliberately NOT
|
|
16
|
+
* R12: R12 only fires when `stage_since` exists, which on the real ledger is
|
|
17
|
+
* one project in thirty. A project with no `stage_since` is not "not stuck",
|
|
18
|
+
* it is unmeasurable, and that is what `no-stage-since` reports.
|
|
19
|
+
* 3. `missing-amount` — `amount_wan` is 0. A project with no amount cannot be
|
|
20
|
+
* ranked, forecast, or compared against the large-amount rule.
|
|
21
|
+
* 4. `no-progress` — the project has never recorded a progress entry. This is
|
|
22
|
+
* the single largest blocker on a freshly imported ledger and it appeared
|
|
23
|
+
* nowhere before.
|
|
24
|
+
* 5. `no-stage-since` — no `stage_since`, so the stall clock never started.
|
|
25
|
+
*
|
|
26
|
+
* Each source contributes at most ONE row per project. Two rows saying "this
|
|
27
|
+
* project is stalled" and "this project has no stage_since" would be the same
|
|
28
|
+
* finding twice, and a list that double-counts cannot be sorted honestly.
|
|
29
|
+
*/
|
|
30
|
+
import type { ScanOptions } from './gap.js';
|
|
31
|
+
import type { BlockerBoard, PocRecord } from './types.js';
|
|
32
|
+
import { BLOCKER_SOURCES } from './types.js';
|
|
33
|
+
/**
|
|
34
|
+
* Build the blocker board from the loaded records.
|
|
35
|
+
*
|
|
36
|
+
* Ordering: a global priority descending, then project id, then source. The
|
|
37
|
+
* gap rules keep their own weights (R11 outranks R2, and so on), so this list
|
|
38
|
+
* is a merge of rankings rather than a re-ranking — which is the point: the
|
|
39
|
+
* most valuable finding must not sink because it came from a smaller source.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildBlockerBoard(records: readonly PocRecord[], options: ScanOptions): BlockerBoard;
|
|
42
|
+
/** An empty board for the cold-cache case, so the Client needs no null check. */
|
|
43
|
+
export declare function emptyBlockerBoard(): BlockerBoard;
|
|
44
|
+
/** Every source key, re-exported so the Client can build its chips. */
|
|
45
|
+
export { BLOCKER_SOURCES };
|