dsh-trajectory-traceview-plus 0.11.2 → 0.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/README.en.md +27 -16
- package/README.md +39 -23
- package/docs/DESIGN.md +1559 -0
- package/docs/PROVENANCE.md +3 -0
- package/lib/client.js +38 -21
- package/package.json +2 -2
- package/scripts/browser-check.mjs +14 -0
- package/scripts/guard-check.mjs +113 -0
- package/scripts/readme-numbers.mjs +17 -4
- package/scripts/release-status.mjs +141 -21
- package/scripts/shortcut-check.mjs +93 -0
- package/src/00-locale.js +17 -12
- package/src/40-view.js +21 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.4 — 2026-11-26
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **中文界面里的 Token 用量 chip 是硬编码英文。** 「原始请求」标签下那一排显示 `in 880 fresh 500 cache-read 320 cache-write 60 out 52 think 12`,而 README §2 的中文原话是「入站(含缓存读 / 写)与出站(含思考)明细」。已补 6 个 locale 键(入站 / 未缓存 / 缓存读 / 缓存写 / 出站 / 思考),英文侧保持原词。这是 §13.68 记的那类缺陷:I18N3 守卫只查「代码里有中文」,查不到「英文字面量进了中文界面」。
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **英文界面首次被渲染验证。** harness 新增 `__setLocale` / `__remount` 路径,`test/browser/probe-en.js` 做一遍英文渲染,断言 chrome 里不含 CJK 且确实翻译了。此前 28 组观测、189 条断言里没有一条碰过 `en`。
|
|
12
|
+
- 浏览器探针补齐 README §2 剩余的全部入口:KPI 与模型名、⏱ 等距/按时钟切换、详情面板 ⤢ 展开、minimap 跳转与高亮、🔗 锚点输入框(含地址栏同步与往返验证)、📋 复制本步复盘、📋 Markdown 整段导出、⚡ 提示词变更、「原始请求」四段(系统提示 / 工具目录 / 消息列表 / Token 用量)、子调用卡片、证据等级、空态与不兼容态。
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- `test/browser/probe-en.js` 拆成独立文件:`agent-browser eval` 有 30 秒硬上限,英文组放进主探针后整条跑到 30.03 秒,失败形态是「结果无法解析」而不是红断言。现在主探针 28 秒、英文 pass 5 秒。
|
|
17
|
+
- `readme-numbers.mjs` 现在遍历两个 probe 文件累加数字,并且只把 `failures.push("…")` 字面量算作断言(转发 `push(...arr)` 不算)。
|
|
18
|
+
- 探针总量:14 组 / 57 条 → 28 组 / 189 条(`--shots` 另加 1 组 / 3 条)。
|
|
19
|
+
|
|
20
|
+
## 0.11.3 — 2026-11-24
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **搜索框里的 `↑` / `↓` 导航原来根本不存在。** README §7 的快捷键表从存在起就写着这一行,而两条处理路径都跳过了它:面板级处理器遇到 `input` 目标直接 `return`,搜索框级处理器只认 `Enter` / `Escape`。于是浏览器查找最自然的两个键按下去毫无反应。现在补上(复用「下一个 / 上一个命中」按钮本来就调用的 `gotoMatch`,行为含环形回绕一致)。
|
|
25
|
+
- **README §10 的安全声明失准。** 原文写「不写入任何存储」,实际每个会话会往 `sessionStorage` 写一条 `dstv:view:1:<会话键>` = `{ revealed, query }`,用于宿主重新挂载面板时不把你打回「总览 + 空搜索框」。现已逐条写明:键名、内容、只在本标签页、为空时删除、存储被禁用时不抛错,并明确提示**搜索框里的文字会留在本标签页的 sessionStorage 里**。
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **README §7 的每个键现在都有断言**(浏览器探针 13 → 15 组 / 47 → 69 条):空格播放+暂停、PageUp/PageDown 单调前进且可回退、`/` 与 `f` 都聚焦搜索框、`r` 双向切换且只在有请求的站点生效、`↑`/`↓` 计数器必须变化、`Enter` / `Shift+Enter` 方向相反、`Esc` 清空。
|
|
30
|
+
- **新门禁 `shortcut-check`**(CI 9 项 / 本地 8 步):README §7 每一行列出的键都必须在 `probe.js` 里出现。单向——探针测表外的键不算错。带反向自检:一个都没匹配上直接红,防止映射表失效后门禁永远绿。
|
|
31
|
+
- **探针新增 `storage` 组**:至多一条视图状态键、字段只能是 `revealed` / `query`、`query` ≤200 字符、`localStorage` 仍为空。
|
|
32
|
+
- **smoke 新增 `SEC1` / `SEC2`**:`src/` 不得出现 `document.cookie =`、`localStorage` 写、`IndexedDB`、`sendBeacon`、`fetch(`、`XMLHttpRequest`、`WebSocket`;同时 `sessionStorage.setItem` 必须仍存在(否则说明功能被删而文档没改)。
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- `readme-numbers` 现在也核对**安装命令里写死的版本号**是否等于 `package.json`——改版本忘改 README 会直接红。
|
|
37
|
+
- `release-status` 的 npm 行拆成两个事实(元数据 + tarball 可下载),并新增第 5 行 `npm @latest`(advisory):`@latest` 被 pnpm 的供应链延迟挡住时打印「published X h ago, clears in ~Y h」而不是含糊的「self-heals」。
|
|
38
|
+
- 新增 `scripts/guard-check.mjs`:用已知复杂度的输入验证 P1 性能守卫还能不能分辨线性/二次。
|
|
39
|
+
|
|
40
|
+
### Notes
|
|
41
|
+
|
|
42
|
+
0.11.0 / 0.11.1 / 0.11.2 的 `lib/` 逐字节相同;**0.11.3 是这三个版本之后第一次真正的运行时代码变更**(`↑`/`↓` 搜索导航)。
|
|
43
|
+
|
|
3
44
|
## 0.11.2 — 2026-11-24
|
|
4
45
|
|
|
5
46
|
`release-status` 增加第 4 个外部环节的检查:**tarball 是否真的可下载**。
|
package/README.en.md
CHANGED
|
@@ -115,12 +115,16 @@ dsh-trajectory-traceview-plus/ # repo root (directory name == npm package name
|
|
|
115
115
|
│ ├── doc-ref-check.mjs # DESIGN.md §x.y references resolve
|
|
116
116
|
│ ├── doc-heading-check.mjs # headings must be valid Markdown (space after #)
|
|
117
117
|
│ ├── readme-numbers.mjs # README numbers match the code (computed, not typed)
|
|
118
|
-
│ ├── release-status.mjs #
|
|
118
|
+
│ ├── release-status.mjs # tag / Release / npm metadata / tarball / @latest resolution (network; not in CI)
|
|
119
|
+
│ ├── guard-check.mjs # feed the P1 growth guard known complexities; does it still tell them apart? (timing; not in CI)
|
|
120
|
+
│ ├── shortcut-check.mjs # every key in README §7 must be exercised by the probe (in CI)
|
|
119
121
|
│ ├── browser-check.mjs # real-browser assertions (needs agent-browser)
|
|
120
122
|
│ └── browser-harness.mjs / bench-fold.mjs
|
|
121
123
|
├── docs/ # DESIGN.md (why each change) / PROVENANCE.md (generated)
|
|
122
124
|
├── test/
|
|
123
|
-
│
|
|
125
|
+
│ ├── smoke.test.cjs # helper unit tests (plain node)
|
|
126
|
+
│ └── browser/ # fixture.js (host stub) / probe.js (main assertions) / probe-en.js (English UI)
|
|
127
|
+
│ # harness.html is generated by browser-harness.mjs and not committed
|
|
124
128
|
└── lib/
|
|
125
129
|
├── index.js # host half: no-op stub (browser-only plugin)
|
|
126
130
|
└── client.js # browser bundle: the trace view (generated)
|
|
@@ -131,20 +135,22 @@ dsh-trajectory-traceview-plus/ # repo root (directory name == npm package name
|
|
|
131
135
|
Install from npm (recommended — **pin the exact version**):
|
|
132
136
|
|
|
133
137
|
```powershell
|
|
134
|
-
dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.
|
|
138
|
+
dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.4
|
|
135
139
|
```
|
|
136
140
|
|
|
137
|
-
> **Why not `@latest`**: `dsh plugin` forwards to pnpm, and **pnpm 12 ships a supply-chain delay** (`minimumReleaseAge
|
|
141
|
+
> **Why not `@latest`**: `dsh plugin` forwards to pnpm, and **pnpm 12 ships a supply-chain delay** (`minimumReleaseAge`, default **1440 minutes = 24 hours**): a version published less than a day ago is not selected by `@latest`, and pnpm **silently falls back to the previous release** — no warning at all. Right after 0.11.0 was published, `pnpm add pkg@latest` installed 0.10.0, which the newer DSH hosts skip entirely. An exact version has no such ambiguity (verified with both cold and warm caches).
|
|
142
|
+
>
|
|
143
|
+
> The boundary was measured: `--config.minimumReleaseAge=300` (5 h) still resolves the new version, `1440` resolves back to the old one; the default has been `1440` since pnpm v11 ([docs](https://pnpm.io/settings/dependency-resolution#minimumreleaseage)). In other words, **during the first day after anyone publishes, `@latest` hands out the previous release** — that is the package manager's supply-chain policy, not a bug in this plugin.
|
|
138
144
|
>
|
|
139
145
|
> Related: this package's early `0.0.0-stage` has malformed metadata (no `size` field), so resolving `@latest` against a cold cache fails outright (`numeric field was not a number`). Pinning the version avoids that path.
|
|
140
146
|
|
|
141
147
|
Install from GitHub (**always pin the tag**):
|
|
142
148
|
|
|
143
149
|
```powershell
|
|
144
|
-
dsh plugin --profile web add "github:MisonL/dsh-trajectory-traceview-plus#v0.11.
|
|
150
|
+
dsh plugin --profile web add "github:MisonL/dsh-trajectory-traceview-plus#v0.11.4"
|
|
145
151
|
```
|
|
146
152
|
|
|
147
|
-
> **Why the `#v0.11.
|
|
153
|
+
> **Why the `#v0.11.4` matters**: a `github:` spec without a ref installs the **default branch HEAD**, not any released version. This repository keeps committing after a release (v0.11.0 was followed by five docs/scripts commits), so an unpinned install can hand you different code tomorrow while still reporting version 0.11.0. Pinning the tag is what makes "installed" and "released" the same code.
|
|
148
154
|
|
|
149
155
|
Then **restart `dsh web`** to take effect.
|
|
150
156
|
|
|
@@ -219,8 +225,13 @@ Open any session with an AI execution trace → a "Trace View" tab appears next
|
|
|
219
225
|
## 10. Security & compliance
|
|
220
226
|
|
|
221
227
|
- **Read-only**: only renders the `TrajectorySnapshot` the session view already produced; no business-DOM mutation, no file modification or deletion, no host route, no network access.
|
|
222
|
-
- **Local data**: everything is processed inside the browser; the raw request is rebuilt only when you open its panel, and nothing is
|
|
223
|
-
- **
|
|
228
|
+
- **Local data**: everything is processed inside the browser; the raw request is rebuilt only when you open its panel, and nothing is ever uploaded anywhere.
|
|
229
|
+
- **The one write: two pieces of view state in `sessionStorage`.** So that a host remount does not drop you back to "overview with an empty search box", each conversation gets one entry `dstv:view:1:<sessionKey>` holding `{ revealed, query }` — how far the window was expanded (a number) and the search text (≤200 chars).
|
|
230
|
+
- **This tab only** (sessionStorage, not localStorage): never shared across tabs or windows, gone when the tab closes.
|
|
231
|
+
- **Removed, not blanked**: when both fields are empty the key is deleted rather than left behind.
|
|
232
|
+
- **Works with storage disabled**: every access is inside `try/catch`, so a host that blocks storage behaves exactly as before and never throws.
|
|
233
|
+
- Note: the search box text is part of that entry — **if you typed something sensitive into the search box it stays in this tab's sessionStorage** until the tab closes or the query is cleared.
|
|
234
|
+
- **No persistence**: nothing written to localStorage / cookies / IndexedDB; no server, no telemetry; uninstalling leaves no trace.
|
|
224
235
|
|
|
225
236
|
## 11. Development & build
|
|
226
237
|
|
|
@@ -235,8 +246,8 @@ node scripts/provenance.mjs
|
|
|
235
246
|
Editing `src/` without rebuilding makes `--check` fail and the smoke suite report `BUILD1`. `lib/index.js` (host half) is a no-op stub; `lib/client.js` is a classic script (`window.__ModuleLoader__.load`) served directly by the client module system.
|
|
236
247
|
|
|
237
248
|
```powershell
|
|
238
|
-
npm run check #
|
|
239
|
-
# doc-
|
|
249
|
+
npm run check # 8 steps: build --check / provenance --check / version-check / doc-ref-check
|
|
250
|
+
# doc-heading-check / smoke / readme-numbers / shortcut-check
|
|
240
251
|
npm test # smoke only
|
|
241
252
|
```
|
|
242
253
|
|
|
@@ -245,8 +256,8 @@ The tests run the helper region against mock snapshots covering: tree building /
|
|
|
245
256
|
**What needs a real browser** (`react-dom/server` cannot see scroll, focus, clipboard, intervals or layout):
|
|
246
257
|
|
|
247
258
|
```powershell
|
|
248
|
-
node scripts/browser-check.mjs # builds the harness;
|
|
249
|
-
node scripts/browser-check.mjs --shots # saves screenshots and adds 1 more group /
|
|
259
|
+
node scripts/browser-check.mjs # builds the harness; 189 assertions over 28 recorded groups
|
|
260
|
+
node scripts/browser-check.mjs --shots # saves screenshots and adds 1 more group / 3 assertions: 375px overflow (29 total)
|
|
250
261
|
```
|
|
251
262
|
|
|
252
263
|
It needs `agent-browser` (Chrome via CDP). **Deliberately not in CI**: adding a browser to the runner is more moving parts than the check is worth, and a flaky browser job trains people to ignore red builds. Run it locally before releasing.
|
|
@@ -307,10 +318,10 @@ node scripts/provenance.mjs # 4. refresh the provenance list (rerun
|
|
|
307
318
|
npm run check # 5. the 7 local gates; all green before going further
|
|
308
319
|
git add -A; git commit -m "..." # 6.
|
|
309
320
|
git push origin main # 7.
|
|
310
|
-
git tag -a v0.11.
|
|
311
|
-
git push origin v0.11.
|
|
321
|
+
git tag -a v0.11.4 -m "..." # 8.
|
|
322
|
+
git push origin v0.11.4 # 9.
|
|
312
323
|
npm publish # 10. runs prepublishOnly -> the whole check again
|
|
313
|
-
gh release create v0.11.
|
|
324
|
+
gh release create v0.11.4 --notes-file … # 11. the badge reads the Release, not the tag
|
|
314
325
|
|
|
315
326
|
node scripts/release-status.mjs # 12. do all four agree? (tag / Release / npm metadata / tarball)
|
|
316
327
|
```
|
|
@@ -325,6 +336,6 @@ Three things guard the release, and all live in CI (`.github/workflows/check.yml
|
|
|
325
336
|
- version / tag disagreement — `node scripts/version-check.mjs` fails (`F1`)
|
|
326
337
|
- a missing `CHANGELOG.md` entry for the version (`F2`), or a version that goes backwards relative to an existing tag (`F3`)
|
|
327
338
|
|
|
328
|
-
CI runs those
|
|
339
|
+
CI runs those 9 gates plus an install step (`npm ci --include=dev`): `build-client --check`, `node --check lib/client.js`, `provenance --check`, `version-check`, `doc-ref-check`, `doc-heading-check`, smoke, readme-numbers, shortcut-check. `npm run check` runs 8 of them locally (build, provenance, version-check, doc-ref-check, doc-heading-check, smoke, readme-numbers, shortcut-check) — everything but `node --check lib/client.js`; run `browser-check` too before releasing — see §11.
|
|
329
340
|
|
|
330
341
|
**Those numbers have a gate of their own**: `readme-numbers` derives the true values from `check.yml`, `package.json` and `test/browser/probe.js`, then checks both READMEs against them. A number written down twice will eventually disagree with itself (§13.37).
|
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ dsh-trajectory-traceview-plus/ # 仓库根(目录名 = npm 包名)
|
|
|
109
109
|
├── CHANGELOG.md # 发布记录(version-check 会核对版本条目)
|
|
110
110
|
├── screenshot/ # 效果截图(README「效果预览」用)
|
|
111
111
|
├── .github/workflows/
|
|
112
|
-
│ └── check.yml # CI:
|
|
112
|
+
│ └── check.yml # CI:9 项门禁(本地命令的同序复现)
|
|
113
113
|
├── src/ # 浏览器端源码(lib/client.js 由它生成,不要手改产物)
|
|
114
114
|
├── scripts/
|
|
115
115
|
│ ├── build-client.mjs # src/ -> lib/client.js
|
|
@@ -118,12 +118,16 @@ dsh-trajectory-traceview-plus/ # 仓库根(目录名 = npm 包名)
|
|
|
118
118
|
│ ├── doc-ref-check.mjs # docs/DESIGN.md 的 §x.y 引用不断链
|
|
119
119
|
│ ├── doc-heading-check.mjs # 标题必须是合法 Markdown(# 后要有空格)
|
|
120
120
|
│ ├── readme-numbers.mjs # README 里的数字与代码一致(数出来,不手写)
|
|
121
|
-
│ ├── release-status.mjs # 查 tag /
|
|
121
|
+
│ ├── release-status.mjs # 查 tag / Release / npm 元数据 / tarball / @latest 解析(需联网,不进 CI)
|
|
122
|
+
│ ├── guard-check.mjs # 用已知复杂度验证 P1 性能守卫是否还能分辨线性/二次(测时间,不进 CI)
|
|
123
|
+
│ ├── shortcut-check.mjs # README §7 的每个键在 probe 里都得有断言(进 CI)
|
|
122
124
|
│ ├── browser-check.mjs # 真浏览器断言(需 agent-browser)
|
|
123
125
|
│ └── browser-harness.mjs / bench-fold.mjs
|
|
124
126
|
├── docs/ # DESIGN.md(每处改动的原因)/ PROVENANCE.md(自动生成)
|
|
125
127
|
├── test/
|
|
126
|
-
│
|
|
128
|
+
│ ├── smoke.test.cjs # 纯 helpers 单测(node 直接跑)
|
|
129
|
+
│ └── browser/ # fixture.js(宿主桩)/ probe.js(主断言)/ probe-en.js(英文界面)
|
|
130
|
+
│ # harness.html 由 browser-harness.mjs 生成,不入库
|
|
127
131
|
└── lib/
|
|
128
132
|
├── index.js # 宿主半部:无操作桩(纯浏览器端插件)
|
|
129
133
|
└── client.js # 浏览器 bundle:轨迹视图(生成物)
|
|
@@ -134,13 +138,19 @@ dsh-trajectory-traceview-plus/ # 仓库根(目录名 = npm 包名)
|
|
|
134
138
|
从 npm 安装(推荐,**写死版本号**):
|
|
135
139
|
|
|
136
140
|
```powershell
|
|
137
|
-
dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.
|
|
141
|
+
dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.4
|
|
138
142
|
```
|
|
139
143
|
|
|
140
144
|
> **为什么不用 `@latest`**:`dsh plugin` 底层是 pnpm,而 **pnpm 12 有供应链延迟保护**
|
|
141
|
-
> (`minimumReleaseAge
|
|
142
|
-
>
|
|
143
|
-
>
|
|
145
|
+
> (`minimumReleaseAge`,默认 **1440 分钟 = 24 小时**):发布不满一天的版本不会被
|
|
146
|
+
> `@latest` 选中,pnpm 会**静默退回上一个版本**——不打任何警告。
|
|
147
|
+
> 0.11.0 刚发布时实测 `pnpm add pkg@latest` 装到的是 0.10.0,而那版本在新宿主上会被跳过。
|
|
148
|
+
> 写死版本号就没有这个歧义(冷/热缓存实测都能装到指定版本)。
|
|
149
|
+
>
|
|
150
|
+
> 这个值有一条实测边界:`--config.minimumReleaseAge=300`(5 小时)仍解析到新版本,
|
|
151
|
+
> `1440` 解析回旧版;pnpm v11 起默认就是 `1440`([官方文档](https://pnpm.io/settings/dependency-resolution#minimumreleaseage))。
|
|
152
|
+
> 也就是说**别人发版后第一天内,`@latest` 拿到的永远是上一版**——这不是本插件的 bug,
|
|
153
|
+
> 是包管理器的供应链策略。
|
|
144
154
|
>
|
|
145
155
|
> 顺带:本包的 `0.0.0-stage` 那个早期测试版本元数据残缺(缺 `size` 字段),
|
|
146
156
|
> 冷缓存下走 `@latest` 解析时 pnpm 会因此直接失败(`numeric field was not a number`)。
|
|
@@ -149,10 +159,10 @@ dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.2
|
|
|
149
159
|
从 GitHub 安装(**必须带 tag**):
|
|
150
160
|
|
|
151
161
|
```powershell
|
|
152
|
-
dsh plugin --profile web add "github:MisonL/dsh-trajectory-traceview-plus#v0.11.
|
|
162
|
+
dsh plugin --profile web add "github:MisonL/dsh-trajectory-traceview-plus#v0.11.4"
|
|
153
163
|
```
|
|
154
164
|
|
|
155
|
-
> **为什么必须带 `#v0.11.
|
|
165
|
+
> **为什么必须带 `#v0.11.4`**:`github:` 规格不带 ref 时装的是**默认分支的 HEAD**,
|
|
156
166
|
> 不是任何发布版本。而这个仓库在发版后还会继续提交(本轮 v0.11.0 之后就有 5 个
|
|
157
167
|
> 文档/脚本提交),所以"不带 ref"装到的东西**明天可能是另一个样子**,而版本号
|
|
158
168
|
> 仍写着 0.11.0。带 tag 才能让"装到的"和"发布过的"是同一份代码。
|
|
@@ -230,8 +240,14 @@ dsh plugin --profile web add "G:\path\to\dsh-trajectory-traceview-plus"
|
|
|
230
240
|
## 10. 安全与合规
|
|
231
241
|
|
|
232
242
|
- **只读**:只读取会话视图已生成的 `TrajectorySnapshot` 快照并渲染;不修改 DOM 业务结构、不修改 / 删除任何文件、无宿主路由、不访问网络。
|
|
233
|
-
-
|
|
234
|
-
-
|
|
243
|
+
- **本地数据**:所有数据均在浏览器内处理;原始请求只在主动打开面板时才重建,不会上传到任何地方。
|
|
244
|
+
- **唯一的写入:`sessionStorage` 里两条视图状态**。为了在宿主重新挂载面板时不把你打回「总览 + 空搜索框」,每个会话存一条
|
|
245
|
+
`dstv:view:1:<会话键>`,内容是 `{ revealed, query }`——已展开到哪个位置(数字)和搜索框里的文字(≤200 字符)。
|
|
246
|
+
- **只在本标签页内**(sessionStorage 不是 localStorage):不跨标签、不跨窗口,关闭标签页即消失。
|
|
247
|
+
- **删除即消失**:两项都为空时这条键会被**移除**,不留空壳。
|
|
248
|
+
- **存储被禁用也能用**:所有访问都在 `try/catch` 里,宿主禁用存储时行为与之前完全一致,不抛错。
|
|
249
|
+
- 注意:搜索框里的文字会被写进去,**如果你在搜索框里输入过敏感内容,它会留在本标签页的 sessionStorage 里**,直到关标签页或清空搜索。
|
|
250
|
+
- **无持久化**:不写 localStorage / cookie / IndexedDB;没有服务端、没有埋点;卸载即无痕。
|
|
235
251
|
|
|
236
252
|
## 11. 开发与自测
|
|
237
253
|
|
|
@@ -246,8 +262,8 @@ node scripts/provenance.mjs
|
|
|
246
262
|
改了 `src/`却忘了重建时,`--check`会失败,`test/smoke.test.cjs`也会报 `BUILD1`。`lib/index.js`(宿主半部)是无操作桩;`lib/client.js`是经典脚本(`window.__ModuleLoader__.load`),由客户端模块系统直接服务。
|
|
247
263
|
|
|
248
264
|
```powershell
|
|
249
|
-
npm run check #
|
|
250
|
-
# doc-
|
|
265
|
+
npm run check # 8 步:build --check / provenance --check / version-check / doc-ref-check
|
|
266
|
+
# doc-heading-check / smoke / readme-numbers / shortcut-check
|
|
251
267
|
npm test # 只跑 smoke
|
|
252
268
|
```
|
|
253
269
|
|
|
@@ -256,8 +272,8 @@ npm test # 只跑 smoke
|
|
|
256
272
|
**需要真实浏览器的部分**(`react-dom/server` 测不到滚动、焦点、剪贴板、定时器、响应式):
|
|
257
273
|
|
|
258
274
|
```powershell
|
|
259
|
-
node scripts/browser-check.mjs # 起 harness,跑
|
|
260
|
-
node scripts/browser-check.mjs --shots # 另存截图,并另加 1 组 /
|
|
275
|
+
node scripts/browser-check.mjs # 起 harness,跑 189 条断言 / 记录 28 组观测
|
|
276
|
+
node scripts/browser-check.mjs --shots # 另存截图,并另加 1 组 / 3 条断言(375px 溢出,共 14 组)
|
|
261
277
|
```
|
|
262
278
|
|
|
263
279
|
它需要 `agent-browser`(Chrome via CDP)。**故意不进 CI**:把浏览器塞进 runner 的
|
|
@@ -320,13 +336,13 @@ MIT。原版 © [AFAP](https://github.com/AFAP/dsh-trajectory-traceview);本
|
|
|
320
336
|
# 1-3 改内容
|
|
321
337
|
# 改 package.json 的 version、补 CHANGELOG.md 的版本条目
|
|
322
338
|
node scripts/provenance.mjs # 4. 刷新来源清单(新增/改名文件后必须重跑)
|
|
323
|
-
npm run check # 5.
|
|
339
|
+
npm run check # 5. 8 步门禁,全绿再往下
|
|
324
340
|
git add -A; git commit -m "..." # 6.
|
|
325
341
|
git push origin main # 7.
|
|
326
|
-
git tag -a v0.11.
|
|
327
|
-
git push origin v0.11.
|
|
342
|
+
git tag -a v0.11.4 -m "..." # 8.
|
|
343
|
+
git push origin v0.11.4 # 9.
|
|
328
344
|
npm publish # 10. 触发 prepublishOnly → 再跑一遍 check
|
|
329
|
-
gh release create v0.11.
|
|
345
|
+
gh release create v0.11.4 --notes-file … # 11. 徽章读的是 Release,不是 tag
|
|
330
346
|
|
|
331
347
|
node scripts/release-status.mjs # 12. 四处对齐了吗?(tag / Release / npm 元数据 / tarball)
|
|
332
348
|
```
|
|
@@ -343,12 +359,12 @@ node scripts/release-status.mjs # 12. 四处对齐了吗?(tag / Rel
|
|
|
343
359
|
- 版本号相对已有 tag 倒退 → 同上(`F3`)
|
|
344
360
|
|
|
345
361
|
这些检查都在 CI 里跑(`.github/workflows/check.yml`),push 到 main 和提 PR 时自动执行。
|
|
346
|
-
门禁本身是
|
|
347
|
-
`version-check`、`doc-ref-check`、`doc-heading-check`、smoke、readme-numbers
|
|
362
|
+
门禁本身是 9 项:`build-client --check`、`node --check lib/client.js`、`provenance --check`、
|
|
363
|
+
`version-check`、`doc-ref-check`、`doc-heading-check`、smoke、readme-numbers、shortcut-check
|
|
348
364
|
(前面还有一步 `npm ci --include=dev` 装依赖)。
|
|
349
365
|
|
|
350
|
-
本地 `npm run check` 跑其中
|
|
351
|
-
`doc-ref-check`、`doc-heading-check`、smoke、readme-numbers)——只差 CI 里的
|
|
366
|
+
本地 `npm run check` 跑其中 8 步(`build-client --check`、`provenance --check`、`version-check`、
|
|
367
|
+
`doc-ref-check`、`doc-heading-check`、smoke、readme-numbers、shortcut-check)——只差 CI 里的
|
|
352
368
|
`node --check lib/client.js`,够用于日常提交;发布前再按 §11 把 `browser-check` 也跑一遍。
|
|
353
369
|
|
|
354
370
|
**这些数字本身也有门禁**:`readme-numbers` 直接从 `check.yml`、`package.json` 和
|