@zhuxixi/pi-agent-board 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +22 -4
- package/docs/superpowers/plans/2026-10-26-issue-245-key-hints-doc-sync.md +244 -0
- package/docs/superpowers/plans/2026-10-27-issue-172-fullscreen-selection-clear.md +344 -0
- package/docs/superpowers/plans/2026-10-27-issue-252-select-key-hints.md +209 -0
- package/docs/superpowers/plans/2026-10-28-issue-255-coordinator-endpoint-zombie.md +442 -0
- package/docs/superpowers/specs/2026-10-26-issue-245-key-hints-doc-sync-design.md +72 -0
- package/docs/superpowers/specs/2026-10-27-issue-172-fullscreen-selection-clear-design.md +248 -0
- package/docs/superpowers/specs/2026-10-27-issue-252-select-key-hints-design.md +95 -0
- package/docs/superpowers/specs/2026-10-28-issue-255-coordinator-endpoint-zombie-design.md +380 -0
- package/package.json +1 -1
- package/runner/state-coordinator.mjs +62 -5
- package/src/core/host-coordination.mjs +48 -0
- package/src/core/pty-scroll.mjs +8 -8
- package/src/ui/dashboard.ts +8 -5
- package/src/ui/pty-attach.ts +43 -15
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# spec — issue #245:key hints 与实际绑定同步(三条文档欠账)
|
|
2
|
+
|
|
3
|
+
Drafted: deepseek/deepseek-flash (selected) · deepseek/deepseek-flash (physical) @ 2026-10-26T22:40:00+08:00
|
|
4
|
+
Revised: deepseek/deepseek-flash (selected) · deepseek/deepseek-flash (physical) @ 2026-10-26T22:55:00+08:00 — cross-review R1:R1-D1 接受(D3 钉死 9 行小表,含 `?`/`!`);R1-D2 接受(U1/U2 补部署前置与可执行时机);R1-D3 接受(§5 补 fitToHeight 截尾陷阱);R1-D4 接受(删除无出处数字 89/1257,改为实测 1404)
|
|
5
|
+
|
|
6
|
+
基线:main @ 724c4da(v0.13.0 之后)。调研留档:`research/01-verify-three-gaps.md`(三条主张全部复核属实)。
|
|
7
|
+
|
|
8
|
+
## 1. 背景
|
|
9
|
+
|
|
10
|
+
#229 落地 vim 键位时按「加键须同步三处文案」的纪律补了 README 表、`?` 帮助面板、hints 行,但有三处历史欠账没覆盖:peek 视图的 in-view footer 仍宣传旧键位;README 的 Peek/Transcript 两表漏写 `!`;README 的多选段落从未写过移动键。本 issue 是一次纯文案同步,**无行为变更**。
|
|
11
|
+
|
|
12
|
+
## 2. 设计决策表
|
|
13
|
+
|
|
14
|
+
| # | 决策 | 依据 |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| D1 | peek footer 改为 `↑↓/j/k prev/next · →/l attach · d done · v transcript · e evidence · r reply · esc back` | 与 #237 给 session/evidence footer 补 `↑↓/j/k` 的写法严格一致;与 peek 的 `?` 行、README Peek 表口径对齐 |
|
|
17
|
+
| D2 | README Peek 表与 Transcript 表各加一行 `\| \`!\` \| Open node-pty diagnostics and repair hints. \|`,措辞照抄 Main list 表(:148) | 同一功能三种视图应同措辞;Evidence 表**不加**(`handleEvidenceKey` 无 `!` 分支) |
|
|
18
|
+
| D3 | README 多选段落改为**独立小表**(`### Multi-select`),**固定 9 行**,逐行对应 `handleSelectKey` 的全部绑定:`↑`/`↓`/`j`/`k` 移动 · `space` toggle · `a` 全选 · `u` 清空 · `d` 批量 Done · `ctrl+x` 删除 · `m`/`esc` 退出 · `?` 帮助 · `!` PTY 诊断 | select 模式现有 9 组绑定,句子已列 5 项;README 四视图凡绑定多的都用表格。**行数必须钉死 9,不可只写 7 组**——只列模式专属的 7 组会把 `?`/`!` 原样遗留,正是本 issue 在修的同类欠账(R1-D1)。**备选方案**:延伸 `README.md:120` 的句子(改动更小但可读性差)——见 §6 待裁决 |
|
|
19
|
+
| D4 | 顺手给 peek footer 加渲染断言(`test-support/vim-keys-wrap.ts` 的 `out.copy` 补 `peekRender`,A 项断言) | 现有探针断言了 list/select/session/evidence 渲染,**唯独漏 peek** —— 这正是本轮欠账能漂移的机制原因。不补则下次同样漂移 |
|
|
20
|
+
| D5 | 不动任何 handler 代码、不动 `?` 帮助面板、不动 hints 行 | 三处已正确;本 issue 只修「对外文档」侧,避免范围扩张 |
|
|
21
|
+
|
|
22
|
+
## 3. 改动清单
|
|
23
|
+
|
|
24
|
+
| 文件 | 位置 | 改动 |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `src/ui/dashboard.ts` | :1543 `renderPeek` footer | 文案 `↑↓ prev/next · →/> attach` → `↑↓/j/k prev/next · →/l attach` |
|
|
27
|
+
| `README.md` | Peek 表(:152-167) | 新增 `!` 行 |
|
|
28
|
+
| `README.md` | Transcript 表(:169-183) | 新增 `!` 行 |
|
|
29
|
+
| `README.md` | 多选段落(:120) | 依 D3 改为独立小表(或延伸句子,见 §6) |
|
|
30
|
+
| `test-support/vim-keys-wrap.ts` | `out.copy` 段 | 新增 `peekRender` 捕获 |
|
|
31
|
+
| `test/dashboard-vim-keys.test.mjs` | A7 测试 | 新增 peek footer 断言 |
|
|
32
|
+
|
|
33
|
+
## 4. 验收矩阵
|
|
34
|
+
|
|
35
|
+
| ID | 功能点 | 验收方式 | 具体验证 | 通过标准 |
|
|
36
|
+
|----|--------|----------|----------|----------|
|
|
37
|
+
| A1 | peek footer 渲染出 `j/k` 与 `l` | 自动化(unit,探针渲染) | `node --test test/dashboard-vim-keys.test.mjs` | `assert.match(peekRender, /↑↓\/j\/k prev\/next/)` 与 `/→\/l attach/` 均通过 |
|
|
38
|
+
| A2 | 改前先红、改后转绿 | 自动化(unit) | 同一命令,先提交断言跑一次 | 改文案前 FAIL(旧 footer 无 `j/k`);改后 PASS |
|
|
39
|
+
| A3 | peek footer 不再出现旧措辞 | 自动化(unit,探针渲染) | `assert.doesNotMatch(peekRender, /↑↓ prev\/next · →\/> attach/)` | 负向断言通过 |
|
|
40
|
+
| A4 | 其余视图 footer/hints 未回归 | 自动化(unit,现有断言) | `npm test` | 全量用例(当前实测 1404:1401 pass / 3 skipped / 0 fail)全绿,且 `dashboard-vim-keys` 两条测试均过 |
|
|
41
|
+
| A5 | typecheck + 全量门槛 | 自动化(build/test) | `npm run verify` | typecheck、perf gate、全测试、coverage 阈值(lines 85/funcs 80/branches 70)、pack:dry 全过 |
|
|
42
|
+
| U1 | README 三处改动可读且与代码一致 | 用户实测 | **前置**:PR 合并后 `git pull` main;本地 checkout 由 pi 自动发现加载(README:63 Development auto-discovery),重启 pi 后测;README 必须是合并后版本(旧版本内容不同)。**步骤**:① 对照 `### Peek` 表逐行按 `!`,确认打开 PTY 诊断(此绑定 v0.13.0 已存在,对旧版本同样成立)② 同样验 `### Transcript` ③ 进 `m` 多选模式,按小表**全部 9 行**逐项核对(移动 / space / a / u / d / ctrl+x / m·esc / `?` / `!`) | 三处无遗漏、无虚构键位;小表 9 行逐项可用 |
|
|
43
|
+
| U2 | peek footer 实际显示 | 用户实测 | **前置**:同 U1(新 footer 只存在于合并后的代码,旧安装仍是旧文案 → 不拉取就必然假失败)。**步骤**:`space` 进 peek,看底部提示行 | 显示 `↑↓/j/k prev/next · →/l attach · …` |
|
|
44
|
+
|
|
45
|
+
## 5. 可测性拆分设计
|
|
46
|
+
|
|
47
|
+
**不新增函数、不改拆分**:唯一的产品改动是 `renderPeek` 内一个字符串字面量。`renderPeek(width)` 已是独立纯渲染方法(输入 width,输出 string[]),副作用只在终端写入,符合「纯函数优先、副作用隔离」的既有结构。
|
|
48
|
+
|
|
49
|
+
**测试边界**:继续用 `test-support/vim-keys-wrap.ts` 探针 —— `dash.render(120)` 取整屏文本,正则断言(与 A7 现有 28 条渲染断言同类)。**不新增测试文件、不新增探针文件**:本 issue 的自动化面只有一条 footer 文案,扩展现有探针是最低成本层级(unit),无需 integration。
|
|
50
|
+
|
|
51
|
+
**⚠️ fitToHeight 截尾陷阱(R1-D3)**:`render()` 走 `fitToHeight`,它对超出行高的输出是**截尾部**(`src/ui/dashboard.ts:1280` `lines.slice(0, height)`)。peek footer 是 `renderPeek` 输出的**最后一行**,而探针终端默认 24 行——只要 peek 内容(Summary / Auto-state / Refs / Question / Latest output / Error 各段加 wrap 折行)超过 24 行,footer 就会被切掉,A1/A3 假红。**实现时必须在 peek 捕获前临时把 `tui.terminal.rows` 调大**(A7 段已用同样手法把 help 捕获提到 40 行,照此先例),或保证夹具视图足够矮。不处理会误判为渲染逻辑问题。
|
|
52
|
+
|
|
53
|
+
**README 三处不可自动化**:仓内无任何测试读 README(`rg -ln 'README' test/` 仅命中两个与文档无关的用例),为此新建 README-lint 测试属于超出本 issue 范围的基础设施投入 → 归 A5 之外的 U1 用户实测,spec 明说不自动化的原因。
|
|
54
|
+
|
|
55
|
+
## 6. 待裁决:D3 的呈现形态
|
|
56
|
+
|
|
57
|
+
- **方案 A(推荐)**:新增 `### Multi-select` 小表,与四个视图表并列。理由:9 组绑定用句子不可读;README 现有结构是「视图/模式 → 表」。
|
|
58
|
+
- **方案 B**:延伸 `README.md:120` 的句子加「`↑`/`↓`/`j`/`k` to move」。理由:diff 最小(一行),不动文档结构。
|
|
59
|
+
|
|
60
|
+
选 A 的代价是要动 README 章节结构(可能影响锚点);选 B 的代价是句子继续变长。
|
|
61
|
+
|
|
62
|
+
## 7. 非目标
|
|
63
|
+
|
|
64
|
+
- 不改任何 handler 行为、不改 `?` 帮助面板、不改 hints 行(D5)。
|
|
65
|
+
- 不给 Evidence 表加 `!`(该模式无此绑定)。
|
|
66
|
+
- 不新建 README 测试基础设施。
|
|
67
|
+
- 不处理 help 面板矮终端裁剪(那是 #246)。
|
|
68
|
+
|
|
69
|
+
## 8. 保证边界
|
|
70
|
+
|
|
71
|
+
- 只保证 §3 列出的六处改动;不保证 README 其它段落(如 `## Dashboard Workflow` 的叙述)与键位完全一致。
|
|
72
|
+
- A1–A4 只证明 peek footer 与既有渲染断言;README 三处的正确性仅由 U1 人工核对保证,无机器门禁——这是本 spec 明说的保证边界,不假装有自动化兜底。
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
Drafted: ollama/deepseek-v4.1-flash:1017-cloud (selected) · ollama/deepseek-v4.1-flash:1017-cloud (physical) @ 2026-10-27T00:16:00Z
|
|
2
|
+
Revised: ollama/deepseek-v4.1-flash:1017-cloud (selected) · ollama/deepseek-v4.1-flash:1017-cloud (physical) @ 2026-10-27T00:41:00Z — R1-G1 (U1 deployment preconditions), R1-D1 (README decision), R1-D2 (follow-up issue #250)
|
|
3
|
+
Revised: ollama/deepseek-v4.1-flash:1017-cloud (selected) · ollama/deepseek-v4.1-flash:1017-cloud (physical) @ 2026-10-27T00:52:00Z — R2-D1 (U1 sequencing), R2-D2 (supersession note), R2-D3 (baseline)
|
|
4
|
+
Revised: ollama/deepseek-v4.1-flash:1017-cloud (selected) · ollama/deepseek-v4.1-flash:1017-cloud (physical) @ 2026-10-27T01:25:00Z — local code review F1 (gesture-generation guard) + F3 (deferral pin) + F4 (predicate table)
|
|
5
|
+
|
|
6
|
+
# Spec: #172 — attach view keeps the fullscreen selection highlight after copy-on-release
|
|
7
|
+
|
|
8
|
+
Status: DRAFT (awaiting spec-cross-review, then user approval — github-issue-driven step 4 gates)
|
|
9
|
+
Issue: https://github.com/zhuxixi/pi-agent-board/issues/172
|
|
10
|
+
Repo state baseline: `origin/main` @ `3fcc2a4` (local working copy `724c4da`, one docs-only commit behind; every cited line number was re-verified at `3fcc2a4`), pi-tui / pi-coding-agent 1.1.0
|
|
11
|
+
|
|
12
|
+
## Problem (root cause, verified against source)
|
|
13
|
+
|
|
14
|
+
The reported symptom is real, but the issue's Root cause paragraph points at the wrong
|
|
15
|
+
mechanism. In **fullscreen** (pi ≥1.0, `TuiAltScreen` owns left-drag), the highlight is
|
|
16
|
+
painted by pi-tui's own `applySelection()` from `selectionAnchor` / `selectionFocus`.
|
|
17
|
+
`PtyAttachComponent.handleLocalMouseEvent` — the `shouldCopy` branch the issue blames — is
|
|
18
|
+
never reached in fullscreen (the component's own comment at `pty-attach.ts:474`), so
|
|
19
|
+
`this.selection` stays null and no board-side `clearSelection()` can affect what the user
|
|
20
|
+
sees.
|
|
21
|
+
|
|
22
|
+
pi-tui 1.1.0 `dist/tui-alt-screen.js:1090-1139` release path:
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
if (this.copyOnSelect)
|
|
26
|
+
void this.copySelectionToClipboard();
|
|
27
|
+
this.requestRender();
|
|
28
|
+
return;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The copy is done, the selection state is not reset, so the inverse-video highlight stays
|
|
32
|
+
lit until pi clears it on a later gesture (`clearTextSelection()` is invoked by pi itself
|
|
33
|
+
when the user clicks a component or moves focus).
|
|
34
|
+
|
|
35
|
+
The repo already has the one hook that runs after pi finalizes a selection: #174's
|
|
36
|
+
`process.nextTick` callback scheduled from `handleMouse` for left `release`/`click`
|
|
37
|
+
(`pty-attach.ts:523-528` → `mirrorFullscreenSelectionToPrimary()`, `:1376`).
|
|
38
|
+
|
|
39
|
+
## Goal / non-goals
|
|
40
|
+
|
|
41
|
+
**Goal**: in fullscreen, once pi's copy-on-select has completed for a selection gesture
|
|
42
|
+
that ends inside the attach view, drop pi's selection so the highlight disappears
|
|
43
|
+
immediately — without changing what reaches the clipboard, and without breaking pi's
|
|
44
|
+
multi-click chain (double-click word, triple-click line).
|
|
45
|
+
|
|
46
|
+
**Supersedes** #174's "pi's own selection behavior (visuals, CLIPBOARD copy) is untouched" for
|
|
47
|
+
the post-copy highlight only; #174's mirror, kill-switch and no-consume contracts are
|
|
48
|
+
preserved.
|
|
49
|
+
|
|
50
|
+
**Non-goals**:
|
|
51
|
+
|
|
52
|
+
- The legacy/regular-mode gap (`handleLocalMouseEvent` `shouldCopy` missing
|
|
53
|
+
`clearSelection()`). It is a real, separate bug; this PR leaves regular-mode behavior
|
|
54
|
+
untouched and the existing `pty-attach-legacy-drag` assertions intact. It will be tracked
|
|
55
|
+
separately: issue #250.
|
|
56
|
+
- Selections that end outside the attach overlay (dashboard, other pi UI): outside the
|
|
57
|
+
component's event window, same limitation as the #174 mirror.
|
|
58
|
+
- Any upstream change to pi/pi-tui. The change uses a feature-detected private method; if
|
|
59
|
+
pi ever exposes a public "clear visual selection" API, this code can switch to it.
|
|
60
|
+
- Changing `AGENT_BOARD_ATTACH_NATIVE_PASTE` semantics beyond making the highlight clear
|
|
61
|
+
independent of it (see D2 below).
|
|
62
|
+
|
|
63
|
+
## Decisions
|
|
64
|
+
|
|
65
|
+
**D1 — clear via `clearTextSelection()`, not `resetTextSelection()`.**
|
|
66
|
+
`resetTextSelection()` is public but also clears `lastClick`; `getClickCount` uses
|
|
67
|
+
`lastClick` with `DOUBLE_CLICK_INTERVAL_MS = 500`, so clearing it on every release would
|
|
68
|
+
make the second press of a double-click count as a first click and break word/line
|
|
69
|
+
selection. `clearTextSelection()` only drops the visual selection
|
|
70
|
+
(`tui-alt-screen.js:689-698`), preserving the click chain. It is declared `private` in
|
|
71
|
+
pi-tui's typings but is a plain prototype method at runtime; the board already reads the
|
|
72
|
+
private `getActiveSelectionText` the same way (`pty-attach.ts:1379`). Access is
|
|
73
|
+
feature-detected so older/newer pi degrades to today's behavior instead of throwing.
|
|
74
|
+
|
|
75
|
+
**D2 — decouple the clear from `AGENT_BOARD_ATTACH_NATIVE_PASTE`.**
|
|
76
|
+
That switch is documented as X11 PRIMARY copy + middle-click paste integration. The stale
|
|
77
|
+
highlight is a pi-selection-state issue, not a clipboard concern: with the switch off, pi
|
|
78
|
+
still copies on release and the highlight still lingers. `writePrimarySelection()` already
|
|
79
|
+
self-gates on the env var, so the scheduling predicate does not need it — the mirror keeps
|
|
80
|
+
its exact behavior, and the clear runs regardless.
|
|
81
|
+
|
|
82
|
+
**D3 — only clear when pi actually copied.**
|
|
83
|
+
`getCopyOnSelect()` (public) is checked before clearing. With copy-on-select disabled the
|
|
84
|
+
user keeps the selection deliberately (pi's `Ctrl+X` copies it), so the highlight must
|
|
85
|
+
stay. With it enabled, the text is already in the clipboard, so the highlight has no
|
|
86
|
+
remaining purpose.
|
|
87
|
+
|
|
88
|
+
**D4 — clear only for a non-empty selection.**
|
|
89
|
+
`getActiveSelectionText()` returning empty/undefined means no selection was made (bare
|
|
90
|
+
press-release, click on a link) — nothing to clear, and pi's own click handling is left
|
|
91
|
+
untouched.
|
|
92
|
+
|
|
93
|
+
**D5 — a settle may not consume the next gesture.**
|
|
94
|
+
pi-tui emits batched mouse reports synchronously in one loop, so a `release` and the next
|
|
95
|
+
left `press` can land in the same stdin chunk. Without a guard, the deferred settle would
|
|
96
|
+
run after that press has already started a new (word/line) selection, mirror it, and clear
|
|
97
|
+
it — the double-click would then copy nothing. A monotonic `selectionGestureSerial`,
|
|
98
|
+
bumped on every left press, is captured when the settle is scheduled; a mismatch on the
|
|
99
|
+
next tick drops the settle.
|
|
100
|
+
|
|
101
|
+
## Design
|
|
102
|
+
|
|
103
|
+
### 1. Pure predicate (`src/core/pty-scroll.mjs`)
|
|
104
|
+
|
|
105
|
+
Replace the env-gated mirror helper with an env-free gesture predicate:
|
|
106
|
+
|
|
107
|
+
```js
|
|
108
|
+
/** Issue #174/#172: whether a normalized mouse event ends a fullscreen text
|
|
109
|
+
* selection gesture the attach overlay settles — mirror the selection into
|
|
110
|
+
* X11 PRIMARY (#174) and drop pi's highlight once copy-on-select has run (#172).
|
|
111
|
+
* Only release/click of the left button ends a selection in TuiAltScreen; pi
|
|
112
|
+
* owns the gesture, so the overlay observes without consuming. Pure. */
|
|
113
|
+
export function isFullscreenSelectionEnd(event) → boolean
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Decision table:
|
|
117
|
+
|
|
118
|
+
| type | button | result |
|
|
119
|
+
| --- | --- | --- |
|
|
120
|
+
| release / click | left | `true` |
|
|
121
|
+
| press / move / drag / wheel | any | `false` |
|
|
122
|
+
| release / click | middle / right / none | `false` |
|
|
123
|
+
|
|
124
|
+
`shouldMirrorSelectionToPrimary` is removed; `writePrimarySelection()` remains the single
|
|
125
|
+
place that honours `AGENT_BOARD_ATTACH_NATIVE_PASTE`.
|
|
126
|
+
|
|
127
|
+
### 2. Component wiring (`src/ui/pty-attach.ts`)
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
const nativePasteEnabled = process.env.AGENT_BOARD_ATTACH_NATIVE_PASTE !== "0";
|
|
131
|
+
// D5: a press starts a new gesture; see the serial check below.
|
|
132
|
+
if (event.type === "press" && event.button === "left") this.selectionGestureSerial += 1;
|
|
133
|
+
if (isFullscreenSelectionEnd(event)) {
|
|
134
|
+
// Overlays are dispatched before TuiAltScreen finalizes (and copies) the
|
|
135
|
+
// selection for this event, so settle on the next tick (issue #174).
|
|
136
|
+
const serial = this.selectionGestureSerial;
|
|
137
|
+
process.nextTick(() => {
|
|
138
|
+
if (serial !== this.selectionGestureSerial) return; // D5: next gesture started
|
|
139
|
+
this.settleFullscreenSelection(nativePasteEnabled);
|
|
140
|
+
});
|
|
141
|
+
return undefined; // observe only — pi keeps the gesture
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
`mirrorFullscreenSelectionToPrimary()` is renamed and extended:
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
interface FullscreenSelectionHost {
|
|
149
|
+
getActiveSelectionText?: () => string | undefined;
|
|
150
|
+
getCopyOnSelect?: () => boolean;
|
|
151
|
+
clearTextSelection?: () => void; // private in pi-tui's typings; feature-detected
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** Issue #174 (B2) + #172: after a selection gesture ends inside this overlay,
|
|
155
|
+
* pi has finalized (and copied) its selection. Mirror the text into X11 PRIMARY
|
|
156
|
+
* so middle-click paste works, then drop pi's selection so the inverse-video
|
|
157
|
+
* highlight does not outlive the copy. Clearing is gated on copy-on-select and
|
|
158
|
+
* on the pi-tui method being present; a missing method degrades to the old
|
|
159
|
+
* behaviour (highlight persists) rather than throwing. */
|
|
160
|
+
private settleFullscreenSelection(nativePasteEnabled: boolean): void {
|
|
161
|
+
if (this.closed) return;
|
|
162
|
+
const alt = this.tui as FullscreenSelectionHost;
|
|
163
|
+
const text = alt.getActiveSelectionText?.();
|
|
164
|
+
if (typeof text !== "string" || text.length === 0) return;
|
|
165
|
+
if (nativePasteEnabled) this.writePrimarySelection(text);
|
|
166
|
+
if (alt.getCopyOnSelect?.() === false) return;
|
|
167
|
+
if (typeof alt.clearTextSelection !== "function") return;
|
|
168
|
+
alt.clearTextSelection();
|
|
169
|
+
this.scheduleRender(); // pi's own release repaint happened before this tick
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Resulting behavior matrix
|
|
174
|
+
|
|
175
|
+
| Scenario | Behavior |
|
|
176
|
+
| --- | --- |
|
|
177
|
+
| fullscreen: drag-select inside attach, release | copied by pi; PRIMARY mirrored; highlight cleared on the next tick ✅ |
|
|
178
|
+
| fullscreen: double-click a word, release | word copied by pi; word highlighted momentarily, then cleared; triple-click chain still works (`lastClick` untouched) ✅ |
|
|
179
|
+
| fullscreen: plain left click | empty selection → nothing cleared, pi's own click handling untouched |
|
|
180
|
+
| fullscreen: `fullscreenCopyOnSelect = false` | selection kept for `Ctrl+X`; highlight stays (intended) |
|
|
181
|
+
| fullscreen: `AGENT_BOARD_ATTACH_NATIVE_PASTE=0` | no PRIMARY write; highlight still cleared |
|
|
182
|
+
| older pi without `clearTextSelection` | no PRIMARY-write change, highlight stays (graceful degradation) |
|
|
183
|
+
| regular / legacy mode | unchanged: `handleMouse` is not called; the local selection path is untouched |
|
|
184
|
+
|
|
185
|
+
## Acceptance matrix
|
|
186
|
+
|
|
187
|
+
| ID | 功能点 | 验收方式 | 具体验证 | 通过标准 |
|
|
188
|
+
|----|--------|----------|----------|----------|
|
|
189
|
+
| A1 | 手势谓词决策表 | 自动化验证(unit) | `node --test test/pty-scroll.test.mjs`(替换原 `shouldMirrorSelectionToPrimary` 用例,覆盖 release/click × left 为 true,press/move/drag/wheel/其它按钮为 false) | 新增用例全绿 |
|
|
190
|
+
| A2 | 非空选区 release:镜像 + 清高亮,且先取文本后清 | 自动化验证(integration,组件级场景) | `test/pty-attach-selection-mirror-scenario.ts` 的 fake TUI 增加 `clearTextSelection()`(置空 fixture 并计数)与 `getCopyOnSelect()`;`test/pty-attach-selection-mirror.test.mjs` 断言 | xclip 日志收到 `-selection primary` 与 fixture 文本(证明清除前已读取),`clearCalls === 1`,`handleMouse` 返回 `undefined` |
|
|
191
|
+
| A3 | 空选区 / press / move 不清 | 自动化验证(同上) | 同场景 | `clearCalls === 0`,无 PRIMARY 写 |
|
|
192
|
+
| A4 | `copyOnSelect === false` 不清、仍镜像 | 自动化验证(同上) | 同场景,fake TUI 返回 false | `clearCalls === 0`,PRIMARY 写 1 次 |
|
|
193
|
+
| A5 | `NATIVE_PASTE=0`:不写 PRIMARY 但仍清高亮 | 自动化验证(同上) | 同场景,env 覆盖 | `killSwitchWrites === 0`,`killSwitchClears === 1` |
|
|
194
|
+
| A6 | 旧 pi(无 `clearTextSelection`):降级不抛错 | 自动化验证(同上) | 同场景,fake TUI 省略该方法 | 无异常,PRIMARY 写 1 次,`clearCalls` 不可用(不适用) |
|
|
195
|
+
| A7 | 类型与构建 | 自动化验证(static/build) | `npm run typecheck`、`npm run verify` | 全部通过(含既有套件、覆盖率阈值、perf gate、pack:dry) |
|
|
196
|
+
| A8 | release + 下一次 press 同 tick 合并:排队中的 settle 不得读/清新选区 | 自动化验证(同上) | 同场景:`handleMouse(release)` 后立即 `handleMouse(press)`,再等 tick | `coalescedWrites === 0` 且 `coalescedClears === 0`;另在 release 后同步断言 `releaseSyncWrites === 0`(deferral 钉死) |
|
|
197
|
+
| U1 | 真机 fullscreen 体验 | 用户实测 | **前置**:① 合并后把 pi 实际加载的 git checkout 更新到 main —— 扩展在 `~/.pi/agent/settings.json` 以 `git:github.com/zhuxixi/pi-agent-board` 注册,路径为 `~/.pi/agent/git/github.com/zhuxixi/pi-agent-board`,入口 `./index.ts`(免构建);执行 `git -C ~/.pi/agent/git/github.com/zhuxixi/pi-agent-board pull --ff-only`,若因本地 `package-lock.json` 改动被拒就先 `git stash push -- package-lock.json`、测完 `git stash pop`;② 完全退出并重启 pi(扩展启动时加载;fullscreen 是默认模式,必要时用 `pi --tui-mode fullscreen` 显式指定);③ 确认 X11 会话且 `which xclip` 有输出。**步骤**:① fullscreen attach 内拖选一段文字并松开 → 高亮立即消失;② 中键粘贴仍粘贴刚选内容;③ 双击选词 → 高亮消失且双击仍能选词;④ 三击选行仍生效;⑤ 把 `~/.pi/agent/settings.json` 的 `"fullscreenCopyOnSelect"` 设为 `false` 并重启,拖选松开 → 高亮保留、`Ctrl+X` 可复制;测完恢复默认并重启 | ①–⑤ 全部符合 |
|
|
198
|
+
|
|
199
|
+
## Testability split design (hard constraint for implementation)
|
|
200
|
+
|
|
201
|
+
- **Pure core**: `isFullscreenSelectionEnd(event)` — no env reads, no side effects; full
|
|
202
|
+
event-shape decision table at unit level (A1).
|
|
203
|
+
- **I/O shell**: `handleMouse` maps the predicate to one `process.nextTick` schedule;
|
|
204
|
+
`settleFullscreenSelection()` owns the ordering (`getActiveSelectionText` →
|
|
205
|
+
`writePrimarySelection` → clear → `scheduleRender`). The gesture serial lives on the
|
|
206
|
+
component (`handleMouse` bumps it on left press, the scheduled closure compares it) and
|
|
207
|
+
needs no separate unit test: A8 drives it through the public seam. The only xclip touch point stays
|
|
208
|
+
`writePrimarySelection`; the only pi-selection touch points stay `getActiveSelectionText`
|
|
209
|
+
/ `getCopyOnSelect` / `clearTextSelection`, all through the structural cast.
|
|
210
|
+
- **Fake TUI seams** (component scenario): `getActiveSelectionText`, `getCopyOnSelect`,
|
|
211
|
+
`clearTextSelection`, `requestRender`. `clearTextSelection` must invalidate the fixture
|
|
212
|
+
so that a wrong order (clear → read) produces zero PRIMARY writes and fails A2 — the
|
|
213
|
+
test must not merely count calls.
|
|
214
|
+
- The clear must not be inlined into `handleMouse` (it needs the deferred tick) and must
|
|
215
|
+
not be replicated in the legacy path.
|
|
216
|
+
|
|
217
|
+
## Risks / notes
|
|
218
|
+
|
|
219
|
+
- Private API coupling: `clearTextSelection` can disappear in a future pi-tui. Mitigated
|
|
220
|
+
by feature detection (degrade, never throw) and by a comment naming the upstream ask
|
|
221
|
+
(expose a public "clear visual selection, keep click history" method).
|
|
222
|
+
- If pi ever defers selection finalization across ticks, the clear would land before the
|
|
223
|
+
copy; the `copyOnSelect` gate would then clear a selection pi is about to copy. Accepted
|
|
224
|
+
risk recorded here; the ordering assumption is pinned by A2's read-before-clear fixture.
|
|
225
|
+
- `Ctrl+X` (pi's copy binding) after a drag becomes a no-op when copy-on-select is on —
|
|
226
|
+
by construction, the text is already in the clipboard; when the user disabled
|
|
227
|
+
copy-on-select, the clear is skipped and `Ctrl+X` still works.
|
|
228
|
+
- The highlight for gestures ending outside the overlay remains (same as #174's mirror
|
|
229
|
+
limitation).
|
|
230
|
+
- A release followed by another press inside one stdin chunk is guarded by the gesture
|
|
231
|
+
serial (D5/A8). A press that lands outside the overlay does not touch the serial, but
|
|
232
|
+
pi's own press path has already reset its selection, so the settle reads nothing.
|
|
233
|
+
- Updating the issue's Root cause / Environment text is part of the PR narrative, not of
|
|
234
|
+
the code change.
|
|
235
|
+
|
|
236
|
+
## Deliverables
|
|
237
|
+
|
|
238
|
+
- `src/core/pty-scroll.mjs`: replace `shouldMirrorSelectionToPrimary` with
|
|
239
|
+
`isFullscreenSelectionEnd`
|
|
240
|
+
- `src/ui/pty-attach.ts`: predicate branch in `handleMouse`; rename/extend
|
|
241
|
+
`settleFullscreenSelection`; `FullscreenSelectionHost` structural type
|
|
242
|
+
- `test/pty-scroll.test.mjs`: decision-table update
|
|
243
|
+
- `test-support/pty-attach-selection-mirror-scenario.ts` + `test/pty-attach-selection-mirror.test.mjs`:
|
|
244
|
+
clear/order/copyOnSelect/kill-switch/fallback cases
|
|
245
|
+
- No README change: the `AGENT_BOARD_ATTACH_NATIVE_PASTE` row (README:323) describes X11
|
|
246
|
+
PRIMARY copy + middle-click paste, which is still exactly what the switch governs; the
|
|
247
|
+
highlight clear is neither, so the current wording stays accurate after the decoupling.
|
|
248
|
+
- CHANGELOG entry via release tooling at release time (not in this PR)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# spec — issue #252:SELECT 模式的 in-app 文案对齐(hint 行 / `?` 覆盖层 / `!` 措辞)
|
|
2
|
+
|
|
3
|
+
Drafted: deepseek/deepseek-flash (selected) · deepseek/deepseek-flash (physical) @ 2026-10-27T23:28:00+08:00
|
|
4
|
+
Revised: deepseek/deepseek-flash (selected) · deepseek/deepseek-flash (physical) @ 2026-10-27T23:47:00+08:00 — cross-review R2(收敛轮,0 真缺口):R2-D1 接受(§5 残留的 `rg` 改为 `grep -c`,与 §4 A8 一致);R2-D2 接受(`pty-support.mjs:155` → `src/core/pty-support.mjs:155`);R2-D3 接受(U1 前置补 checkout 加载出处 + 重开 pi 会话)
|
|
5
|
+
|
|
6
|
+
基线:`main @ 3fcc2a4`(#249 之后)。调研留档(仓外,不随 PR 提交):`~/.github-issue-driven/zhuxixi/pi-agent-board/issue-252/research/` 下的 `01-surfaces-audit.md`、`02-wording-evidence.md`、`03-test-harness.md`。
|
|
7
|
+
授权:`authorization.md` → `Gate: auto`(合并前仍需用户明确批准)。
|
|
8
|
+
|
|
9
|
+
## 1. 背景
|
|
10
|
+
|
|
11
|
+
`handleSelectKey`(`src/ui/dashboard.ts:398-423`)绑 9 组键:移动(`↑`/`↓`/`j`/`k`)、`space` toggle、`a` 全选、`u` 清空、`d` 批量 Done、`ctrl+x` 批量删除、`m`/`esc`/`ctrl+c` 退出、`?` 帮助、`!` PTY 诊断。
|
|
12
|
+
|
|
13
|
+
面向用户的两个 in-app 表面都落后于这份清单:
|
|
14
|
+
|
|
15
|
+
- **SELECT hint 行**(`listHints()`,`:1347-1358`)写 7 项,缺 `m`/`?`/`!`,且**现状已 122 字符**——120 列终端就被裁掉 2 字符(`esc cancel` → `esc canc`)。
|
|
16
|
+
- **`?` 覆盖层**(`renderHelp`,`:1723`)的 `In select` 行写的是 `j/k move · a select all · u clear · d move done · ctrl+x delete · esc cancel`:缺 `space`(该模式最常用的键)、方向键、`m`、`?`、`!`。
|
|
17
|
+
|
|
18
|
+
另外 `!` 的措辞三处不一致:README 六处 `repair hints`,覆盖层 `fix steps`,运行时面板用 `Fix:` + `Suggested steps`。
|
|
19
|
+
|
|
20
|
+
本 issue 是**纯文案同步**,无键位/行为变更。
|
|
21
|
+
|
|
22
|
+
## 2. 设计决策表
|
|
23
|
+
|
|
24
|
+
| # | 决策 | 依据 |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| D1 | SELECT hint 行改为 11 个 token 的紧凑形态:`${n} selected` · [`•${u} unread`] · `↑↓/j/k move` · `space toggle` · `a all visible` · `u clear` · `d done` · `ctrl+x delete` · `m/esc cancel` · `? help` · `! pty`(131 可见字符;带 unread 143) | 9 项全在;相对现状只长 9 字符。压缩方式:`d move done`→`d done`、`ctrl+x delete done`→`ctrl+x delete`、`esc cancel`→`m/esc cancel`。保留 `all visible` 的语义精度(过滤态下 `a` 只选可见行) |
|
|
27
|
+
| D2 | `In select` 行改为:`↑↓/j/k move · space toggle · a all · u clear · d done · ctrl+x delete · m/esc cancel`(渲染 101 列) | 只写本模式专属语义;`?`/`!` 由 D3 的全局行覆盖,不在本行重复。**该行决定整个帮助盒子的宽度**(`renderCenteredBox` 取最长行):在 D2 行基础上再补 `? help`/`! pty` 为 118 列(若保留原 `a all visible` 写法则为 126 列),两种形态都超过 120 列终端的 `width-6=114` 上限,在 120 列也照样被裁(research/01 §B) |
|
|
28
|
+
| D3 | 覆盖层新增一行 `["?", "Open the key help overlay (list and multi-select)"]`,位置在 `/` 行与 `!` 行之间 | `?` 只绑在 list(`:373`)与 select(`:421`),覆盖层 26 行里一句都没有——这是 issue 未点明的第三处缺口。`!` 已有全局行,故 D2 不重复它 |
|
|
29
|
+
| D4 | `!` 的 canonical 措辞 = `fix steps`:README 六处改齐(4 张表 + `:289` + `:368`);覆盖层 `:1716` 不动 | 面板自己写 `Fix:` / `Suggested steps`,字段名 `fixHint`/`steps`,代码注释(`src/core/pty-support.mjs:155`)也是 `fix steps`;反向对齐要改运行时代码且与面板自相矛盾(research/02) |
|
|
30
|
+
| D5 | 不动 handler、不动键位、不动 `#246` 的高度适配、不新增 README 表格、不回改历史 spec/plan | 范围纪律。#245 的 D5 是「in-app 三处就其 j/k/l 范围而言已正确,故不动」,并非把 in-app 侧 defer 给后续 issue;本 issue 处理的是 #245 范围**之外**的 SELECT 表面(hint 行的 `m`/`?`/`!`、`In select` 行、`!` 措辞),两者不冲突 |
|
|
31
|
+
|
|
32
|
+
### D1 的取舍:为什么接受「窄终端裁尾」
|
|
33
|
+
|
|
34
|
+
11 个 token 在任何布局下都塞不进 80 列,131 字符在 120 列仍会裁掉尾部(`? help`/`! pty`)。三个理由支撑这个取舍:
|
|
35
|
+
|
|
36
|
+
1. 仓库既有行为就是裁尾:NORMAL hint 行 **238 字符**,240 列才完整(实测,research/01 §A)。
|
|
37
|
+
2. 裁掉的恰好是两个辅助键:`m/esc cancel` 止于第 114 列,在 120 列终端**完整可见**,被裁的只有尾部 `? help` / `! pty`——安全优先。
|
|
38
|
+
3. `?`/`!` 在覆盖层(D3 + `!` 全局行)与 README 里都有完整说明,不依赖 hint 行发现。
|
|
39
|
+
|
|
40
|
+
**被否决的替代方案**:SELECT footer 折成两行(改 `renderFooter`,让 select 模式多占一行)。它能让 80 列也全可见,但会改变 footer 高度、且仓库没有任何多行 hint 先例,属于布局变更而非文案同步——留给 `#246` 的高度适配一并考虑。
|
|
41
|
+
|
|
42
|
+
### 与 `#246` 的交互
|
|
43
|
+
|
|
44
|
+
新增 `?` 行使帮助盒子从 32 行变 **33 行**,`#246` 的裁剪阈值随之多一行。此处不做补偿(不加行数压缩、不删 `normal`/`insert` 说明行):`#246` 的方向就是重构高度适配,提前在文案侧做布局妥协会让它的方案空间变窄。
|
|
45
|
+
|
|
46
|
+
## 3. 改动清单
|
|
47
|
+
|
|
48
|
+
| 文件 | 位置 | 改动 |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `src/ui/dashboard.ts` | `listHints()` SELECT 分支 `:1348-1357` | 按 D1 替换 token 列表 |
|
|
51
|
+
| `src/ui/dashboard.ts` | `renderHelp()` rows `:1723` | `In select` 行按 D2 替换 |
|
|
52
|
+
| `src/ui/dashboard.ts` | `renderHelp()` rows `:1715` 后 | 按 D3 插入 `?` 行 |
|
|
53
|
+
| `README.md` | `:148` `:166` `:180` `:200` | `repair hints` → `fix steps` |
|
|
54
|
+
| `README.md` | `:289` | `diagnosis and repair hints` → `diagnosis and fix steps` |
|
|
55
|
+
| `README.md` | `:368` | `follow its repair hints` → `follow its fix steps` |
|
|
56
|
+
| `test-support/vim-keys-wrap.ts` | capture 段 `:130` 之后 | 先插捕获代码:`tui.terminal.rows = 40`,在 SELECT 模式下取 `dash.render(160).join("\n")`,随后恢复 `rows = 24`(照 `:122-126` 的既有手法) |
|
|
57
|
+
| `test-support/vim-keys-wrap.ts` | `out.copy`(`:146`,单行对象字面量) | 把 `selectWide` 加进该对象 |
|
|
58
|
+
| `test/dashboard-vim-keys.test.mjs` | 末尾 | 新增一条 test(A1-A6) |
|
|
59
|
+
|
|
60
|
+
## 4. 验收矩阵
|
|
61
|
+
|
|
62
|
+
| ID | 功能点 | 验收方式 | 具体验证 | 通过标准 |
|
|
63
|
+
|----|--------|----------|----------|----------|
|
|
64
|
+
| A1 | SELECT hint 行文档化 9 组绑定中的 7 个键 + 2 个辅助键 | 自动化(unit,探针渲染) | `node --test test/dashboard-vim-keys.test.mjs`,对 `selectWide` 断言 `/↑↓\/j\/k move/`、`/space toggle/`、`/a all visible/`、`/u clear/`、`/d done/`、`/ctrl\+x delete/`、`/m\/esc cancel/`、`/· \? help · ! pty/` | 8 条全部通过 |
|
|
65
|
+
| A2 | 旧措辞不再出现 | 自动化(unit) | 同命令,`assert.doesNotMatch(selectWide, /d move done/)`、`/ctrl\+x delete done/` | 2 条负向断言通过 |
|
|
66
|
+
| A3 | hint 行宽度受控(防再次膨胀) | 自动化(unit) | 从 `selectWide` 取含 `[SELECT]` 的行,`trimEnd().length` 断言 `<= 132` | 131 ≤ 132 通过;超过即红 |
|
|
67
|
+
| A4 | 覆盖层 `In select` 行同步 | 自动化(unit,探针 `help120`,rows=40) | `/In select.*↑↓\/j\/k move/`、`/In select.*space toggle/`、`/In select.*a all · u clear/`、`/In select.*d done/`、`/In select.*ctrl\+x delete/`、`/In select.*m\/esc cancel/`;负向 `/In select.*a select all/` | 6 条正向 + 1 条负向通过 |
|
|
68
|
+
| A5 | 覆盖层新增 `?` 行 | 自动化(unit,`help120`) | `/\?\s+Open the key help overlay \(list and multi-select\)/` | 通过 |
|
|
69
|
+
| A6 | `!` 措辞统一(in-app 侧) | 自动化(unit,`help120`) | `/Open node-pty diagnostics and fix steps/` 且 `doesNotMatch(/repair hints/)` | 通过 |
|
|
70
|
+
| A7 | 无回归 | 自动化(unit,全量) | `npm test` | 全绿,尤其既有 `dashboard-vim-keys` 两条用例 |
|
|
71
|
+
| A8 | README 六处措辞改齐 | 自动化(static,grep;dev 工具,未入 CI) | `grep -c 'repair hints' README.md` → 0 行匹配;`grep -c 'fix steps' README.md` → 6 | 两个计数符合预期 |
|
|
72
|
+
| A9 | 类型/构建/覆盖率门槛 | 自动化(build + test) | `npm run verify` | typecheck、perf gate、全测试、coverage(lines 85 / funcs 80 / branches 70)、pack:dry 全过 |
|
|
73
|
+
| U1 | 真机观感 | 用户实测 | **前置**:PR 合并后在本 checkout `git pull`;确认扩展从本 checkout 加载(README `### Development auto-discovery`:`ln -s "$(pwd)" ~/.pi/agent/extensions/agent-board`,或 `pi install "$(pwd)"`;npm registry 副本要等发版才能看到改动);**重开 pi 会话**后测(扩展只在 pi 启动时加载,已在跑的实例不会拾取新代码)。**步骤**:① `pi /agent-board`,按 `m`,看底栏是否完整列出 9 项(终端 ≥132 列时可全见,120 列时尾部 `? help`/`! pty` 会被裁——符合 D1 取舍)② 按 `?`,看 `In select` 行含 `space toggle` ③ 在覆盖层确认 `?` 行与 `!` 行文案 ④ 按 `!`:面板标题恒为 `node-pty diagnostics`;**若 PTY 健康**,确认只显示 `Status: healthy`(正文无 `repair hints` 旧措辞即符合 D4);**若面板进故障分支**,确认分节标签为 `Fix:` / `Suggested steps`(这两段只在非健康分支渲染,健康机器上不出现是预期的) ⑤ 按 `m` 或 `esc` 退出 | 五步观察与 D1-D4 一致;若 120 列下尾部裁剪超出预期,记录实际宽度并回报(不视为失败,D1 已声明取舍) |
|
|
74
|
+
|
|
75
|
+
## 5. 可测性拆分设计
|
|
76
|
+
|
|
77
|
+
**不新增函数、不改拆分。** 两个改动点都是既有渲染路径里的字符串字面量:
|
|
78
|
+
|
|
79
|
+
- `listHints()`(`:1340`)已是纯字符串构造:输入 `this.mode` / `selectionCount()` / `unreadCount()` / `input`,输出 `string`,无 I/O、无副作用;由 `renderFooter` 消费。**不把 token 数组提成模块常量**:那样测试只能断言常量自身(同义反复),反而弱于在渲染面上断言。
|
|
80
|
+
- `renderHelp()`(`:1698`)已是 `width -> string[]` 的纯渲染方法,`rows` 是方法内字面量;同样保持内联。
|
|
81
|
+
|
|
82
|
+
**测试边界**:`test-support/vim-keys-wrap.ts`(探针,`node --experimental-transform-types`)→ `test/dashboard-vim-keys.test.mjs`(`node:test` + `assert/strict`)。这是本仓既定的 dashboard 文本断言层级(unit),不需要 integration / E2E:改动不跨组件、不涉及文件或协议。
|
|
83
|
+
|
|
84
|
+
**探针改造(最小)**:现有 `selectRender`(`test-support/vim-keys-wrap.ts:130`)是 120 列,新行 131 字符会被 `clip()` 裁尾 → A1/A3 假红。故新增 `selectWide`(`rows = 40` 下 `render(160)`,插在 `:130` 之后,结果挂进 `:146` 的 `out.copy`)。覆盖层断言复用既有 `help120`(已是 rows=40,绕开 `#246` 的裁剪)。
|
|
85
|
+
|
|
86
|
+
**红绿校验**:A1/A2/A4/A5 在改动前必须是红的。已核对:`space toggle` 早在 `9612d92` 就在 SELECT hint 行里,因此**不能**用它做唯一断言(issue 原建议的 `assert.match(selectRender, /space toggle/)` 今天就是绿的);`m/esc`、`? help`、`! pty`、`In select.*space toggle`、`?` 行在本改动前均不存在(research/03 红绿表)。
|
|
87
|
+
|
|
88
|
+
**不可自动化项**:README 文本(A8 用 `grep -c` 静态核对,不新建 README-lint 测试——仓内无读 README 的测试先例,为此基建超出范围);U1 的真机观感(终端宽度、配色、截断位置只能在真终端上判断)。
|
|
89
|
+
|
|
90
|
+
## 6. 非目标
|
|
91
|
+
|
|
92
|
+
- 不修 `#246`(帮助面板在 <32 行终端的裁剪)——D3 会让它多一行,属于 `#246` 的自留地。
|
|
93
|
+
- 不改任何键位绑定、不改 handler 分支逻辑。
|
|
94
|
+
- 不新增 README 表格、不调整 README 章节结构、不回改 `docs/superpowers/{specs,plans}/2026-10-26-issue-245-*` 历史留档。
|
|
95
|
+
- 不改 `renderPtyHelp` 的面板标签(`Fix:` / `Suggested steps`)——D4 以它们为准。
|