@skillre/dsh-plugin-work-dashboard 0.6.0 → 0.10.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/DESIGN-1.0-/344/274/230/345/214/226/346/226/271/346/241/210.md +212 -0
- package/docs/DESIGN-/344/274/232/350/257/235/344/272/214-SuperAgent/344/270/216/344/273/223/345/272/223/346/224/271/351/200/240.md +275 -0
- package/docs/LEDGER-REQUIREMENTS-v3.1.md +367 -0
- package/docs/PLAN-0.7-0.9.md +230 -0
- package/docs/PLAN-v3.1-adaptation.md +237 -0
- package/docs/TARGET-/345/217/260/350/264/246/344/273/223/345/272/223v3.1.md +500 -0
- package/docs//350/200/201Mac-SuperAgent/346/224/271/351/200/240/350/256/260/345/275/225-/347/254/254/344/272/214/346/255/245.md +233 -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 +107 -4
- 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 +284 -44
- package/lib/client/view-contract.d.ts +9 -1
- package/lib/client.js +4836 -968
- package/lib/form.d.ts +278 -0
- package/lib/form.js +1153 -0
- package/lib/gap.d.ts +26 -8
- package/lib/gap.js +88 -17
- package/lib/index.js +29 -0
- package/lib/repo.d.ts +60 -0
- package/lib/repo.js +99 -0
- package/lib/rules.d.ts +105 -0
- package/lib/rules.js +227 -0
- package/lib/signals.d.ts +126 -0
- package/lib/signals.js +238 -0
- package/lib/store.d.ts +16 -1
- package/lib/store.js +92 -11
- package/lib/transport.d.ts +7 -1
- package/lib/transport.js +10 -0
- package/lib/types.d.ts +218 -15
- package/lib/types.js +21 -0
- package/package.json +1 -1
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# 老 Mac SuperAgent 第二步改造记录
|
|
2
|
+
|
|
3
|
+
> 机器:jinchengdedeMacBook-Pro.local / Ventura 13.7.8 / x86_64
|
|
4
|
+
> 入口:`ssh skillre@115.171.85.158 -p 6422`(公网映射,不再是内网 192.168.3.11)
|
|
5
|
+
> 服务:DSH `--profile superagent`,监听 `127.0.0.1:3082`(tmux 会话 `dsh-superagent`)
|
|
6
|
+
> 日期:2026-11-18
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 一、改造前的现场
|
|
11
|
+
|
|
12
|
+
| 项 | 状态 |
|
|
13
|
+
|---|---|
|
|
14
|
+
| 服务 | 运行中,PID 69600,uptime 13 天,`overview.problems = 0` |
|
|
15
|
+
| Policy 规则 | 4 条:poc-data-sync / poc-gap-report / poc-form-export / copy |
|
|
16
|
+
| eval 模式 | `auto`,模型 trae/deepseek-v4.1-flash/high |
|
|
17
|
+
| GitHub Source | `skillre/workbranch`,observeIssues/Pulls/Comments 全开 |
|
|
18
|
+
| **bots 名单** | **缺失** |
|
|
19
|
+
| prompts 技能 | 只有 `poc-review` |
|
|
20
|
+
| 定时器 | 无 |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 二、改造清单
|
|
25
|
+
|
|
26
|
+
### 1. Policy 规则(revision 2 → 3)
|
|
27
|
+
|
|
28
|
+
| 规则 | 变化 |
|
|
29
|
+
|---|---|
|
|
30
|
+
| poc-data-sync / poc-gap-report / poc-form-export | 保留启用 |
|
|
31
|
+
| `copy` | **禁用** —— 代码场景的文案纠错规则,对台账无用 |
|
|
32
|
+
| `visual` | 本就不存在,确认无需新增(也绝不启用) |
|
|
33
|
+
| **poc-daily-advisory** | 新增:只认 `[daily-advisory]` 前缀的 issue,只写 `signals/` |
|
|
34
|
+
| **poc-gate-review** | 新增:判断能否升级,只给建议不改 stage |
|
|
35
|
+
|
|
36
|
+
### 2. GitHub Source 的 bots 名单
|
|
37
|
+
|
|
38
|
+
加入了 `skillre-q`。**但这一项最终不是关键**,原因见第四节。
|
|
39
|
+
|
|
40
|
+
### 3. Prompts(revision 1 → 2)
|
|
41
|
+
|
|
42
|
+
- 新增技能 `advisory-write`:每日巡检的执行规范(先跑校验、只写 signals、幂等、健康度分两层)
|
|
43
|
+
- 新增技能 `gate-review`:Gate 评审的判定表与输出格式
|
|
44
|
+
- 重写 `delivery`:原文写的是"UI 截图证据",对无 UI 的台账毫无意义,改为
|
|
45
|
+
"路径 + 命令 + 输出",并写明派生值不得手改、progress 只追加
|
|
46
|
+
|
|
47
|
+
### 4. 定时器
|
|
48
|
+
|
|
49
|
+
| 文件 | 作用 |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `~/bin/daily-advisory.sh` | 每天 08:30 由 launchd 调用,开一个 advisory issue |
|
|
52
|
+
| `~/bin/advisory-body.md` | issue 正文(单独成文件,见第六节的坑) |
|
|
53
|
+
| `~/bin/gh-human` | gh 包装器,固定在**主账号** skillre |
|
|
54
|
+
| `~/Library/LaunchAgents/com.skillre.poc-advisory.plist` | launchd 任务,`StartCalendarInterval` 08:30 |
|
|
55
|
+
|
|
56
|
+
### 5. 执行环境(executor revision 3 → 4)
|
|
57
|
+
|
|
58
|
+
`prepare` 由单行 `git clone` 改为 `bash ~/bin/prepare-workbranch.sh`,原因见第五节。
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 三、为什么定时器必须用主账号
|
|
63
|
+
|
|
64
|
+
这是本次最重要的发现,也是唯一**无法靠配置绕过**的。
|
|
65
|
+
|
|
66
|
+
源码 `src/sources/github.ts` 的 `readStream` 里有一行:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
if (sameName(item.user.login, login)) continue
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`login` 是 agent 账号(skillre-q)。也就是说:**agent 账号自己创建的 issue,
|
|
73
|
+
在进入 eval 之前就被丢弃了**,连 Policy 都不会看到。
|
|
74
|
+
|
|
75
|
+
实测验证:
|
|
76
|
+
|
|
77
|
+
| issue | 创建者 | 结果 |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| #10 | skillre-q(agent) | **没有 thread、没有 decision**,完全消失 |
|
|
80
|
+
| #11 | skillre(人) | 进入 thread,`evaluating` → `accept` |
|
|
81
|
+
|
|
82
|
+
所以:
|
|
83
|
+
- 把 `skillre-q` 加进 bots 名单**解决不了**这个问题——bots 名单管的是"收到之后能做什么",
|
|
84
|
+
管不了"能不能收到"。
|
|
85
|
+
- 定时器必须用 **gh-human(主账号)** 开 issue。
|
|
86
|
+
- 副作用是好的:巡检本身也变成"人发起的",符合"agent 不能给自己派活"的原则。
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 四、端到端验证证据
|
|
91
|
+
|
|
92
|
+
Issue #15(主账号创建、标题带 `[daily-advisory]`):
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
thread: github:15
|
|
96
|
+
strength: inferred
|
|
97
|
+
rules: poc-daily-advisory → matched: true
|
|
98
|
+
mandate: basis.via = admission / cell = listedUnaddressed / observation.mode = auto
|
|
99
|
+
ticket: 88ac7aaa7e59f5aa00fb8e21bd292da4 → working
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
未匹配的三条规则各自给出了理由(poc-data-sync 说"这是 advisory 运行不是改 projects"、
|
|
103
|
+
poc-gap-report 说"这是标题限定的巡检不是通用扫描"),说明规则边界是有效的,
|
|
104
|
+
不是靠"匹配第一条"蒙对的。
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 五、prepare 命令的两个真实故障
|
|
109
|
+
|
|
110
|
+
两个都表现为 Ticket 摘要里的 `The prepare command failed`,看起来像权限问题,实际是网络。
|
|
111
|
+
|
|
112
|
+
| 错误 | 原因 | 处理 |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| `Failed to connect to github.com port 443 after 75004 ms` | 本机走 `127.0.0.1:7890` 代理(Clash Party),代理偶发抖动;git 默认超时 75 秒,一次失败就整单失败 | 重试 4 次,间隔 4 秒 |
|
|
115
|
+
| `Error in the HTTP2 framing layer` | 代理会回收连接,HTTP/2 多路复用在其上不稳定 | 强制 `http.version=HTTP/1.1`,加大 `http.postBuffer`,设 `lowSpeedLimit/Time` |
|
|
116
|
+
|
|
117
|
+
**注意**:没有关掉全局代理。代理本身是通的(`curl -x 127.0.0.1:7890` 返回 200),
|
|
118
|
+
关掉反而会换一条完全不同的网络路径。
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 六、写脚本时踩的三个坑
|
|
123
|
+
|
|
124
|
+
1. **反引号被 shell 吃掉**。issue 正文里写 ``node tools/derive.mjs``,在双引号赋值里
|
|
125
|
+
被当成命令替换执行,正文变成空串。现象是 issue 里出现「先跑 与 」两个空洞。
|
|
126
|
+
→ 正文改为独立文件 `~/bin/advisory-body.md`,脚本用 `--body-file` 传。
|
|
127
|
+
2. **`timeout` 命令 macOS 没有**。诊断脚本里用了 GNU `timeout`,Ventura 上直接报
|
|
128
|
+
command not found。
|
|
129
|
+
3. **node 不在非交互 PATH 里**。`ssh` 执行时 `node` 找不到,必须用
|
|
130
|
+
`~/.local/bin/node`(v22.23.2)的绝对路径。
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 七、日常运维
|
|
135
|
+
|
|
136
|
+
```sh
|
|
137
|
+
# 看服务
|
|
138
|
+
ssh -p 6422 skillre@115.171.85.158 'launchctl list | grep poc-advisory'
|
|
139
|
+
|
|
140
|
+
# 手动触发一次巡检(会先查重,已开则不重复创建)
|
|
141
|
+
ssh -p 6422 skillre@115.171.85.158 '~/bin/daily-advisory.sh; tail -3 ~/Library/Logs/poc-daily-advisory.log'
|
|
142
|
+
|
|
143
|
+
# 看最近决策
|
|
144
|
+
curl -s -H "x-orchestrator-request: 1" http://127.0.0.1:3082/orchestrator/api/decisions
|
|
145
|
+
|
|
146
|
+
# 两个身份
|
|
147
|
+
~/bin/gh-human api user --jq .login # skillre(定时器、人)
|
|
148
|
+
~/.local/bin/gh-agent api user --jq .login # skillre-q(agent 干活)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
备份在 `~/superagent-config-backup/`(settings 与 prompts,改造前各一份)。
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## 八、尚未完成
|
|
156
|
+
|
|
157
|
+
- **worker 执行时长未收敛**:首次运行截至记录时已 8 分钟仍在 working。
|
|
158
|
+
30 个项目 × 每个一份 `signals/` 是主要原因。若常态超过 15 分钟,
|
|
159
|
+
需要把全量拆成"只写有变化的项目"。
|
|
160
|
+
- **幂等尚未实测**:`project_sha + rules_sha` 都没变时是否真的跳过,
|
|
161
|
+
要等第二次运行才能验证。
|
|
162
|
+
- **飞书提醒未收敛**:仍是原样。
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 九、增补:指纹幂等(2026-11-18 晚)
|
|
166
|
+
|
|
167
|
+
### 问题
|
|
168
|
+
|
|
169
|
+
首轮巡检产出了 PR #16:**1498 行、30 个文件、全部新增**。下一次运行会同样重写全部
|
|
170
|
+
30 个文件,即使台账一个字都没改。
|
|
171
|
+
|
|
172
|
+
后果不是「浪费时间」,而是:审阅者看完第一屏就放弃,然后无条件合并。
|
|
173
|
+
一旦形成这个习惯,真正的异常改动也会被一起合进去。
|
|
174
|
+
|
|
175
|
+
### 做法
|
|
176
|
+
|
|
177
|
+
`tools/derive.mjs` 新增 `--fingerprints`,每行一个项目:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
POC-006 411439995586a380
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
指纹 = 「项目记录 + `config/rules.yaml`」规范化 JSON(键序排序)后 sha256 前 16 位。
|
|
184
|
+
|
|
185
|
+
| 发生什么 | 指纹 | 巡检行为 |
|
|
186
|
+
|---|---|---|
|
|
187
|
+
| 项目没变 | 不变 | **跳过** |
|
|
188
|
+
| 项目改了 | 变化 | 重算重写 |
|
|
189
|
+
| **规则阈值改了** | **全部变化** | **全部重算** |
|
|
190
|
+
|
|
191
|
+
最后一条是关键:改一次 `large_amount_wan`,旧结论必须全部失效,否则看板上会留着
|
|
192
|
+
按旧阈值算出来的判断而没人知道它是旧的。
|
|
193
|
+
|
|
194
|
+
指纹**只取输入、不含时间戳**——同样输入永远同样指纹,否则跳过规则永不触发。
|
|
195
|
+
|
|
196
|
+
### 契约变化
|
|
197
|
+
|
|
198
|
+
| 项 | 变化 |
|
|
199
|
+
|---|---|
|
|
200
|
+
| `signals/*.yaml` 的 `fingerprint` | **新增必填**,唯一幂等键 |
|
|
201
|
+
| `inputs.project_sha / rules_sha` | **移除**。两个 blob sha 漏掉了「规则变但项目没变」这一整类失效 |
|
|
202
|
+
| `fingerprint` 缺失时 | 按「有变化」处理,宁可重算不要漏 |
|
|
203
|
+
|
|
204
|
+
### 实测验证
|
|
205
|
+
|
|
206
|
+
拿首轮的 30 个真实 signal 做对照:
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
第一轮(旧文件无 fingerprint):
|
|
210
|
+
unchanged (skip): 0
|
|
211
|
+
changed (rewrite): 30 ← 全部保守重算,符合「宁可重算不漏」
|
|
212
|
+
|
|
213
|
+
盖上 fingerprint 后第二轮:
|
|
214
|
+
unchanged (skip): 30
|
|
215
|
+
changed (rewrite): 0 ← 幂等生效
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### 配置同步
|
|
219
|
+
|
|
220
|
+
| 项 | 版本 | 状态 |
|
|
221
|
+
|---|---|---|
|
|
222
|
+
| Policy `poc-daily-advisory` | rev 3 → **4** | 已改为增量语义,含「无变化则不开 PR」 |
|
|
223
|
+
| 技能 `advisory-write` | rev 2 → **3** | 已加入指纹比对三步法 |
|
|
224
|
+
|
|
225
|
+
### PR
|
|
226
|
+
|
|
227
|
+
- **PR #17**(+111 行 / 3 文件):指纹能力与契约升级,CI 已通过
|
|
228
|
+
- **PR #16 已关闭**:它是改造前的全量产物,没有 `fingerprint` 字段,合入会让跳过逻辑失效
|
|
229
|
+
|
|
230
|
+
### 待办
|
|
231
|
+
|
|
232
|
+
- 等 #17 合入后由新版本重跑一次,验证真实环境下的增量行为
|
|
233
|
+
- 届时第一轮仍会重写 30 个(补 fingerprint),第二轮起才进入跳过状态
|
|
@@ -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 };
|
package/lib/blockers.js
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
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 { daysSince, latestProgress, normalizeStage, numberOrNull, scanGaps, text } from './gap.js';
|
|
31
|
+
import { BLOCKER_SOURCES } from './types.js';
|
|
32
|
+
/** Severity and sort weight for one source. */
|
|
33
|
+
const SOURCE_META = {
|
|
34
|
+
// A stalled project is losing money right now; nothing else outranks it.
|
|
35
|
+
stalled: { level: 'high', priority: 88 },
|
|
36
|
+
// No progress at all is the "invisible work" case the timeline also flags.
|
|
37
|
+
'no-progress': { level: 'high', priority: 86 },
|
|
38
|
+
'missing-amount': { level: 'medium', priority: 58 },
|
|
39
|
+
// The gap rules carry their own priority; this is only the fallback.
|
|
40
|
+
gap: { level: 'high', priority: 80 },
|
|
41
|
+
'no-stage-since': { level: 'medium', priority: 44 },
|
|
42
|
+
};
|
|
43
|
+
/** An empty count map, so every source key exists even at zero. */
|
|
44
|
+
function emptyCounts() {
|
|
45
|
+
return { gap: 0, stalled: 0, 'missing-amount': 0, 'no-progress': 0, 'no-stage-since': 0 };
|
|
46
|
+
}
|
|
47
|
+
/** One row from a gap finding; the rule's own level and priority win. */
|
|
48
|
+
function fromGap(item, stageLabel) {
|
|
49
|
+
return {
|
|
50
|
+
source: 'gap',
|
|
51
|
+
level: item.level,
|
|
52
|
+
priority: item.priority,
|
|
53
|
+
pocId: item.pocId,
|
|
54
|
+
pocName: item.pocName,
|
|
55
|
+
stageLabel,
|
|
56
|
+
rule: item.rule,
|
|
57
|
+
ruleNo: item.ruleNo,
|
|
58
|
+
params: item.params ?? {},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** One row from a non-gap source. */
|
|
62
|
+
function fromSource(source, record, stageLabel, params = {}) {
|
|
63
|
+
const meta = SOURCE_META[source];
|
|
64
|
+
const pocId = text(record.poc_id);
|
|
65
|
+
const name = text(record.name);
|
|
66
|
+
return {
|
|
67
|
+
source,
|
|
68
|
+
level: meta.level,
|
|
69
|
+
priority: meta.priority,
|
|
70
|
+
pocId,
|
|
71
|
+
pocName: name === '' ? pocId : name,
|
|
72
|
+
stageLabel,
|
|
73
|
+
rule: null,
|
|
74
|
+
ruleNo: 0,
|
|
75
|
+
params,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Whether the record has any progress entry at all.
|
|
80
|
+
*
|
|
81
|
+
* `latestProgress` is the single definition of "the newest entry" in this
|
|
82
|
+
* codebase; using it here keeps the board, the summary and the detail page in
|
|
83
|
+
* agreement about what counts as activity.
|
|
84
|
+
*/
|
|
85
|
+
function hasProgress(record) {
|
|
86
|
+
return latestProgress(record) !== null;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Build the blocker board from the loaded records.
|
|
90
|
+
*
|
|
91
|
+
* Ordering: a global priority descending, then project id, then source. The
|
|
92
|
+
* gap rules keep their own weights (R11 outranks R2, and so on), so this list
|
|
93
|
+
* is a merge of rankings rather than a re-ranking — which is the point: the
|
|
94
|
+
* most valuable finding must not sink because it came from a smaller source.
|
|
95
|
+
*/
|
|
96
|
+
export function buildBlockerBoard(records, options) {
|
|
97
|
+
const rows = [];
|
|
98
|
+
const counts = emptyCounts();
|
|
99
|
+
const blocked = new Set();
|
|
100
|
+
for (const record of records) {
|
|
101
|
+
const pocId = text(record.poc_id);
|
|
102
|
+
const rawStage = text(record.stage);
|
|
103
|
+
const { closed } = normalizeStage(record.stage);
|
|
104
|
+
const stageLabel = closed ? 'closed' : rawStage;
|
|
105
|
+
const before = rows.length;
|
|
106
|
+
// 1. The twelve rules. Delegated, never reimplemented.
|
|
107
|
+
for (const item of scanGaps(record, options)) {
|
|
108
|
+
rows.push(fromGap(item, stageLabel));
|
|
109
|
+
counts.gap += 1;
|
|
110
|
+
}
|
|
111
|
+
// 2. Stalled: the stage clock exists AND has run out. R12 already reports
|
|
112
|
+
// exactly this case, so the row is only added when R12 did not fire —
|
|
113
|
+
// otherwise the same fact would appear twice under two labels.
|
|
114
|
+
const since = text(record.stage_since);
|
|
115
|
+
const isDated = /^\d{4}-\d{2}-\d{2}$/.test(since);
|
|
116
|
+
const stalledDays = isDated ? daysSince(since, options.now) : null;
|
|
117
|
+
const r12Fired = rows.some((row) => row.pocId === pocId && row.rule === 'R12-stage-stalled');
|
|
118
|
+
if (stalledDays !== null && stalledDays > options.stallDays && !r12Fired) {
|
|
119
|
+
rows.push(fromSource('stalled', record, stageLabel, { days: stalledDays, stallDays: options.stallDays }));
|
|
120
|
+
counts.stalled += 1;
|
|
121
|
+
}
|
|
122
|
+
// 3. Missing amount. `0` is the ledger's "not filled", not "free".
|
|
123
|
+
if ((numberOrNull(record.amount_wan) ?? 0) === 0) {
|
|
124
|
+
rows.push(fromSource('missing-amount', record, stageLabel));
|
|
125
|
+
counts['missing-amount'] += 1;
|
|
126
|
+
}
|
|
127
|
+
// 4. No progress at all.
|
|
128
|
+
if (!hasProgress(record)) {
|
|
129
|
+
rows.push(fromSource('no-progress', record, stageLabel));
|
|
130
|
+
counts['no-progress'] += 1;
|
|
131
|
+
}
|
|
132
|
+
// 5. The stall clock never started.
|
|
133
|
+
if (!isDated) {
|
|
134
|
+
rows.push(fromSource('no-stage-since', record, stageLabel));
|
|
135
|
+
counts['no-stage-since'] += 1;
|
|
136
|
+
}
|
|
137
|
+
if (rows.length > before)
|
|
138
|
+
blocked.add(pocId);
|
|
139
|
+
}
|
|
140
|
+
rows.sort((left, right) => right.priority - left.priority ||
|
|
141
|
+
left.pocId.localeCompare(right.pocId) ||
|
|
142
|
+
left.source.localeCompare(right.source));
|
|
143
|
+
return {
|
|
144
|
+
rows,
|
|
145
|
+
counts,
|
|
146
|
+
projectsBlocked: blocked.size,
|
|
147
|
+
projectsTotal: records.length,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/** An empty board for the cold-cache case, so the Client needs no null check. */
|
|
151
|
+
export function emptyBlockerBoard() {
|
|
152
|
+
return {
|
|
153
|
+
rows: [],
|
|
154
|
+
counts: emptyCounts(),
|
|
155
|
+
projectsBlocked: 0,
|
|
156
|
+
projectsTotal: 0,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
/** Every source key, re-exported so the Client can build its chips. */
|
|
160
|
+
export { BLOCKER_SOURCES };
|
package/lib/client/api.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* boundary — only lossless JSON.
|
|
9
9
|
*/
|
|
10
10
|
import type { ClientConnectionLike } from './contracts.js';
|
|
11
|
-
import type { GlobalTimeline, ProjectDetail, RefreshOutcome, RiskBoard, Snapshot } from '../types.js';
|
|
11
|
+
import type { ExportFormResult, GlobalTimeline, ProjectDetail, RefreshOutcome, RiskBoard, Snapshot } from '../types.js';
|
|
12
12
|
/** Failure raised by the Host; `code` is stable enough to switch on. */
|
|
13
13
|
export declare class ActionError extends Error {
|
|
14
14
|
readonly code: string;
|
|
@@ -30,6 +30,13 @@ export interface ClientApi {
|
|
|
30
30
|
risks(signal?: AbortSignal): Promise<RiskBoard>;
|
|
31
31
|
/** Rounds across all projects, newest first. */
|
|
32
32
|
timeline(signal?: AbortSignal): Promise<GlobalTimeline>;
|
|
33
|
+
/**
|
|
34
|
+
* Build the collection form.
|
|
35
|
+
*
|
|
36
|
+
* Generated on the Host because the generator needs the YAML serializer, which
|
|
37
|
+
* must not be bundled into the browser module.
|
|
38
|
+
*/
|
|
39
|
+
exportForm(mode: 'fill' | 'blank', pocIds: readonly string[], signal?: AbortSignal): Promise<ExportFormResult>;
|
|
33
40
|
}
|
|
34
41
|
/** Create the API bound to this plugin's Fiber lifetime. */
|
|
35
42
|
export declare function createApi(connection: ClientConnectionLike, lifetime: AbortSignal): ClientApi;
|
package/lib/client/api.js
CHANGED
|
@@ -40,5 +40,6 @@ export function createApi(connection, lifetime) {
|
|
|
40
40
|
detail: (pocId, signal) => call({ action: 'detail', pocId }, signal),
|
|
41
41
|
risks: (signal) => call({ action: 'risks' }, signal),
|
|
42
42
|
timeline: (signal) => call({ action: 'timeline' }, signal),
|
|
43
|
+
exportForm: (mode, pocIds, signal) => call({ action: 'export-form', mode, pocIds: [...pocIds] }, signal),
|
|
43
44
|
};
|
|
44
45
|
}
|
package/lib/client/css/base.d.ts
CHANGED
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
* Everything is scoped under `.wd-shell`, and the sheet lives in a `<style>`
|
|
29
29
|
* element React removes on unmount, so nothing leaks into product DOM.
|
|
30
30
|
*/
|
|
31
|
-
export declare const BASE_CSS = "\n.wd-shell {\n /* Brand + status palette (DESIGN.md), with soft tints derived from each. */\n --wd-primary: #2864E8;\n --wd-primary-deep: #1B4FC2;\n --wd-primary-soft: rgba(40, 100, 232, .09);\n --wd-primary-ring: rgba(40, 100, 232, .26);\n --wd-text: #192638;\n --wd-bg: #F5F7FB;\n --wd-border: #E6EBF2;\n --wd-green: #218568;\n --wd-amber: #B77919;\n --wd-red: #C0392B;\n --wd-slate: #5A6A80;\n --wd-green-soft: rgba(33, 133, 104, .10);\n --wd-amber-soft: rgba(183, 121, 25, .11);\n --wd-red-soft: rgba(192, 57, 43, .10);\n --wd-slate-soft: rgba(90, 106, 128, .10);\n\n /* Surface ramp: canvas \u2192 card \u2192 inset. */\n --wd-canvas: #F5F7FB;\n --wd-surface: #FFFFFF;\n --wd-inset: #F7F9FC;\n --wd-hairline: #E6EBF2;\n\n /* One shadow ramp; three steps is enough for any depth in this UI. */\n --wd-shadow-1: 0 1px 2px rgba(20, 32, 52, .05);\n --wd-shadow-2: 0 2px 6px rgba(20, 32, 52, .07), 0 1px 2px rgba(20, 32, 52, .04);\n --wd-shadow-3: 0 10px 30px rgba(20, 32, 52, .12), 0 2px 8px rgba(20, 32, 52, .06);\n\n height: 100%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n background: var(--wd-canvas);\n color: var(--wd-text);\n font-family: 'Avenir Next', 'PingFang SC', system-ui, -apple-system, sans-serif;\n font-size: 13px;\n line-height: 20px;\n -webkit-font-smoothing: antialiased;\n}\nbody[data-ds-dark-theme] .wd-shell {\n --wd-text: #E8EDF5;\n --wd-bg: #14181F;\n --wd-border: #2A3341;\n --wd-green: #4FC59B;\n --wd-amber: #E0A94A;\n --wd-red: #F07A6B;\n --wd-slate: #97A6BA;\n --wd-primary: #6E9BFF;\n --wd-primary-deep: #8DB0FF;\n --wd-primary-soft: rgba(110, 155, 255, .14);\n --wd-primary-ring: rgba(110, 155, 255, .32);\n --wd-green-soft: rgba(79, 197, 155, .14);\n --wd-amber-soft: rgba(224, 169, 74, .16);\n --wd-red-soft: rgba(240, 122, 107, .14);\n --wd-slate-soft: rgba(151, 166, 186, .14);\n --wd-canvas: #14181F;\n --wd-surface: #1B2029;\n --wd-inset: #222834;\n --wd-hairline: #2A3341;\n --wd-shadow-1: 0 1px 2px rgba(0, 0, 0, .28);\n --wd-shadow-2: 0 2px 8px rgba(0, 0, 0, .34), 0 1px 2px rgba(0, 0, 0, .24);\n --wd-shadow-3: 0 12px 34px rgba(0, 0, 0, .48), 0 2px 8px rgba(0, 0, 0, .3);\n}\n.wd-shell *, .wd-shell *::before, .wd-shell *::after { box-sizing: border-box; }\n.wd-shell button, .wd-shell input, .wd-shell select { font: inherit; color: inherit; }\n.wd-shell:focus { outline: none; }\n\n/* ---------- shell: rail + canvas ---------- */\n.wd-shell .page { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }\n\n.wd-shell .module-rail {\n flex: 0 0 auto;\n display: flex; align-items: center; gap: 6px;\n padding: 10px 32px 0;\n}\n.wd-shell .module-tab {\n display: inline-flex; align-items: center; gap: 7px;\n height: 30px; padding: 0 12px;\n border: 1px solid transparent; border-radius: 8px 8px 0 0;\n background: transparent; color: var(--dsw-alias-label-secondary);\n cursor: pointer; font-size: 12.5px; font-weight: 500;\n border-bottom: 0; position: relative; top: 1px;\n}\n.wd-shell .module-tab[data-active=\"true\"] {\n background: var(--wd-surface); color: var(--wd-text);\n border-color: var(--wd-hairline); font-weight: 600;\n}\n.wd-shell .module-tab:not([data-active=\"true\"]):hover { background: var(--wd-primary-soft); color: var(--wd-text); }\n.wd-shell .module-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-primary); flex: none; }\n.wd-shell .module-tab[data-active=\"false\"] .module-tab-dot { background: var(--wd-slate); opacity: .55; }\n.wd-shell .module-rail-hint { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }\n\n/* ---------- page header ---------- */\n.wd-shell .page-header {\n flex: 0 0 auto;\n display: flex; align-items: flex-start; gap: 16px;\n padding: 14px 28px 12px;\n background: var(--wd-surface);\n border: 1px solid var(--wd-hairline);\n box-shadow: var(--wd-shadow-1);\n position: relative; z-index: 2;\n}\n.wd-shell .page-header-text { flex: 1 1 auto; min-width: 0; }\n.wd-shell .page-eyebrow {\n display: flex; align-items: center; gap: 6px;\n font-size: 11px; line-height: 16px; letter-spacing: .06em;\n text-transform: uppercase; color: var(--dsw-alias-label-tertiary);\n margin: 0 0 3px;\n}\n.wd-shell .page-title {\n margin: 0; font-size: 19px; line-height: 25px; font-weight: 650;\n letter-spacing: -.01em; display: flex; align-items: center; gap: 10px;\n}\n.wd-shell .page-subtitle { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); }\n.wd-shell .page-source {\n margin: 4px 0 0; font-size: 10.5px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary);\n display: flex; gap: 7px; flex-wrap: wrap; align-items: center;\n}\n.wd-shell .page-source code {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;\n padding: 2px 7px; border-radius: 5px;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n}\n.wd-shell .header-actions { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }\n.wd-shell .page-body {\n flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;\n padding: 16px 28px 36px;\n}\n.wd-shell .detail-body {\n flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;\n padding: 0;\n}\n.wd-shell .page-footer {\n flex: 0 0 auto; display: flex; align-items: center; gap: 10px;\n padding: 8px 32px; min-height: 32px;\n border-top: 1px solid var(--wd-hairline);\n background: var(--wd-surface);\n font-size: 11.5px; color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .page-footer .spacer { flex: 1 1 auto; }\n\n/* ---------- search (inside the toolbar) ---------- */\n.wd-shell .search-box {\n position: relative; display: flex; align-items: center;\n width: min(300px, 100%); flex: 0 1 300px;\n height: 28px; padding: 0 9px 0 27px;\n border: 1px solid var(--wd-hairline); border-radius: 9px;\n background: var(--wd-inset);\n transition: border-color .13s ease, background .13s ease, box-shadow .13s ease;\n}\n.wd-shell .search-box:focus-within {\n border-color: var(--wd-primary); background: var(--wd-surface);\n box-shadow: 0 0 0 3px var(--wd-primary-soft);\n}\n.wd-shell .search-glyph {\n position: absolute; left: 9px; top: 50%; transform: translateY(-50%);\n font-size: 14px; line-height: 1; color: var(--dsw-alias-label-tertiary);\n pointer-events: none;\n}\n.wd-shell .search-input {\n flex: 1 1 auto; min-width: 0; height: 100%;\n border: 0; background: transparent; outline: none;\n font-size: 12.5px;\n}\n.wd-shell .search-input::placeholder { color: var(--dsw-alias-label-tertiary); }\n.wd-shell .search-input::-webkit-search-cancel-button { display: none; }\n.wd-shell .search-clear {\n flex: none; width: 18px; height: 18px; border-radius: 50%;\n border: 0; background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);\n font-size: 12px; line-height: 1; cursor: pointer;\n display: flex; align-items: center; justify-content: center;\n}\n.wd-shell .search-clear:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }\n.wd-shell .footer-hint { font-size: 10px; color: var(--dsw-alias-label-tertiary); white-space: nowrap; }\n\n/* ---------- toolbar ---------- */\n.wd-shell .toolbar {\n flex: 0 0 auto;\n display: flex; flex-direction: column; gap: 6px;\n padding: 8px 28px 9px;\n background: var(--wd-surface);\n border-bottom: 1px solid var(--wd-hairline);\n box-shadow: var(--wd-shadow-1);\n position: relative; z-index: 1;\n}\n.wd-shell .toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; }\n/* The filter strip is ONE scrolling line. Wrapping it onto three lines cost the\n project list most of the first screen, which is the opposite of the point. */\n.wd-shell .toolbar-row-filters {\n gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;\n padding-bottom: 2px; scrollbar-width: thin;\n}\n.wd-shell .toolbar-row-filters .toolbar-group { flex: none; }\n.wd-shell .toolbar-group { display: flex; align-items: center; gap: 7px; min-width: 0; }\n.wd-shell .toolbar-group-label {\n flex: none; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;\n color: var(--dsw-alias-label-tertiary); font-weight: 600;\n}\n.wd-shell .chip-scroll { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; min-width: 0; }\n.wd-shell .filter-chip {\n display: inline-flex; align-items: center; gap: 5px;\n height: 24px; padding: 0 9px;\n border: 1px solid var(--wd-hairline); border-radius: 20px;\n background: var(--wd-surface); color: var(--dsw-alias-label-secondary);\n font-size: 11.5px; cursor: pointer; white-space: nowrap;\n transition: background .12s ease, border-color .12s ease, color .12s ease;\n}\n.wd-shell .filter-chip:hover:not([disabled]) { background: var(--wd-inset); color: var(--wd-text); }\n.wd-shell .filter-chip[data-active=\"true\"] {\n background: var(--wd-primary-soft); border-color: var(--wd-primary);\n color: var(--wd-primary); font-weight: 600;\n}\n.wd-shell .filter-chip[disabled] { opacity: .4; cursor: default; }\n.wd-shell .filter-chip-count {\n font-size: 10px; font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-tertiary); font-weight: 500;\n}\n.wd-shell .filter-chip[data-active=\"true\"] .filter-chip-count { color: var(--wd-primary); }\n.wd-shell .view-switch {\n display: inline-flex; align-items: center; padding: 2px;\n border: 1px solid var(--wd-hairline); border-radius: 9px;\n background: var(--wd-inset); gap: 2px;\n}\n.wd-shell .view-switch-btn {\n height: 24px; padding: 0 11px; border: 0; border-radius: 7px;\n background: transparent; color: var(--dsw-alias-label-secondary);\n font-size: 11.5px; cursor: pointer; white-space: nowrap;\n transition: background .12s ease, color .12s ease, box-shadow .12s ease;\n}\n.wd-shell .view-switch-btn:hover:not([data-active=\"true\"]) { color: var(--wd-text); }\n.wd-shell .view-switch-btn[data-active=\"true\"] {\n background: var(--wd-surface); color: var(--wd-text); font-weight: 600;\n box-shadow: var(--wd-shadow-1);\n}\n.wd-shell .sort-switch { display: inline-flex; align-items: center; gap: 4px; }\n.wd-shell .sort-select {\n height: 26px; padding: 0 8px; border-radius: 7px;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n color: var(--dsw-alias-label-secondary); font-size: 11.5px; cursor: pointer;\n}\n.wd-shell .sort-select:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }\n.wd-shell .toolbar-result { margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n\n/* ---------- buttons ---------- */\n.wd-shell .btn {\n height: 30px; padding: 0 12px;\n display: inline-flex; align-items: center; gap: 6px;\n border-radius: 8px; border: 1px solid var(--wd-hairline);\n background: var(--wd-surface); color: var(--dsw-alias-label-secondary);\n cursor: pointer; white-space: nowrap; font-size: 12.5px;\n transition: background .13s ease, border-color .13s ease, box-shadow .13s ease, transform .06s ease;\n box-shadow: var(--wd-shadow-1);\n}\n.wd-shell .btn:hover:not([disabled]) {\n background: var(--wd-inset); color: var(--wd-text);\n border-color: var(--dsw-alias-border-l2); box-shadow: var(--wd-shadow-2);\n}\n.wd-shell .btn:active:not([disabled]) { transform: translateY(1px); box-shadow: var(--wd-shadow-1); }\n.wd-shell .btn:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 2px; }\n.wd-shell .btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }\n.wd-shell .btn-primary {\n background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);\n border-color: transparent; color: #fff; font-weight: 550;\n box-shadow: 0 1px 2px rgba(40, 100, 232, .3), 0 4px 12px rgba(40, 100, 232, .18);\n}\n.wd-shell .btn-primary:hover:not([disabled]) {\n background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);\n color: #fff; filter: brightness(1.07);\n box-shadow: 0 2px 4px rgba(40, 100, 232, .32), 0 8px 20px rgba(40, 100, 232, .22);\n}\n.wd-shell .btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }\n.wd-shell .btn-ghost:hover:not([disabled]) { background: var(--wd-inset); box-shadow: none; }\n.wd-shell .btn-small { height: 25px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }\n.wd-shell .btn-icon { width: 26px; padding: 0; justify-content: center; font-size: 12px; }\n\n/* ---------- shared atoms ---------- */\n.wd-shell .chip {\n display: inline-flex; align-items: center; gap: 4px;\n padding: 2px 9px; border-radius: 20px; font-size: 11.5px; line-height: 18px;\n background: var(--wd-inset); color: var(--dsw-alias-label-secondary);\n border: 1px solid var(--wd-hairline);\n}\n.wd-shell .chip-row { display: flex; flex-wrap: wrap; gap: 6px; }\n.wd-shell .chip-button { border: 0; cursor: pointer; font-family: inherit; }\n.wd-shell .chip-button:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }\n.wd-shell .status-pill {\n display: inline-flex; align-items: center; gap: 5px;\n height: 21px; padding: 0 9px; border-radius: 20px;\n font-size: 11px; font-weight: 550; white-space: nowrap;\n background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);\n}\n.wd-shell .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-slate); flex: none; }\n.wd-shell .tone-blue { background: var(--wd-primary-soft); color: var(--wd-primary); }\n.wd-shell .tone-blue .status-dot { background: var(--wd-primary); }\n.wd-shell .tone-green { background: var(--wd-green-soft); color: var(--wd-green); }\n.wd-shell .tone-green .status-dot { background: var(--wd-green); }\n.wd-shell .tone-amber { background: var(--wd-amber-soft); color: var(--wd-amber); }\n.wd-shell .tone-amber .status-dot { background: var(--wd-amber); }\n.wd-shell .tone-red { background: var(--wd-red-soft); color: var(--wd-red); }\n.wd-shell .tone-red .status-dot { background: var(--wd-red); }\n.wd-shell .tone-slate { background: var(--wd-slate-soft); color: var(--wd-slate); }\n.wd-shell .tone-slate .status-dot { background: var(--wd-slate); }\n.wd-shell .is-muted { color: var(--dsw-alias-label-tertiary); font-style: italic; }\n.wd-shell .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }\n.wd-shell .prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 19px; color: var(--dsw-alias-label-secondary); }\n\n/* ---------- empty / failure ---------- */\n.wd-shell .empty-state {\n margin: 0 auto; max-width: 440px; padding: 56px 24px;\n text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px;\n}\n.wd-shell .empty-icon {\n width: 76px; height: 76px; border-radius: 18px;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n display: flex; align-items: center; justify-content: center;\n color: var(--dsw-alias-label-tertiary); margin-bottom: 10px;\n box-shadow: var(--wd-shadow-2);\n}\n.wd-shell .empty-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 650; }\n.wd-shell .empty-copy { margin: 0 0 12px; font-size: 12.5px; line-height: 19px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n.wd-shell .empty-meta { margin-top: 16px; font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }\n.wd-shell .failure {\n border: 1px solid var(--wd-red-soft); border-radius: 10px;\n background: var(--wd-red-soft); padding: 13px 15px;\n display: flex; align-items: flex-start; gap: 11px;\n border-left: 3px solid var(--wd-red);\n}\n.wd-shell .failure-text { min-width: 0; flex: 1 1 auto; }\n.wd-shell .failure-title { font-size: 13px; line-height: 19px; font-weight: 650; color: var(--wd-red); }\n.wd-shell .failure-reason { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n.wd-shell .spinner {\n display: inline-block; width: 12px; height: 12px;\n border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;\n animation: wd-spin .9s linear infinite; opacity: .8;\n}\n@keyframes wd-spin { to { transform: rotate(360deg); } }\n\n/* ---------- settings modal ---------- */\n.wd-shell .modal-overlay {\n position: fixed; inset: 0; z-index: 40;\n display: flex; align-items: center; justify-content: center; padding: 24px;\n background: rgba(12, 18, 28, .46);\n backdrop-filter: blur(2px);\n}\n.wd-shell .modal {\n width: min(452px, 100%); max-height: 86vh;\n display: flex; flex-direction: column;\n border-radius: 14px; border: 1px solid var(--dsw-alias-border-l2);\n background: var(--wd-surface);\n box-shadow: var(--wd-shadow-3);\n overflow: hidden;\n}\n.wd-shell .modal-header { display: flex; align-items: center; gap: 9px; padding: 15px 19px; border-bottom: 1px solid var(--wd-hairline); }\n.wd-shell .modal-title { margin: 0; font-size: 14.5px; line-height: 21px; font-weight: 650; }\n.wd-shell .modal-content { padding: 15px 19px; display: flex; flex-direction: column; gap: 5px; overflow: auto; }\n.wd-shell .modal-footer { display: flex; align-items: center; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--wd-hairline); background: var(--wd-inset); }\n.wd-shell .modal-footer .spacer { flex: 1 1 auto; }\n.wd-shell .checkbox-row {\n display: flex; align-items: center; gap: 10px;\n padding: 9px 11px; border-radius: 8px; cursor: pointer;\n border: 1px solid transparent; transition: background .11s ease, border-color .11s ease;\n}\n.wd-shell .checkbox-row:hover { background: var(--wd-inset); }\n.wd-shell .checkbox-row[data-selected=\"true\"] { border-color: var(--wd-hairline); background: var(--wd-inset); }\n.wd-shell .checkbox-row input[type=\"radio\"] { accent-color: var(--wd-primary); flex: none; margin: 0; }\n.wd-shell .field { display: flex; flex-direction: column; gap: 5px; }\n.wd-shell .field-label { font-size: 12px; color: var(--dsw-alias-label-secondary); }\n.wd-shell .input {\n height: 30px; width: 94px; padding: 0 10px; border-radius: 8px;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n color: var(--wd-text); font-variant-numeric: tabular-nums;\n}\n.wd-shell .input:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }\n.wd-shell .form-error { margin: 2px 0 0; font-size: 11.5px; color: var(--wd-red); }\n.wd-shell .inline-field { display: flex; align-items: center; gap: 9px; padding: 4px 11px 4px 35px; }\n.wd-shell .helper-box {\n margin-top: 7px; padding: 9px 11px; border-radius: 8px;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-tertiary);\n}\n\n/* ---------- sidebar glyph ---------- */\n.wd-glyph { display: block; }\n\n@media (prefers-reduced-motion: reduce) {\n .wd-shell .spinner { animation-duration: 2.4s; }\n .wd-shell .btn, .wd-shell .filter-chip, .wd-shell .search-box, .wd-shell .view-switch-btn { transition: none; }\n}\n";
|
|
31
|
+
export declare const BASE_CSS = "\n.wd-shell {\n /* Brand + status palette (DESIGN.md), with soft tints derived from each. */\n --wd-primary: #2864E8;\n --wd-primary-deep: #1B4FC2;\n --wd-primary-soft: rgba(40, 100, 232, .09);\n --wd-primary-ring: rgba(40, 100, 232, .26);\n --wd-text: #192638;\n --wd-bg: #F5F7FB;\n --wd-border: #E6EBF2;\n --wd-green: #218568;\n --wd-amber: #B77919;\n --wd-red: #C0392B;\n --wd-slate: #5A6A80;\n --wd-green-soft: rgba(33, 133, 104, .10);\n --wd-amber-soft: rgba(183, 121, 25, .11);\n --wd-red-soft: rgba(192, 57, 43, .10);\n --wd-slate-soft: rgba(90, 106, 128, .10);\n\n /* Surface ramp: canvas \u2192 card \u2192 inset. */\n --wd-canvas: #F5F7FB;\n --wd-surface: #FFFFFF;\n --wd-inset: #F7F9FC;\n --wd-hairline: #E6EBF2;\n\n /* One shadow ramp; three steps is enough for any depth in this UI. */\n --wd-shadow-1: 0 1px 2px rgba(20, 32, 52, .05);\n --wd-shadow-2: 0 2px 6px rgba(20, 32, 52, .07), 0 1px 2px rgba(20, 32, 52, .04);\n --wd-shadow-3: 0 10px 30px rgba(20, 32, 52, .12), 0 2px 8px rgba(20, 32, 52, .06);\n\n height: 100%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n background: var(--wd-canvas);\n color: var(--wd-text);\n font-family: 'Avenir Next', 'PingFang SC', system-ui, -apple-system, sans-serif;\n font-size: 13px;\n line-height: 20px;\n -webkit-font-smoothing: antialiased;\n}\nbody[data-ds-dark-theme] .wd-shell {\n --wd-text: #E8EDF5;\n --wd-bg: #14181F;\n --wd-border: #2A3341;\n --wd-green: #4FC59B;\n --wd-amber: #E0A94A;\n --wd-red: #F07A6B;\n --wd-slate: #97A6BA;\n --wd-primary: #6E9BFF;\n --wd-primary-deep: #8DB0FF;\n --wd-primary-soft: rgba(110, 155, 255, .14);\n --wd-primary-ring: rgba(110, 155, 255, .32);\n --wd-green-soft: rgba(79, 197, 155, .14);\n --wd-amber-soft: rgba(224, 169, 74, .16);\n --wd-red-soft: rgba(240, 122, 107, .14);\n --wd-slate-soft: rgba(151, 166, 186, .14);\n --wd-canvas: #14181F;\n --wd-surface: #1B2029;\n --wd-inset: #222834;\n --wd-hairline: #2A3341;\n --wd-shadow-1: 0 1px 2px rgba(0, 0, 0, .28);\n --wd-shadow-2: 0 2px 8px rgba(0, 0, 0, .34), 0 1px 2px rgba(0, 0, 0, .24);\n --wd-shadow-3: 0 12px 34px rgba(0, 0, 0, .48), 0 2px 8px rgba(0, 0, 0, .3);\n}\n.wd-shell *, .wd-shell *::before, .wd-shell *::after { box-sizing: border-box; }\n.wd-shell button, .wd-shell input, .wd-shell select { font: inherit; color: inherit; }\n.wd-shell:focus { outline: none; }\n\n/* ---------- shell: rail + canvas ---------- */\n.wd-shell .page { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }\n\n.wd-shell .module-rail {\n flex: 0 0 auto;\n display: flex; align-items: center; gap: 6px;\n padding: 10px 32px 0;\n}\n.wd-shell .module-tab {\n display: inline-flex; align-items: center; gap: 7px;\n height: 30px; padding: 0 12px;\n border: 1px solid transparent; border-radius: 8px 8px 0 0;\n background: transparent; color: var(--dsw-alias-label-secondary);\n cursor: pointer; font-size: 12.5px; font-weight: 500;\n border-bottom: 0; position: relative; top: 1px;\n}\n.wd-shell .module-tab[data-active=\"true\"] {\n background: var(--wd-surface); color: var(--wd-text);\n border-color: var(--wd-hairline); font-weight: 600;\n}\n.wd-shell .module-tab:not([data-active=\"true\"]):hover { background: var(--wd-primary-soft); color: var(--wd-text); }\n.wd-shell .module-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-primary); flex: none; }\n.wd-shell .module-tab[data-active=\"false\"] .module-tab-dot { background: var(--wd-slate); opacity: .55; }\n.wd-shell .module-rail-hint { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }\n\n/* ---------- page header ---------- */\n.wd-shell .page-header {\n flex: 0 0 auto;\n display: flex; align-items: flex-start; gap: 16px;\n padding: 14px 28px 12px;\n background: var(--wd-surface);\n border: 1px solid var(--wd-hairline);\n box-shadow: var(--wd-shadow-1);\n position: relative; z-index: 2;\n}\n.wd-shell .page-header-text { flex: 1 1 auto; min-width: 0; }\n.wd-shell .page-eyebrow {\n display: flex; align-items: center; gap: 6px;\n font-size: 11px; line-height: 16px; letter-spacing: .06em;\n text-transform: uppercase; color: var(--dsw-alias-label-tertiary);\n margin: 0 0 3px;\n}\n.wd-shell .page-title {\n margin: 0; font-size: 19px; line-height: 25px; font-weight: 650;\n letter-spacing: -.01em; display: flex; align-items: center; gap: 10px;\n}\n.wd-shell .page-subtitle { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); }\n.wd-shell .page-source {\n margin: 4px 0 0; font-size: 10.5px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary);\n display: flex; gap: 7px; flex-wrap: wrap; align-items: center;\n}\n.wd-shell .page-source code {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;\n padding: 2px 7px; border-radius: 5px;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n}\n.wd-shell .header-actions { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }\n.wd-shell .page-body {\n flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;\n padding: 16px 28px 36px;\n}\n.wd-shell .detail-body {\n flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;\n padding: 0;\n}\n.wd-shell .page-footer {\n flex: 0 0 auto; display: flex; align-items: center; gap: 10px;\n padding: 8px 32px; min-height: 32px;\n border-top: 1px solid var(--wd-hairline);\n background: var(--wd-surface);\n font-size: 11.5px; color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .page-footer .spacer { flex: 1 1 auto; }\n\n/* ---------- search (inside the toolbar) ---------- */\n.wd-shell .search-box {\n position: relative; display: flex; align-items: center;\n width: min(300px, 100%); flex: 0 1 300px;\n height: 28px; padding: 0 9px 0 27px;\n border: 1px solid var(--wd-hairline); border-radius: 9px;\n background: var(--wd-inset);\n transition: border-color .13s ease, background .13s ease, box-shadow .13s ease;\n}\n.wd-shell .search-box:focus-within {\n border-color: var(--wd-primary); background: var(--wd-surface);\n box-shadow: 0 0 0 3px var(--wd-primary-soft);\n}\n.wd-shell .search-glyph {\n position: absolute; left: 9px; top: 50%; transform: translateY(-50%);\n font-size: 14px; line-height: 1; color: var(--dsw-alias-label-tertiary);\n pointer-events: none;\n}\n.wd-shell .search-input {\n flex: 1 1 auto; min-width: 0; height: 100%;\n border: 0; background: transparent; outline: none;\n font-size: 12.5px;\n}\n.wd-shell .search-input::placeholder { color: var(--dsw-alias-label-tertiary); }\n.wd-shell .search-input::-webkit-search-cancel-button { display: none; }\n.wd-shell .search-clear {\n flex: none; width: 18px; height: 18px; border-radius: 50%;\n border: 0; background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);\n font-size: 12px; line-height: 1; cursor: pointer;\n display: flex; align-items: center; justify-content: center;\n}\n.wd-shell .search-clear:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }\n.wd-shell .footer-hint { font-size: 10px; color: var(--dsw-alias-label-tertiary); white-space: nowrap; }\n\n/* ---------- toolbar ---------- */\n.wd-shell .toolbar {\n flex: 0 0 auto;\n display: flex; flex-direction: column; gap: 6px;\n padding: 8px 28px 9px;\n background: var(--wd-surface);\n border-bottom: 1px solid var(--wd-hairline);\n box-shadow: var(--wd-shadow-1);\n position: relative; z-index: 1;\n}\n.wd-shell .toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; }\n/* The filter strip is ONE scrolling line. Wrapping it onto three lines cost the\n project list most of the first screen, which is the opposite of the point. */\n.wd-shell .toolbar-row-filters {\n gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;\n padding-bottom: 2px; scrollbar-width: thin;\n}\n.wd-shell .toolbar-row-filters .toolbar-group { flex: none; }\n.wd-shell .toolbar-group { display: flex; align-items: center; gap: 7px; min-width: 0; }\n.wd-shell .toolbar-group-label {\n flex: none; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;\n color: var(--dsw-alias-label-tertiary); font-weight: 600;\n}\n.wd-shell .chip-scroll { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; min-width: 0; }\n.wd-shell .filter-chip {\n display: inline-flex; align-items: center; gap: 5px;\n height: 24px; padding: 0 9px;\n border: 1px solid var(--wd-hairline); border-radius: 20px;\n background: var(--wd-surface); color: var(--dsw-alias-label-secondary);\n font-size: 11.5px; cursor: pointer; white-space: nowrap;\n transition: background .12s ease, border-color .12s ease, color .12s ease;\n}\n.wd-shell .filter-chip:hover:not([disabled]) { background: var(--wd-inset); color: var(--wd-text); }\n.wd-shell .filter-chip[data-active=\"true\"] {\n background: var(--wd-primary-soft); border-color: var(--wd-primary);\n color: var(--wd-primary); font-weight: 600;\n}\n.wd-shell .filter-chip[disabled] { opacity: .4; cursor: default; }\n.wd-shell .filter-chip-count {\n font-size: 10px; font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-tertiary); font-weight: 500;\n}\n.wd-shell .filter-chip[data-active=\"true\"] .filter-chip-count { color: var(--wd-primary); }\n.wd-shell .view-switch {\n display: inline-flex; align-items: center; padding: 2px;\n border: 1px solid var(--wd-hairline); border-radius: 9px;\n background: var(--wd-inset); gap: 2px;\n}\n.wd-shell .view-switch-btn {\n height: 24px; padding: 0 11px; border: 0; border-radius: 7px;\n background: transparent; color: var(--dsw-alias-label-secondary);\n font-size: 11.5px; cursor: pointer; white-space: nowrap;\n transition: background .12s ease, color .12s ease, box-shadow .12s ease;\n}\n.wd-shell .view-switch-btn:hover:not([data-active=\"true\"]) { color: var(--wd-text); }\n.wd-shell .view-switch-btn[data-active=\"true\"] {\n background: var(--wd-surface); color: var(--wd-text); font-weight: 600;\n box-shadow: var(--wd-shadow-1);\n}\n.wd-shell .sort-switch { display: inline-flex; align-items: center; gap: 4px; }\n.wd-shell .sort-select {\n height: 26px; padding: 0 8px; border-radius: 7px;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n color: var(--dsw-alias-label-secondary); font-size: 11.5px; cursor: pointer;\n}\n.wd-shell .sort-select:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }\n.wd-shell .toolbar-result { margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n\n/* ---------- buttons ---------- */\n.wd-shell .btn {\n height: 30px; padding: 0 12px;\n display: inline-flex; align-items: center; gap: 6px;\n border-radius: 8px; border: 1px solid var(--wd-hairline);\n background: var(--wd-surface); color: var(--dsw-alias-label-secondary);\n cursor: pointer; white-space: nowrap; font-size: 12.5px;\n transition: background .13s ease, border-color .13s ease, box-shadow .13s ease, transform .06s ease;\n box-shadow: var(--wd-shadow-1);\n}\n.wd-shell .btn:hover:not([disabled]) {\n background: var(--wd-inset); color: var(--wd-text);\n border-color: var(--dsw-alias-border-l2); box-shadow: var(--wd-shadow-2);\n}\n.wd-shell .btn:active:not([disabled]) { transform: translateY(1px); box-shadow: var(--wd-shadow-1); }\n.wd-shell .btn:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 2px; }\n.wd-shell .btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }\n.wd-shell .btn-primary {\n background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);\n border-color: transparent; color: #fff; font-weight: 550;\n box-shadow: 0 1px 2px rgba(40, 100, 232, .3), 0 4px 12px rgba(40, 100, 232, .18);\n}\n.wd-shell .btn-primary:hover:not([disabled]) {\n background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);\n color: #fff; filter: brightness(1.07);\n box-shadow: 0 2px 4px rgba(40, 100, 232, .32), 0 8px 20px rgba(40, 100, 232, .22);\n}\n.wd-shell .btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }\n.wd-shell .btn-ghost:hover:not([disabled]) { background: var(--wd-inset); box-shadow: none; }\n.wd-shell .btn-small { height: 25px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }\n.wd-shell .btn-icon { width: 26px; padding: 0; justify-content: center; font-size: 12px; }\n\n/* ---------- shared atoms ---------- */\n.wd-shell .chip {\n display: inline-flex; align-items: center; gap: 4px;\n padding: 2px 9px; border-radius: 20px; font-size: 11.5px; line-height: 18px;\n background: var(--wd-inset); color: var(--dsw-alias-label-secondary);\n border: 1px solid var(--wd-hairline);\n}\n.wd-shell .chip-row { display: flex; flex-wrap: wrap; gap: 6px; }\n.wd-shell .chip-button { border: 0; cursor: pointer; font-family: inherit; }\n.wd-shell .chip-button:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }\n.wd-shell .status-pill {\n display: inline-flex; align-items: center; gap: 5px;\n height: 21px; padding: 0 9px; border-radius: 20px;\n font-size: 11px; font-weight: 550; white-space: nowrap;\n background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);\n}\n.wd-shell .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-slate); flex: none; }\n.wd-shell .tone-blue { background: var(--wd-primary-soft); color: var(--wd-primary); }\n.wd-shell .tone-blue .status-dot { background: var(--wd-primary); }\n.wd-shell .tone-green { background: var(--wd-green-soft); color: var(--wd-green); }\n.wd-shell .tone-green .status-dot { background: var(--wd-green); }\n.wd-shell .tone-amber { background: var(--wd-amber-soft); color: var(--wd-amber); }\n.wd-shell .tone-amber .status-dot { background: var(--wd-amber); }\n.wd-shell .tone-red { background: var(--wd-red-soft); color: var(--wd-red); }\n.wd-shell .tone-red .status-dot { background: var(--wd-red); }\n.wd-shell .tone-slate { background: var(--wd-slate-soft); color: var(--wd-slate); }\n.wd-shell .tone-slate .status-dot { background: var(--wd-slate); }\n.wd-shell .is-muted { color: var(--dsw-alias-label-tertiary); font-style: italic; }\n.wd-shell .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }\n.wd-shell .prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 19px; color: var(--dsw-alias-label-secondary); }\n\n/* ---------- empty / failure ---------- */\n.wd-shell .empty-state {\n margin: 0 auto; max-width: 440px; padding: 56px 24px;\n text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px;\n}\n.wd-shell .empty-icon {\n width: 76px; height: 76px; border-radius: 18px;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n display: flex; align-items: center; justify-content: center;\n color: var(--dsw-alias-label-tertiary); margin-bottom: 10px;\n box-shadow: var(--wd-shadow-2);\n}\n.wd-shell .empty-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 650; }\n.wd-shell .empty-copy { margin: 0 0 12px; font-size: 12.5px; line-height: 19px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n.wd-shell .empty-meta { margin-top: 16px; font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }\n.wd-shell .failure {\n border: 1px solid var(--wd-red-soft); border-radius: 10px;\n background: var(--wd-red-soft); padding: 13px 15px;\n display: flex; align-items: flex-start; gap: 11px;\n border-left: 3px solid var(--wd-red);\n}\n.wd-shell .failure-text { min-width: 0; flex: 1 1 auto; }\n.wd-shell .failure-title { font-size: 13px; line-height: 19px; font-weight: 650; color: var(--wd-red); }\n.wd-shell .failure-reason { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n.wd-shell .spinner {\n display: inline-block; width: 12px; height: 12px;\n border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;\n animation: wd-spin .9s linear infinite; opacity: .8;\n}\n@keyframes wd-spin { to { transform: rotate(360deg); } }\n\n/* ---------- settings modal ---------- */\n.wd-shell .modal-overlay {\n position: fixed; inset: 0; z-index: 40;\n display: flex; align-items: center; justify-content: center; padding: 24px;\n background: rgba(12, 18, 28, .46);\n backdrop-filter: blur(2px);\n}\n.wd-shell .modal {\n width: min(452px, 100%); max-height: 86vh;\n display: flex; flex-direction: column;\n border-radius: 14px; border: 1px solid var(--dsw-alias-border-l2);\n background: var(--wd-surface);\n box-shadow: var(--wd-shadow-3);\n overflow: hidden;\n}\n.wd-shell .modal-header { display: flex; align-items: center; gap: 9px; padding: 15px 19px; border-bottom: 1px solid var(--wd-hairline); }\n.wd-shell .modal-title { margin: 0; font-size: 14.5px; line-height: 21px; font-weight: 650; }\n.wd-shell .modal-content { padding: 15px 19px; display: flex; flex-direction: column; gap: 5px; overflow: auto; }\n.wd-shell .modal-footer { display: flex; align-items: center; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--wd-hairline); background: var(--wd-inset); }\n.wd-shell .modal-footer .spacer { flex: 1 1 auto; }\n/* The export dialog needs a wider box: it lists projects, and 452px clipped the\n company name on every row. */\n.wd-shell .modal-wide { width: min(560px, 100%); }\n.wd-shell .modal-lead {\n margin: 0 0 4px; font-size: 12px; line-height: 18px;\n color: var(--dsw-alias-label-secondary);\n}\n.wd-shell .export-toolbar {\n display: flex; align-items: center; gap: 7px;\n padding: 8px 0 6px;\n}\n.wd-shell .export-count {\n margin-left: auto; font-size: 11px; line-height: 16px;\n color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;\n}\n.wd-shell .export-list {\n list-style: none; margin: 0; padding: 0;\n max-height: 42vh; overflow: auto;\n border: 1px solid var(--wd-hairline); border-radius: 9px;\n}\n.wd-shell .export-row {\n display: flex; align-items: flex-start; gap: 9px;\n padding: 8px 11px; cursor: pointer;\n border-bottom: 1px solid var(--wd-hairline);\n transition: background .11s ease;\n}\n.wd-shell .export-list li:last-child .export-row { border-bottom: 0; }\n.wd-shell .export-row:hover { background: var(--wd-inset); }\n.wd-shell .export-row[data-selected=\"true\"] { background: var(--wd-primary-soft); }\n.wd-shell .export-row input[type=\"checkbox\"] { accent-color: var(--wd-primary); flex: none; margin: 2px 0 0; }\n.wd-shell .export-row-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }\n.wd-shell .export-row-name {\n font-size: 12px; line-height: 17px; font-weight: 600; color: var(--wd-text);\n overflow-wrap: anywhere;\n}\n.wd-shell .export-row-meta {\n font-size: 10.5px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;\n}\n.wd-shell .checkbox-row {\n display: flex; align-items: center; gap: 10px;\n padding: 9px 11px; border-radius: 8px; cursor: pointer;\n border: 1px solid transparent; transition: background .11s ease, border-color .11s ease;\n}\n.wd-shell .checkbox-row:hover { background: var(--wd-inset); }\n.wd-shell .checkbox-row[data-selected=\"true\"] { border-color: var(--wd-hairline); background: var(--wd-inset); }\n.wd-shell .checkbox-row input[type=\"radio\"] { accent-color: var(--wd-primary); flex: none; margin: 0; }\n.wd-shell .field { display: flex; flex-direction: column; gap: 5px; }\n.wd-shell .field-label { font-size: 12px; color: var(--dsw-alias-label-secondary); }\n.wd-shell .input {\n height: 30px; width: 94px; padding: 0 10px; border-radius: 8px;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n color: var(--wd-text); font-variant-numeric: tabular-nums;\n}\n.wd-shell .input:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }\n.wd-shell .form-error { margin: 2px 0 0; font-size: 11.5px; color: var(--wd-red); }\n.wd-shell .inline-field { display: flex; align-items: center; gap: 9px; padding: 4px 11px 4px 35px; }\n.wd-shell .helper-box {\n margin-top: 7px; padding: 9px 11px; border-radius: 8px;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-tertiary);\n}\n\n/* ---------- sidebar glyph ---------- */\n.wd-glyph { display: block; }\n\n@media (prefers-reduced-motion: reduce) {\n .wd-shell .spinner { animation-duration: 2.4s; }\n .wd-shell .btn, .wd-shell .filter-chip, .wd-shell .search-box, .wd-shell .view-switch-btn { transition: none; }\n}\n";
|
package/lib/client/css/base.js
CHANGED
|
@@ -388,6 +388,45 @@ body[data-ds-dark-theme] .wd-shell {
|
|
|
388
388
|
.wd-shell .modal-content { padding: 15px 19px; display: flex; flex-direction: column; gap: 5px; overflow: auto; }
|
|
389
389
|
.wd-shell .modal-footer { display: flex; align-items: center; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--wd-hairline); background: var(--wd-inset); }
|
|
390
390
|
.wd-shell .modal-footer .spacer { flex: 1 1 auto; }
|
|
391
|
+
/* The export dialog needs a wider box: it lists projects, and 452px clipped the
|
|
392
|
+
company name on every row. */
|
|
393
|
+
.wd-shell .modal-wide { width: min(560px, 100%); }
|
|
394
|
+
.wd-shell .modal-lead {
|
|
395
|
+
margin: 0 0 4px; font-size: 12px; line-height: 18px;
|
|
396
|
+
color: var(--dsw-alias-label-secondary);
|
|
397
|
+
}
|
|
398
|
+
.wd-shell .export-toolbar {
|
|
399
|
+
display: flex; align-items: center; gap: 7px;
|
|
400
|
+
padding: 8px 0 6px;
|
|
401
|
+
}
|
|
402
|
+
.wd-shell .export-count {
|
|
403
|
+
margin-left: auto; font-size: 11px; line-height: 16px;
|
|
404
|
+
color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
|
|
405
|
+
}
|
|
406
|
+
.wd-shell .export-list {
|
|
407
|
+
list-style: none; margin: 0; padding: 0;
|
|
408
|
+
max-height: 42vh; overflow: auto;
|
|
409
|
+
border: 1px solid var(--wd-hairline); border-radius: 9px;
|
|
410
|
+
}
|
|
411
|
+
.wd-shell .export-row {
|
|
412
|
+
display: flex; align-items: flex-start; gap: 9px;
|
|
413
|
+
padding: 8px 11px; cursor: pointer;
|
|
414
|
+
border-bottom: 1px solid var(--wd-hairline);
|
|
415
|
+
transition: background .11s ease;
|
|
416
|
+
}
|
|
417
|
+
.wd-shell .export-list li:last-child .export-row { border-bottom: 0; }
|
|
418
|
+
.wd-shell .export-row:hover { background: var(--wd-inset); }
|
|
419
|
+
.wd-shell .export-row[data-selected="true"] { background: var(--wd-primary-soft); }
|
|
420
|
+
.wd-shell .export-row input[type="checkbox"] { accent-color: var(--wd-primary); flex: none; margin: 2px 0 0; }
|
|
421
|
+
.wd-shell .export-row-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
|
|
422
|
+
.wd-shell .export-row-name {
|
|
423
|
+
font-size: 12px; line-height: 17px; font-weight: 600; color: var(--wd-text);
|
|
424
|
+
overflow-wrap: anywhere;
|
|
425
|
+
}
|
|
426
|
+
.wd-shell .export-row-meta {
|
|
427
|
+
font-size: 10.5px; line-height: 15px;
|
|
428
|
+
color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
|
|
429
|
+
}
|
|
391
430
|
.wd-shell .checkbox-row {
|
|
392
431
|
display: flex; align-items: center; gap: 10px;
|
|
393
432
|
padding: 9px 11px; border-radius: 8px; cursor: pointer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blocker panel + worklist styles.
|
|
3
|
+
*
|
|
4
|
+
* Both surfaces live in the same module, so they share a sheet. The rules follow
|
|
5
|
+
* the two constraints the rest of the console set:
|
|
6
|
+
*
|
|
7
|
+
* 1. **Scoped under `.wd-shell`.** Nothing here may leak into product DOM; the
|
|
8
|
+
* sheet is unmounted with the page.
|
|
9
|
+
* 2. **Judgement tones only.** Red/amber mark severity, never chrome. A blocker
|
|
10
|
+
* group's left border is the only colour on the row, because the list is
|
|
11
|
+
* already dense and a second colour axis (per source) would make the severity
|
|
12
|
+
* unreadable.
|
|
13
|
+
*
|
|
14
|
+
* Body text is 11.5–12px rather than the 9.5px the older surfaces used: this is
|
|
15
|
+
* the reading surface that is meant to be acted on, and CJK at 9.5px is a
|
|
16
|
+
* legibility problem, not a density win.
|
|
17
|
+
*/
|
|
18
|
+
export declare const BLOCKERS_CSS = "\n/* ---------- blocker chips ---------- */\n.wd-shell .blocker-chips {\n display: flex; align-items: center; gap: 6px; flex-wrap: wrap;\n padding: 0 0 10px;\n}\n.wd-shell .blocker-chip {\n display: inline-flex; align-items: center; gap: 6px;\n height: 26px; padding: 0 10px;\n border: 1px solid var(--wd-hairline); border-radius: 20px;\n background: var(--wd-surface); color: var(--dsw-alias-label-secondary);\n font-size: 11.5px; line-height: 16px; cursor: pointer; white-space: nowrap;\n transition: background .12s ease, border-color .12s ease, color .12s ease;\n}\n.wd-shell .blocker-chip:hover { background: var(--wd-inset); color: var(--wd-text); }\n.wd-shell .blocker-chip[data-active=\"true\"] {\n background: var(--wd-primary-soft); border-color: var(--wd-primary);\n color: var(--wd-primary); font-weight: 600;\n}\n.wd-shell .blocker-chip-count {\n font-size: 10.5px; font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-tertiary); font-weight: 500;\n}\n.wd-shell .blocker-chip[data-active=\"true\"] .blocker-chip-count { color: var(--wd-primary); }\n\n/* ---------- blocker groups ---------- */\n.wd-shell .blocker-list { display: flex; flex-direction: column; gap: 10px; }\n.wd-shell .blocker-group {\n border: 1px solid var(--wd-hairline); border-radius: 10px;\n background: var(--wd-surface); overflow: hidden;\n}\n.wd-shell .blocker-group[data-level=\"high\"] { border-left: 3px solid var(--wd-red); }\n.wd-shell .blocker-group[data-level=\"medium\"] { border-left: 3px solid var(--wd-amber); }\n.wd-shell .blocker-group-head {\n display: flex; align-items: center; gap: 8px;\n padding: 9px 12px; border-bottom: 1px solid var(--wd-hairline);\n background: var(--wd-inset);\n}\n.wd-shell .blocker-project {\n display: inline-flex; align-items: baseline; gap: 7px;\n padding: 0; border: 0; background: none; cursor: pointer;\n font-size: 12.5px; line-height: 18px; font-weight: 650; color: var(--wd-text);\n text-align: left; min-width: 0; overflow-wrap: anywhere;\n}\n.wd-shell .blocker-project:hover { color: var(--wd-primary); }\n.wd-shell .blocker-project-id {\n font-size: 10.5px; font-weight: 500; color: var(--dsw-alias-label-tertiary);\n font-variant-numeric: tabular-nums;\n}\n.wd-shell .blocker-stage {\n flex: none; font-size: 10.5px; line-height: 16px;\n padding: 1px 7px; border-radius: 10px;\n background: var(--wd-primary-soft); color: var(--wd-primary);\n}\n.wd-shell .blocker-group-count {\n margin-left: auto; flex: none;\n font-size: 10.5px; font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .blocker-rows { list-style: none; margin: 0; padding: 0; }\n.wd-shell .blocker-row {\n display: flex; flex-direction: column; gap: 2px;\n padding: 8px 12px; border-bottom: 1px solid var(--wd-hairline);\n}\n.wd-shell .blocker-row:last-child { border-bottom: 0; }\n.wd-shell .blocker-row-headline {\n font-size: 12px; line-height: 17px; font-weight: 600; color: var(--wd-text);\n overflow-wrap: anywhere;\n}\n.wd-shell .blocker-row[data-source=\"missing-amount\"] .blocker-row-headline,\n.wd-shell .blocker-row[data-source=\"no-stage-since\"] .blocker-row-headline { color: var(--wd-amber); }\n.wd-shell .blocker-row[data-source=\"stalled\"] .blocker-row-headline,\n.wd-shell .blocker-row[data-source=\"no-progress\"] .blocker-row-headline { color: var(--wd-red); }\n.wd-shell .blocker-row-copy {\n font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n.wd-shell .blocker-empty {\n margin: 0; padding: 22px 12px; text-align: center;\n font-size: 12px; color: var(--dsw-alias-label-tertiary);\n}\n\n/* ---------- worklist ---------- */\n.wd-shell .worklist { display: flex; flex-direction: column; gap: 8px; }\n.wd-shell .worklist-items {\n list-style: none; margin: 0; padding: 0;\n display: flex; flex-direction: column; gap: 6px;\n}\n.wd-shell .worklist-item {\n display: flex; align-items: flex-start; gap: 9px;\n padding: 9px 12px;\n border: 1px solid var(--wd-hairline); border-radius: 9px;\n background: var(--wd-inset);\n}\n.wd-shell .worklist-mark {\n flex: none; font-size: 13px; line-height: 17px;\n color: var(--wd-amber);\n}\n.wd-shell .worklist-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.wd-shell .worklist-label {\n font-size: 12px; line-height: 17px; font-weight: 600; color: var(--wd-text);\n overflow-wrap: anywhere;\n}\n.wd-shell .worklist-copy {\n font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n.wd-shell .worklist-action {\n font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary);\n overflow-wrap: anywhere;\n}\n.wd-shell .worklist-done {\n margin: 0; padding: 14px 12px; text-align: center;\n font-size: 12px; color: var(--wd-green);\n}\n.wd-shell .worklist[data-empty=\"true\"] {\n border: 1px dashed var(--wd-hairline); border-radius: 9px;\n background: var(--wd-inset);\n}\n\n/* ---------- detail: worklist section ---------- */\n.wd-shell .dt-worklist { margin-bottom: 14px; }\n.wd-shell .dt-stage-context {\n display: flex; flex-direction: column; gap: 3px;\n padding: 12px 14px; margin-bottom: 14px;\n border: 1px solid var(--wd-hairline); border-left: 3px solid var(--wd-primary);\n border-radius: 10px; background: var(--wd-surface);\n}\n.wd-shell .dt-stage-context-head {\n display: flex; align-items: baseline; gap: 8px;\n}\n.wd-shell .dt-stage-context-title {\n margin: 0; font-size: 13px; line-height: 19px; font-weight: 650; color: var(--wd-text);\n}\n.wd-shell .dt-stage-context-kicker {\n font-size: 10.5px; line-height: 15px; letter-spacing: .04em;\n text-transform: uppercase; color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .dt-stage-context-copy {\n margin: 0; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary);\n}\n.wd-shell .dt-stage-context-next {\n margin: 0; font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .dt-stage-context-state {\n align-self: flex-start; margin-top: 2px;\n font-size: 10.5px; line-height: 16px; padding: 1px 8px; border-radius: 10px;\n}\n.wd-shell .dt-stage-context[data-done=\"true\"] .dt-stage-context-state {\n background: var(--wd-green-soft); color: var(--wd-green);\n}\n.wd-shell .dt-stage-context[data-done=\"false\"] .dt-stage-context-state {\n background: var(--wd-amber-soft); color: var(--wd-amber);\n}\n\n/* ---------- detail: collapsed \"other sections\" ---------- */\n.wd-shell .dt-fold {\n border: 1px solid var(--wd-hairline); border-radius: 10px;\n background: var(--wd-surface); margin-bottom: 14px; overflow: hidden;\n}\n.wd-shell .dt-fold-head {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 14px; cursor: pointer;\n background: var(--wd-inset); border: 0; width: 100%; text-align: left;\n}\n.wd-shell .dt-fold-head:hover { background: var(--wd-canvas); }\n.wd-shell .dt-fold-title {\n margin: 0; font-size: 12.5px; line-height: 18px; font-weight: 650; color: var(--wd-text);\n}\n.wd-shell .dt-fold-hint {\n font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .dt-fold-arrow {\n margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .dt-fold[data-open=\"true\"] .dt-fold-body { display: block; }\n.wd-shell .dt-fold[data-open=\"false\"] .dt-fold-body { display: none; }\n.wd-shell .dt-fold-body { padding: 12px 14px; border-top: 1px solid var(--wd-hairline); }\n";
|