@skillre/dsh-plugin-work-dashboard 0.0.0-stage → 0.6.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/LICENSE +21 -0
- package/README.en.md +253 -0
- package/README.md +347 -2
- package/UNINSTALL.md +7 -0
- package/compatibility.json +155 -0
- package/cordis.patch.yml +24 -0
- package/docs/DESIGN-0.3.md +122 -0
- package/docs/DETAIL.md +1 -0
- package/docs/DETAIL.zh.md +1 -0
- package/docs/preview.svg +254 -0
- package/docs/preview.zh.svg +254 -0
- package/icon.svg +17 -0
- package/lib/client/api.d.ts +35 -0
- package/lib/client/api.js +44 -0
- package/lib/client/contracts.d.ts +94 -0
- package/lib/client/contracts.js +21 -0
- package/lib/client/css/base.d.ts +31 -0
- package/lib/client/css/base.js +422 -0
- package/lib/client/css/charts.d.ts +14 -0
- package/lib/client/css/charts.js +191 -0
- package/lib/client/css/detail.d.ts +21 -0
- package/lib/client/css/detail.js +399 -0
- package/lib/client/css/insights.d.ts +27 -0
- package/lib/client/css/insights.js +660 -0
- package/lib/client/css/overview.d.ts +22 -0
- package/lib/client/css/overview.js +338 -0
- package/lib/client/preferences.d.ts +56 -0
- package/lib/client/preferences.js +118 -0
- package/lib/client/styles.d.ts +17 -0
- package/lib/client/styles.js +22 -0
- package/lib/client/text.d.ts +32 -0
- package/lib/client/text.js +934 -0
- package/lib/client/view-contract.d.ts +110 -0
- package/lib/client/view-contract.js +28 -0
- package/lib/client.js +5389 -0
- package/lib/config.d.ts +61 -0
- package/lib/config.js +67 -0
- package/lib/gap.d.ts +60 -0
- package/lib/gap.js +227 -0
- package/lib/index.d.ts +40 -0
- package/lib/index.js +130 -0
- package/lib/repo.d.ts +124 -0
- package/lib/repo.js +407 -0
- package/lib/risks.d.ts +24 -0
- package/lib/risks.js +85 -0
- package/lib/skill.d.ts +94 -0
- package/lib/skill.js +220 -0
- package/lib/store.d.ts +63 -0
- package/lib/store.js +494 -0
- package/lib/timeline.d.ts +23 -0
- package/lib/timeline.js +93 -0
- package/lib/transport.d.ts +61 -0
- package/lib/transport.js +121 -0
- package/lib/types.d.ts +612 -0
- package/lib/types.js +62 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +117 -4
- package/skills/poc-export/SKILL.md +81 -0
- package/skills/poc-export/scripts/export-form.mjs +654 -0
- package/skills/poc-ledger/SKILL.md +171 -0
- package/skills/poc-submit/SKILL.md +186 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"package": "@skillre/dsh-plugin-work-dashboard",
|
|
4
|
+
"verified": [
|
|
5
|
+
{
|
|
6
|
+
"dsh": "0.2.2-rc.2",
|
|
7
|
+
"verifiedAt": "2026-11-13",
|
|
8
|
+
"result": "passed",
|
|
9
|
+
"checks": [
|
|
10
|
+
"dump-config",
|
|
11
|
+
"bounded-startup",
|
|
12
|
+
"packed-install",
|
|
13
|
+
"api-cold-cache-empty",
|
|
14
|
+
"api-refresh-clone",
|
|
15
|
+
"api-board-computed",
|
|
16
|
+
"api-detail",
|
|
17
|
+
"api-refresh-fetch",
|
|
18
|
+
"api-unknown-project",
|
|
19
|
+
"api-auth-fence",
|
|
20
|
+
"cache-absent-before-mount",
|
|
21
|
+
"cache-is-real-clone",
|
|
22
|
+
"cache-credential-not-persisted",
|
|
23
|
+
"cache-wiped-on-restart",
|
|
24
|
+
"api-refresh-after-restart",
|
|
25
|
+
"api-risk-board-sorted",
|
|
26
|
+
"api-global-timeline-sorted",
|
|
27
|
+
"api-timeline-reports-silent-projects",
|
|
28
|
+
"web-ui",
|
|
29
|
+
"web-ui-sidebar-entry",
|
|
30
|
+
"web-ui-panel-selection",
|
|
31
|
+
"web-ui-module-rail",
|
|
32
|
+
"web-ui-empty-state",
|
|
33
|
+
"web-ui-refresh-clone",
|
|
34
|
+
"web-ui-v3-stat-counters",
|
|
35
|
+
"web-ui-v3-table-columns",
|
|
36
|
+
"web-ui-amount-column",
|
|
37
|
+
"web-ui-latest-progress-column",
|
|
38
|
+
"web-ui-progress-stream",
|
|
39
|
+
"web-ui-stage-track",
|
|
40
|
+
"web-ui-four-dimension-cards",
|
|
41
|
+
"web-ui-pending-order",
|
|
42
|
+
"web-ui-detail-page",
|
|
43
|
+
"web-ui-refresh-settings",
|
|
44
|
+
"web-ui-localstorage-persistence",
|
|
45
|
+
"web-ui-failure-banner",
|
|
46
|
+
"web-ui-risk-board",
|
|
47
|
+
"web-ui-global-timeline",
|
|
48
|
+
"web-ui-light-theme",
|
|
49
|
+
"web-ui-dark-theme",
|
|
50
|
+
"web-ui-no-raw-placeholders",
|
|
51
|
+
"web-ui-no-console-errors",
|
|
52
|
+
"v3-parser",
|
|
53
|
+
"v3-twelve-gap-rules",
|
|
54
|
+
"v3-progress-timeline",
|
|
55
|
+
"automatic-jsx-runtime",
|
|
56
|
+
"live-market-index-entry",
|
|
57
|
+
"live-market-git-install",
|
|
58
|
+
"live-market-bounded-startup",
|
|
59
|
+
"live-market-api-list",
|
|
60
|
+
"live-market-api-detail",
|
|
61
|
+
"live-market-api-risks",
|
|
62
|
+
"live-market-api-timeline",
|
|
63
|
+
"api-portfolio-analysis",
|
|
64
|
+
"api-gate0-checklist",
|
|
65
|
+
"web-ui-portfolio-band",
|
|
66
|
+
"web-ui-band-six-figures",
|
|
67
|
+
"web-ui-band-stage-funnel",
|
|
68
|
+
"web-ui-band-org-breakdown",
|
|
69
|
+
"web-ui-band-type-donut",
|
|
70
|
+
"web-ui-band-dimension-meters",
|
|
71
|
+
"web-ui-band-collapse",
|
|
72
|
+
"web-ui-project-list-visible-without-scrolling",
|
|
73
|
+
"web-ui-card-view",
|
|
74
|
+
"web-ui-card-four-dimension-marks",
|
|
75
|
+
"web-ui-board-view",
|
|
76
|
+
"web-ui-table-view-sortable",
|
|
77
|
+
"web-ui-table-sort-reorders",
|
|
78
|
+
"web-ui-search-filter",
|
|
79
|
+
"web-ui-filter-chips",
|
|
80
|
+
"web-ui-filtered-empty-state",
|
|
81
|
+
"web-ui-keyboard-cursor",
|
|
82
|
+
"web-ui-keyboard-enter-opens",
|
|
83
|
+
"web-ui-keyboard-escape-returns",
|
|
84
|
+
"web-ui-detail-sticky-rail",
|
|
85
|
+
"web-ui-detail-dimension-origin",
|
|
86
|
+
"web-ui-detail-g0-meter",
|
|
87
|
+
"web-ui-detail-progress-cards",
|
|
88
|
+
"web-ui-detail-evidence-anchor",
|
|
89
|
+
"web-ui-detail-milestone-callout",
|
|
90
|
+
"web-ui-risk-severity-lanes",
|
|
91
|
+
"web-ui-timeline-month-groups",
|
|
92
|
+
"display-contract",
|
|
93
|
+
"display-card-description-budget",
|
|
94
|
+
"display-detail-single-image",
|
|
95
|
+
"display-preview-svg-valid",
|
|
96
|
+
"display-docs-shipped",
|
|
97
|
+
"packed-skills-present",
|
|
98
|
+
"bundled-skills-registered",
|
|
99
|
+
"skill-frontmatter-parsed",
|
|
100
|
+
"export-form-v3"
|
|
101
|
+
],
|
|
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
|
+
"evidence": [
|
|
104
|
+
"docs/evidence/isolated-mount-0.6.0.json",
|
|
105
|
+
"docs/evidence/market-install-0.5.0.json",
|
|
106
|
+
"docs/evidence/ui-verification.json",
|
|
107
|
+
"docs/evidence/work-dashboard-empty.png",
|
|
108
|
+
"docs/evidence/work-dashboard-cards.png",
|
|
109
|
+
"docs/evidence/work-dashboard-board.png",
|
|
110
|
+
"docs/evidence/work-dashboard-table.png",
|
|
111
|
+
"docs/evidence/work-dashboard-detail.png",
|
|
112
|
+
"docs/evidence/work-dashboard-risks.png",
|
|
113
|
+
"docs/evidence/work-dashboard-timeline.png",
|
|
114
|
+
"docs/evidence/work-dashboard-failure.png",
|
|
115
|
+
"docs/evidence/work-dashboard-dark.png",
|
|
116
|
+
"tests/store.spec.ts",
|
|
117
|
+
"tests/gap.spec.ts",
|
|
118
|
+
"tests/view.spec.tsx",
|
|
119
|
+
"tests/text.spec.ts",
|
|
120
|
+
"tests/transport.spec.ts",
|
|
121
|
+
"tests/plugin.spec.ts",
|
|
122
|
+
"tests/client-bundle.spec.ts",
|
|
123
|
+
"tests/preferences.spec.ts",
|
|
124
|
+
"tests/config.spec.ts",
|
|
125
|
+
"tests/risks.spec.ts",
|
|
126
|
+
"tests/timeline.spec.ts",
|
|
127
|
+
"docs/DETAIL.md",
|
|
128
|
+
"docs/DETAIL.zh.md",
|
|
129
|
+
"docs/preview.svg",
|
|
130
|
+
"docs/preview.zh.svg",
|
|
131
|
+
"docs/PREVIEW.md",
|
|
132
|
+
"scripts/preview.mjs",
|
|
133
|
+
"tests/skill.spec.ts",
|
|
134
|
+
"skills/poc-ledger/SKILL.md",
|
|
135
|
+
"skills/poc-export/SKILL.md",
|
|
136
|
+
"skills/poc-submit/SKILL.md",
|
|
137
|
+
"skills/poc-export/scripts/export-form.mjs"
|
|
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."
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"observations": {
|
|
143
|
+
"desktopClient": "pending",
|
|
144
|
+
"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
|
+
"chartsWithoutDependency": "Every figure is hand-built SVG or flex geometry because the client bundle may only externalise `react`. No charting dependency was added.",
|
|
146
|
+
"displayContract": "Adopted: locale meta.detail + one preview image per language + docs shipped in the package (evidence excluded).",
|
|
147
|
+
"updateMechanism": "The package has never been published to the npm registry (verified 2026-11-13: the registry returns 404 for the package document and for every version). It is therefore not updatable in place today, and the market index does not list it: the fleet builder only emits npm-sourced entries, so the plugin was dropped from the hosted index when the entries were rebuilt. Publishing requires a first publish, which npm cannot bootstrap through Trusted Publishing because a trusted publisher cannot be attached to a package that does not exist.",
|
|
148
|
+
"npmChannel": "Blocked as of 2026-11-13: `npm whoami` returns 401 against the local session, so `release:bootstrap` reports \"the npm session is missing or expired\" and cannot perform the first publish. The protected npm-publish environment, the NPM_TRUSTED_PUBLISHING_READY variable and the OIDC workflow are all already provisioned and verified; only the first publish and the subsequent npm trust configuration are outstanding, and both require an interactive human 2FA confirmation."
|
|
149
|
+
},
|
|
150
|
+
"notes": [
|
|
151
|
+
"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.",
|
|
152
|
+
"The browser evidence was captured against the existing DSH Web app instance at 1440x900 with prefers-color-scheme pinned to light, then flipped to dark for the dark-theme assertion.",
|
|
153
|
+
"Desktop Client (Electron) visual verification was NOT performed for this release; the observations entry below is the standing limitation."
|
|
154
|
+
]
|
|
155
|
+
}
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# One Host row for this bundle. The Host half owns the disposable git cache,
|
|
2
|
+
# the YAML parse and the gap scan, and exposes them through one exact Connection
|
|
3
|
+
# route; the Client half of the same package registers the sidebar entry and the
|
|
4
|
+
# dashboard page.
|
|
5
|
+
#
|
|
6
|
+
# The dashboard is multi-module by design: POC Operations is the first module and
|
|
7
|
+
# lives in the same Host row, so adding a module later does not need a new row.
|
|
8
|
+
#
|
|
9
|
+
# Every config key is optional and schema-validated at mount time; the user's
|
|
10
|
+
# profile may override this row's configuration (see README).
|
|
11
|
+
- insert:
|
|
12
|
+
- id: skillre-work-dashboard
|
|
13
|
+
name: '@skillre/dsh-plugin-work-dashboard'
|
|
14
|
+
config:
|
|
15
|
+
# owner/name of the GitHub repository that holds projects/*.yaml.
|
|
16
|
+
repository: skillre/workbranch
|
|
17
|
+
# Wiped at mount, rebuilt on demand. Must not be a directory this plugin
|
|
18
|
+
# did not create; a pre-existing non-empty directory fails loudly.
|
|
19
|
+
cacheRoot: ~/.dsh/cache/work-dashboard
|
|
20
|
+
defaultBranch: main
|
|
21
|
+
cloneTimeoutMs: 120000
|
|
22
|
+
fetchTimeoutMs: 60000
|
|
23
|
+
# Days in one stage before gap rule R12 reports the project as stalled.
|
|
24
|
+
stallDays: 45
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# 工作看板 0.3 · 视觉与交互重构设计
|
|
2
|
+
|
|
3
|
+
> 目标不是"显示更多数据",而是**同一条数据有更多种可信的展示形态**,并且页面本身像一个被设计过的产品,而不是一张表格外面套了个壳。
|
|
4
|
+
|
|
5
|
+
## 0. 现在的问题(自我诊断)
|
|
6
|
+
|
|
7
|
+
| 位置 | 问题 | 根因 |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| 总览 | 只有一张七列表格 + 一条待处理侧栏 | 只有一种展示形态;表格是"可视化"的替代品,不是可视化 |
|
|
10
|
+
| 统计条 | 四个同样大小的方块,一个大数字加一句小字 | 没有对比、没有分布、没有趋势,读者拿不到"钱和风险在哪" |
|
|
11
|
+
| 总览交互 | 只有刷新/风险/时间线/设置四个按钮 | 没有搜索、筛选、排序、分组;23 个项目只能靠肉眼扫 |
|
|
12
|
+
| 详情 | 十三个 `label: value` 列表竖直堆叠 | 键值列表是"把字段抄一遍",不是展示方式 |
|
|
13
|
+
| 详情 | 阶段轨道占了一整条横幅,其余信息被压到下面 | 层级失衡:一个静态指标吃掉最贵的首屏 |
|
|
14
|
+
| 详情 | 进展流是唯一像样的区块,但每条进展仍是文本行 | 核心数据没有拿到核心呈现 |
|
|
15
|
+
| 布局 | 模块轨道只有一个 tab;页头一行塞四个按钮 | 没有工具栏(IA 缺失),没有分区,没有键盘路径 |
|
|
16
|
+
|
|
17
|
+
## 1. 设计原则
|
|
18
|
+
|
|
19
|
+
1. **一种数据,多种形态。** 同一批项目必须能按 表格 / 卡片 / 看板 三种形态读,切换不改变数据,只改变"你此刻想回答的问题"。
|
|
20
|
+
2. **分布优先于清单。** 先回答"钱在哪个阶段、哪个体系、哪个类型",再回答"这是哪个项目"。
|
|
21
|
+
3. **详情页是分层阅读,不是字段抄写。** 左栏常驻身份/阶段/四维/缺口,右栏是可滚动的证据链;每个区块用自己最合适的形态(计量条、漏斗、卡、时间线),不用 `label: value`。
|
|
22
|
+
4. **零依赖图表。** 客户端 bundle 只能 external `react`,图表全部手写 SVG,`role="img"` + `aria-label` + 文本兜底。
|
|
23
|
+
5. **键盘可达。** `↑/↓` 移动选中项目,`Enter` 打开,`Esc` 返回,`/` 聚焦搜索。
|
|
24
|
+
|
|
25
|
+
## 2. 信息架构(新)
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
工作看板
|
|
29
|
+
└─ POC 运营
|
|
30
|
+
├─ 顶部:面包屑 + 标题 + 数据源/刷新态 + 主操作(刷新 / 风险 / 时间线 / 设置)
|
|
31
|
+
├─ 工具栏:搜索 · 筛选 chips(体系/阶段/状态)· 视图切换(卡片/看板/表格)· 排序
|
|
32
|
+
├─ 组合面板(Portfolio band):
|
|
33
|
+
│ 阶段漏斗(G0→G4,数量+金额,可点击筛选)
|
|
34
|
+
│ 体系分布(堆叠条 + 公司明细)
|
|
35
|
+
│ 类型构成(环形图 + 图例)
|
|
36
|
+
│ 金额集中度(Top-5 横向条)
|
|
37
|
+
│ 四维覆盖率(四个环形进度)
|
|
38
|
+
├─ 主体:三种视图之一
|
|
39
|
+
│ 卡片:项目卡(阶段迷你轨 + 金额 + 四维点 + 最新进展 + 缺口徽标)
|
|
40
|
+
│ 看板:按阶段五列,卡内联拖不动(只读),列头显示数量/金额
|
|
41
|
+
│ 表格:原有七列,但加排序表头、金额条、粘性表头
|
|
42
|
+
└─ 右栏:待处理(按规则分组,可折叠;每条带规则编号徽标 + 严重度色带)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
详情页:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
左栏(sticky, 300px) 右栏(滚动)
|
|
49
|
+
├─ 项目卡(名称/编号/金额/类型) ├─ 进展流(核心:时间线卡片)
|
|
50
|
+
├─ 阶段轨道(竖向) ├─ 四维结果(4 张卡 + 来源标注 + 缺失原因)
|
|
51
|
+
├─ 四维摘要(2×2) ├─ G0 完整性(五格计量条 + 字段卡)
|
|
52
|
+
├─ 缺口摘要(列表) ├─ 计划(指标表 / 场景编号列表 / 风险严重度条)
|
|
53
|
+
├─ 上下条导航 / 返回 └─ 结论(三栏 + 里程碑时间线)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 3. 任务拆分
|
|
57
|
+
|
|
58
|
+
### T1 数据层(Lead)
|
|
59
|
+
- `types.ts`:新增 `PortfolioAnalysis`、`StageBucket`、`OrgBucket`、`TypeBucket`、`AmountRow`、`DimensionCoverage`、`GapRuleCount`、`ActivityPoint`;`Snapshot.analysis`;`Gate0View.checklist`。
|
|
60
|
+
- `store.ts`:`analyse(projects, records)` 计算组合分析;`gate0Checklist`;保持既有字段不变。
|
|
61
|
+
- `gap.ts`:不改规则,仅导出 `RULE_META` 供图表/图例复用。
|
|
62
|
+
|
|
63
|
+
### T2 图表原语(Lead)
|
|
64
|
+
`src/client/charts.tsx` + `src/client/css/charts.ts`:
|
|
65
|
+
`Funnel`、`Donut`、`StackedBar`、`BarList`、`RadialMeter`、`Sparkline`、`SeverityBar`、`StageRailMini`。
|
|
66
|
+
全部纯函数组件,props 只有数字/字符串/回调,无数据层依赖。
|
|
67
|
+
|
|
68
|
+
### T3 壳与工具栏(Lead)
|
|
69
|
+
`src/client/shell.tsx`(从 view.tsx 拆出):页面状态机、刷新、筛选/搜索/视图/排序状态、键盘导航、持久化(localStorage)。
|
|
70
|
+
`src/client/css/shell.ts`:页头、工具栏、按钮、空态、失败、弹窗、footer。
|
|
71
|
+
`view.tsx` 只保留 re-export。
|
|
72
|
+
|
|
73
|
+
### T4 总览视图(Teammate A)
|
|
74
|
+
`src/client/overview.tsx` + `src/client/css/overview.ts`:
|
|
75
|
+
`PortfolioBand`、`ProjectCards`、`ProjectBoard`、`ProjectTable`、`PendingRail`、`FilterChips`。
|
|
76
|
+
|
|
77
|
+
### T5 详情视图(Teammate B)
|
|
78
|
+
`src/client/detail.tsx` + `src/client/css/detail.ts`:
|
|
79
|
+
`DetailPage`、`IdentityRail`、`ProgressStream`、`DimensionGrid`、`Gate0Meter`、`PlanPanels`、`OutcomePanel`。
|
|
80
|
+
|
|
81
|
+
### T6 洞察视图(Teammate C)
|
|
82
|
+
`src/client/insights.tsx` + `src/client/css/insights.ts`:
|
|
83
|
+
风险看板(严重度泳道 + 分布条)、全局时间线(月份泳道 + 条目卡)。
|
|
84
|
+
|
|
85
|
+
### T7 文案(Lead)
|
|
86
|
+
`text.ts`:新增全部 key(zh+en 必须成对),`tests/text.spec.ts` 校验 key 对称。
|
|
87
|
+
|
|
88
|
+
### T8 样式装配(Lead)
|
|
89
|
+
`styles.ts` 变成装配层:拼接 `css/shell.ts`、`css/charts.ts`、`css/overview.ts`、`css/detail.ts`、`css/insights.ts`。
|
|
90
|
+
|
|
91
|
+
### T9 验证(Lead)
|
|
92
|
+
- `scripts/lib/local-fixture.mjs`:扩到 6 个项目,覆盖"有进展/无进展/已达成/无金额/已关闭/多体系"。
|
|
93
|
+
- `tests/view.spec.tsx`:按新结构重写断言(视图切换、搜索筛选、键盘、详情分区)。
|
|
94
|
+
- `scripts/ui-verify.mjs`:新增断言(图表存在、视图切换、搜索命中、键盘导航、无占位符、无控制台错误),截图 8 张。
|
|
95
|
+
|
|
96
|
+
## 4. 写作用域(防冲突)
|
|
97
|
+
|
|
98
|
+
| 文件 | 归属 |
|
|
99
|
+
|---|---|
|
|
100
|
+
| `src/types.ts`, `src/store.ts`, `src/gap.ts`, `src/client/text.ts`, `src/client/charts.tsx`, `src/client/css/charts.ts`, `src/client/css/shell.ts`, `src/client/shell.tsx`, `src/client/view.tsx`, `src/client/styles.ts`, `src/client/index.tsx`, tests, scripts, docs | Lead |
|
|
101
|
+
| `src/client/overview.tsx`, `src/client/css/overview.ts` | Teammate A |
|
|
102
|
+
| `src/client/detail.tsx`, `src/client/css/detail.ts` | Teammate B |
|
|
103
|
+
| `src/client/insights.tsx`, `src/client/css/insights.ts` | Teammate C |
|
|
104
|
+
|
|
105
|
+
## 5. CSS 契约(teammates 必须只用这些前缀)
|
|
106
|
+
|
|
107
|
+
- 全局:`.wd-shell` 根,`--wd-*` 变量(不新增语义色,只用 primary/green/amber/red/slate 与其 soft 版本)
|
|
108
|
+
- A:`.pf-*`(portfolio)、`.pcard-*`、`.pboard-*`、`.ptable-*`、`.filter-*`、`.pending-*`
|
|
109
|
+
- B:`.dt-*`(detail rail/hero)、`.dsec-*`、`.prog-*`、`.dim-*`、`.g0-*`、`.plan-*`、`.out-*`
|
|
110
|
+
- C:`.risk-*`、`.tl-*`
|
|
111
|
+
- Lead:`.page-*`、`.toolbar-*`、`.btn`、`.empty-*`、`.failure`、`.modal-*`、`.chart-*`
|
|
112
|
+
|
|
113
|
+
禁止:新增第三方依赖、`document` 全局样式、非 `.wd-shell` 作用域、emoji 图标(用 SVG 或字符)。
|
|
114
|
+
|
|
115
|
+
## 6. 验收
|
|
116
|
+
|
|
117
|
+
1. 总览首屏能回答:钱在哪个阶段、哪个体系、哪个类型、最贵的五个项目、四维覆盖率。
|
|
118
|
+
2. 同一批项目在 卡片/看板/表格 三种形态下数量一致,切换不丢筛选。
|
|
119
|
+
3. 搜索框输入项目名/编号/负责人即时过滤;筛选 chips 可组合、可清除。
|
|
120
|
+
4. 详情页左栏 sticky,右栏滚动;四维/G0/计划/结论各用一种非键值形态。
|
|
121
|
+
5. 键盘:`↑/↓` 选中、`Enter` 打开、`Esc` 返回。
|
|
122
|
+
6. 明暗主题都成立;无第三方依赖;`npm run check` 全绿;浏览器断言 ≥ 55 项且 0 失败。
|
package/docs/DETAIL.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|