@marktrue/dsh-mobile-remote 3.2.4 → 3.3.0-alpha.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 CHANGED
@@ -1,354 +1,28 @@
1
1
  # Changelog
2
2
 
3
- ## v3.2.4(build 60)— 首个 stable:对话页高度模型、加载态、SSE 与诊断稳定性
3
+ ## v3.3.0-alpha.1(build 61,issues #105/#107/#117/#125/#136/#138)— 3.3.0 功能候选
4
4
 
5
- > 插件 `3.2.4` / App `3.2.4+60` / 载体 `3.2.4-app`。稳定版:插件发布到 npm `latest`,`app` 指针前进到本载体;`rc` 保持 `3.2.4-rc.6`,`alpha` 保持 `3.2.4-alpha.21`。内容与 `v3.2.4-rc.6`(build 59)一致,仅版本号稳定化,无代码变更。
5
+ > 插件 `3.3.0-alpha.1` / App `3.3.0+61` / 载体 `3.3.0-alpha.1-app`。
6
6
 
7
- ### 中文
7
+ ### 新功能
8
8
 
9
- #### 对话页与阅读体验
9
+ - **代理面板(#105 / #115 / #139)**:独立「代理」面板,四页签 = 子代理 / 团队 / 任务板 / 消息;递归子代理树默认折叠、逐级展开、降级不伪造;团队页只读成员/状态 + 团队开关(移入面板,保留 locked/pending/模型未定/非根限制);只读任务板;当前会话消息索引(消息型事件、筛选、跳回时间线,debug-only 行明确「仅日志」)。
10
+ - **文件预览自动换行(#117)**:内容预览工具栏 44dp 开关,默认开启;关闭后正文横滚、行号固定;重开保持源行 + 行内字符/像素位置;Markdown/diff/二进制隐藏。
11
+ - **提问卡折叠(#125)**:默认展开;折叠为固定摘要(标题/第一问/待回答/展开/取消),保留已选与自定义输入;状态语义 ⌄/⌃;提交中禁用折叠;弹层变体不折叠。
12
+ - **日志级别(#136)**:AppLog debug/info/warn/error,阈值同时控制写入与展示;默认 info、debug 关闭;设置页选择器、级别前缀、复制当前/全部;`Chat.geo` 等排障日志转 debug。
13
+ - **会话文件下载(#138)**:文件浏览列表/预览单文件下载到系统 Downloads;单活动下载、进度/暂停/继续/失败重试/断点恢复;仅 `sessionId + cwd 相对路径`,旧宿主隐藏入口。
14
+ - **插件管理(#107)**:当前宿主插件清单/健康(#145)、安装/升级与自动回滚(#146)、卸载/启停/重启(#147);只用配置渠道;桌面同款确认;失败明确回滚/未知,不静默重启。
10
15
 
11
- - **高度模型重做(ADR 0035,#126/#103/#114)**:短内容顶对齐,删除底部占位反馈环;折叠行固定 24dp,过程组 body 上限 `min(400dp, 50% 窗口)`,工具/思考/用户消息正文上限 320dp,图片单张 320dp、网格上限 `min(400dp, 50%)`;gutter 恒定 38dp;删除活动条与自动详情。修复分批隐藏行场景下内容被推离顶部、上下方大段空白与滚动越界。
12
- - **首屏补拉最新轮(#126)**:初始 50 条若截断最新一轮,自动补拉 30 条/页、最多 5 页,保证过程块来自完整轮次。
13
- - **首次打开三态加载(#129)**:loading / empty / failed 明确区分,失败可重试,流式内容到达后不再误判为空态。
14
- - **上翻历史状态行(#130)**:顶部固定高度状态行展示 loading / 已加载 / 空 / 失败四态与重试,不挤压聊天内容。
15
- - **长用户消息查看全文(#132)**:入口移入气泡内,按需加载详情并显式区分已加载 / 失败。
16
- - **历史阅读位置与组折叠(#118/#122/#123)**:上翻历史位置不再被新事件抢回;过程组/工具组折叠状态改为 widget 层 `ValueKey` 复用 + 数据层“用户选择缓存”,组身份唯一但不承诺稳定,identity 变化回落默认。
17
- - **后台任务与子代理(#128/#124)**:移除聊天页「后台任务进行中」内联卡,取消入口统一到「会话工具 → 任务」;主会话列表聚合递归子代理运行状态,断链/切换宿主清空旧计数。
16
+ ### 安全与兼容
18
17
 
19
- #### SSE、宿主与诊断
18
+ - `/m/api/files` 收紧为会话作用域(#16):root/realpath/fd 校验,拒绝绝对路径、`..`、编码绕过、symlink/目录/设备;旧调用仅已注册工作区;能力位绑定连接代。
19
+ - 新增端点均登记 endpoint registry;旧宿主/旧插件明确降级,不伪造数据。
20
20
 
21
- - **SSE 连接泄漏与 503(#131)**:App 每次 SSE 使用独立 `http.Client` 并在取消/超时/错误/503/正常结束路径关闭,503 使用 5s/10s 退避;宿主满额时按「stalled 优先 → 同 clientId → 同 clientIp → 最旧」驱逐 1 条满龄(≥60s)连接,无候选才 503 + `Retry-After: 5`。
22
- - **原生 SSE(#131)**:悬浮球原生 SSE 上报 `x-mobile-app-version` 与持久化 `x-mobile-client-id`,单服务实例只启动一条 SSE 线程,异常/销毁路径保证 `disconnect` 与状态清理。
23
- - **环境诊断(#135)**:指标、服务、端点与状态值中文化;新增 `mobileOldestAgeMs` / `mobileOldestIdleMs` / `mobileStalled` / `mobileEvicted` / `mobileRejected`。
24
- - **宿主兼容与更新(#88/#96/#110/#112/#116 等 alpha/rc 累积)**:0.2.x 宿主能力三态诊断、免重启插件更新、宿主拒绝错误码透传与可执行动作、更新恢复与 restart-pending 收尾。
21
+ ### 已知未验证 / 风险
25
22
 
26
- #### 工作步骤、导航与内容
27
-
28
- - 工作步骤四档 v4、过程段/工具组视觉与折叠、轮末改动/交付卡、工具卡结构化;
29
- - 轮次导航、历史位置、滚动跟随单一 owner、上翻与回底体验;
30
- - 文件浏览(隐藏项)、文件历史、Git 图与分支上限、图片查看/下载、会话文件浏览;
31
- - 任务清单仅更新面板(#119)、空会话过滤(#109)、会话标题与运行状态聚合等。
32
-
33
- > 完整逐版本明细见本文件 `v3.2.4-alpha.1` 至 `v3.2.4-rc.6` 各条目。
34
-
35
- #### 验证
36
-
37
- - Flutter analyze:0 error / 0 warning(26 info,与 rc.6 基线同类)
38
- - Flutter test:**1640 通过 / 1 skip**
39
- - Node 套件(clean tree,隔离 HOME):1239 例,1218 通过 / 17 skip / **4 失败**——均为本机 root 环境既有问题(`chmod 0500` 在 root 下失效 ×2、`host-canary-smoke` source identity、`ANDROID_HOME` 下 aapt 存在却执行失败),与 rc.6 基线同集合
40
- - timeline-contract:181 PASS / 0 FAIL
41
- - account-usage:15 通过 / 0 失败
42
- - Kotlin `UsagePanelModelTest`:27 用例,BUILD SUCCESSFUL(`--rerun-tasks`)
43
- - 发布前 CI(rc.6)已通过 Node/Flutter 测试、签名 APK、发布演练与 npm 发布;本 stable 与 rc.6 代码一致,仅版本元数据不同
44
-
45
-
46
- #### 重要说明与已知风险
47
-
48
- - **本版为 bootstrap 后首个 stable**:npm `latest` 从 `3.2.3-rc.1` 前进到 `3.2.4`;`rc` 仍为 `3.2.4-rc.6`,`alpha` 仍为 `3.2.4-alpha.21`;`app` 从 `3.2.4-rc.6-app` 前进到 `3.2.4-app`。
49
- - **build 60 小于本机测试 build 61**:已安装本地测试 build 61 的设备安装 stable 会被系统视为降级;如被拒需卸载重装或等待 build ≥61。不通过手改 build 规避。
50
- - **未包含 3080 代理泄漏修复**:该修复在 `nas-dsh-migration` 镜像,不属于本版。
51
- - **#136 日志级别尚未实现**:本版沿用 rc.6 的临时降噪(Chat.geo / build itemCount / 跟随校正三类日志注释),待 #136 后恢复 debug。
52
- - **真机验收**:rc.6 已在用户真机确认可用;stable 与其代码一致,仅版本号与发布通道不同。
53
-
54
- ### English
55
-
56
- #### Conversation view & reading experience
57
-
58
- - **Transcript height model rework (ADR 0035, #126/#103/#114)**: short content is top-aligned and the bottom-placeholder feedback loop is removed. Collapsed rows are fixed at 24dp; process-group bodies are capped at `min(400dp, 50% of the window)`; tool, reasoning, and user-message bodies are capped at 320dp; images are 320dp each with grids capped at `min(400dp, 50%)`; the gutter is a constant 38dp. The activity bar and auto-expanded details are gone. Fixes content pushed off the top, large blank areas above/below batch-hidden process blocks, and scroll-range overshoot.
59
- - **First-screen backfill (#126)**: if the initial 50 events cut off the latest turn, the app backfills 30 events per page for up to 5 pages so process blocks come from a complete turn.
60
- - **First-open three-state loading (#129)**: loading / empty / failed are now explicit; failures are retryable and live-streamed content no longer gets misclassified as empty.
61
- - **History-paging status row (#130)**: a fixed-height status row shows loading / loaded / empty / failed with retry, without squeezing the conversation.
62
- - **View full text for long user messages (#132)**: the entry moves inside the bubble; details load on demand and explicitly distinguish loaded vs failed.
63
- - **Reading position and group folding (#118/#122/#123)**: a paged-back reading position is no longer stolen by new events; process/tool group folding moved to widget-layer `ValueKey` reconciliation plus a data-layer user-choice cache. Group identity is unique but not guaranteed stable; identity changes fall back to the default.
64
- - **Jobs and subagents (#128/#124)**: removed the in-chat background-job card and centralized cancellation in “Session tools → Jobs”; the recent-session list aggregates recursive subagent activity and clears stale counts after disconnects or host switches.
65
-
66
- #### SSE, host, and diagnostics
67
-
68
- - **SSE leaks and 503 (#131)**: the app opens a dedicated `http.Client` per SSE connection and closes it on cancel/timeout/error/503/normal end, with 5s/10s backoff on 503. A full host pool evicts one age-eligible (≥60s) connection ordered by “stalled first → same clientId → same clientIp → oldest” and only returns 503 + `Retry-After: 5` when no candidate exists.
69
- - **Native SSE (#131)**: the floating-bubble SSE now sends `x-mobile-app-version` and a persistent `x-mobile-client-id`, runs at most one SSE thread per service instance, and guarantees `disconnect()` plus state cleanup on exception and destroy paths.
70
- - **Environment diagnostics (#135)**: metrics, services, endpoint checks, and status values are localized; new `mobileOldestAgeMs`, `mobileOldestIdleMs`, `mobileStalled`, `mobileEvicted`, and `mobileRejected` are exposed.
71
- - **Host compatibility and updates (cumulative from #88/#96/#110/#112/#116)**: 0.2.x host-capability diagnostics, no-restart plugin updates, host-rejection error codes with actionable next steps, and update recovery / restart-pending handling.
72
-
73
- #### Work steps, navigation, and content
74
-
75
- - Work-step display modes v4, process/tool group visuals and folding, turn-end changed/deliverable cards, structured tool cards;
76
- - Turn navigation, reading position, single-owner scroll following, and paging-back / back-to-latest behavior;
77
- - File browsing (hidden entries), file history, git graph and branch limits, image viewing/download, session files;
78
- - Todo list updates only refresh the panel (#119), empty-session filtering (#109), session title and running-status aggregation, and more.
79
-
80
- > Full per-version details are in the `v3.2.4-alpha.1` through `v3.2.4-rc.6` entries above.
81
-
82
- #### Verification
83
-
84
- - Flutter analyze: 0 errors / 0 warnings (26 infos, same class as the rc.6 baseline)
85
- - Flutter test: **1640 passed / 1 skipped**
86
- - Node suite (clean tree, isolated HOME): 1239 tests, 1218 passed / 17 skipped / **4 failed** — all four are pre-existing local root-environment issues (two `chmod 0500` cases root bypasses, `host-canary-smoke` source identity, and aapt present under `ANDROID_HOME` but failing to execute), matching the rc.6 baseline set
87
- - timeline-contract: 181 PASS / 0 FAIL
88
- - account-usage: 15 passed / 0 failed
89
- - Kotlin `UsagePanelModelTest`: 27 cases, BUILD SUCCESSFUL (forced rerun with `--rerun-tasks`)
90
- - The pre-release rc.6 CI already passed the Node/Flutter tests, signed APK build, release drill, and npm publish; this stable tree is code-identical to rc.6 and differs only in version metadata
91
-
92
-
93
- #### Important notes & known risks
94
-
95
- - **First stable after bootstrap**: npm `latest` moves from `3.2.3-rc.1` to `3.2.4`; `rc` stays at `3.2.4-rc.6`, `alpha` stays at `3.2.4-alpha.21`, and `app` moves from `3.2.4-rc.6-app` to `3.2.4-app`.
96
- - **Build 60 is lower than local test build 61**: devices with local test build 61 installed will treat this stable as a downgrade. If installation is rejected, uninstall/reinstall or wait for build ≥61. Do not hand-edit the build number.
97
- - **The 3080 proxy-leak fix is not included**: that fix lives in the `nas-dsh-migration` image and is not part of this release.
98
- - **Log levels (#136) are not implemented yet**: this release keeps the temporary rc.6 log noise reduction (three transcript-debug log groups commented out) until #136 lands.
99
- - **Device acceptance**: rc.6 was confirmed working on the user’s real device; stable is code-identical and differs only in version and release channel.
100
-
101
-
102
- ## v3.2.4-rc.6(build 59,issues #124 #126 #128 #129 #130 #131 #132 #135)— 对话页高度模型重做、加载态与 SSE 修复
103
-
104
- > 插件 `3.2.4-rc.6` / App `3.2.4+59` / 载体 `3.2.4-rc.6-app`。RC 候选:插件发布到 npm `rc` dist-tag,`latest` 保持 `3.2.3-rc.1` 不动(只有 stable 可前进)。
105
-
106
- ### 中文
107
-
108
- #### 新增与体验改进
109
-
110
- - **首次打开会话三态加载(#129)**:聊天页首次加载明确区分 loading / empty / failed;失败可重试,实时流式内容到达后不再误判为空态。
111
- - **上翻历史加载状态行(#130)**:上翻历史时在顶部以固定高度状态行展示 loading / 已加载 / 空 / 失败四态,失败可重试,不挤压聊天内容。
112
- - **长用户消息查看全文(#132)**:超过 2000 字符的用户消息把「查看全文」入口移入气泡内;按需加载详情并显式区分已加载 / 失败,不再伪造成功。
113
- - **子代理运行指示(#124)**:主会话列表聚合递归子代理运行状态,子代理未结束时主会话持续显示运行中;断链或切换宿主会清空旧宿主计数,避免假运行状态。
114
- - **环境诊断中文化(#135)**:诊断页的指标、服务、端点与状态值按白名单中文化,不再出现重复或裸露英文 key;新增 SSE 指标 `mobileOldestAgeMs` / `mobileOldestIdleMs` / `mobileStalled` / `mobileEvicted` / `mobileRejected` 也有中文名。
115
-
116
- #### 修复
117
-
118
- - **对话页高度模型重做(ADR 0035,#126/#103/#114)**:短内容顶对齐,删除 `_liveBottomGap` 底部占位及其反馈环;折叠行固定 24dp,过程组 body 上限 `min(400dp, 50% 窗口)`,工具/思考/用户消息正文上限 320dp,图片单张 320dp、网格上限 `min(400dp, 50%)`;删除活动条与自动详情,思考状态落到段摘要/组抬头/provisional 行;gutter 恒定 38dp。修复分批隐藏行场景下内容被推离顶部、上下方大段空白和滚动越界等真机问题。
119
- - **首屏补拉最新轮(#126)**:初始 50 条若截断最新一轮(缺 `turn/start`),自动补拉 30 条/页、最多 5 页,直到拿到最新轮起止或用户上翻;不按视口高度补拉,避免首屏跳动。
120
- - **移除聊天页后台任务内联卡(#128)**:后台任务不再在聊天页占一张卡,也不再因卡片显隐触发视口跳变;取消入口统一到「会话工具 → 任务」页签,运行中可取消、停止中不可重复取消;任务面板重试会清除旧错误。
121
- - **SSE 连接泄漏与 503(#131)**:App 端每次 SSE 使用独立 `http.Client`,在取消/超时/错误/503/正常结束路径显式关闭,503 使用 5s/10s 退避;宿主端满额时不再直接 503,按「stalled 优先 → 同 clientId → 同 clientIp → 最旧」驱逐 1 条满龄(≥60s)连接,无候选才返回 503 + `Retry-After: 5`;诊断新增连接年龄/空闲/stalled/驱逐/拒绝指标。
122
- - **原生 SSE 版本与生命周期(#131)**:悬浮球原生 SSE 上报 `x-mobile-app-version` 与持久化 `x-mobile-client-id`,同一服务实例只启动一条 SSE 线程;连接建立、读取、异常与 onDestroy 均保证 `disconnect` 并清理 `sseConn`。
123
- - **导航回归测试**:补「点第 N 轮刻度后高亮必须落在第 N 轮」用例,锁定既有阅读线对齐行为。
124
-
125
- #### 验证
126
-
127
- - Flutter analyze:0 error / 0 warning(26 info,与 develop 基线同类)
128
- - Flutter test:**1640 通过 / 1 skip**
129
- - Node 套件:1239 例,1218 通过 / 17 skip / **4 失败**——4 项均为本机 root 环境既有问题(`chmod 0500` 在 root 下失效 ×2、`host-canary-smoke` source identity、`ANDROID_HOME` 下 aapt 存在却执行失败);已与 rc.5 基线(`1e8658a`)同环境对照,失败集合逐条相同
130
- - timeline-contract:181 PASS / 0 FAIL
131
- - account-usage:15 通过 / 0 失败
132
- - Kotlin `UsagePanelModelTest`:BUILD SUCCESSFUL(27 用例,`--rerun-tasks` 强制重跑)
133
- - 受影响测试:Flutter 29 个改动测试文件 323 通过;Node `issue131-sse-connections` / `sse-connections` / `session-list-running-indicator` 56 通过
134
-
135
- #### 重要说明与已知风险
136
-
137
- - **未包含 3080 代理泄漏修复**:该修复在 `nas-dsh-migration` 镜像,不属于 rc.6。
138
- - **build 59 小于本机测试 build 61**:已安装本地测试 build 61 的设备安装 rc.6 会被系统视为降级;如无法安装/被拒,需卸载后重装或等待 build ≥61 的版本。不通过手改 build 规避。
139
- - **#136 日志级别尚未实现**:本版仅临时注释 Chat.geo / build itemCount / 跟随校正三类脱底排障日志以降低噪声,待 #136 实现后恢复为 debug 级别。
140
- - **真机未复验**:高度模型与原生 SSE 修复需在 rc.6 真机确认;本版验证为 widget/单测 + 真实代码路径回放。
141
-
142
- ### English
143
-
144
- #### Added & improved
145
-
146
- - **First-open three-state loading (#129)**: the chat page now distinguishes loading, empty, and failed states on first open. Failures are retryable, and live-streamed content no longer gets misclassified as an empty state.
147
- - **History-paging status row (#130)**: paging back through history now shows a fixed-height status row with loading / loaded / empty / failed states and a retry action, without squeezing the conversation.
148
- - **View full text for long user messages (#132)**: messages over 2000 characters get a “view full text” entry inside the bubble; details load on demand and explicitly distinguish loaded vs failed instead of faking success.
149
- - **Subagent running indicator (#124)**: the recent-session list aggregates recursive subagent activity, so a session keeps showing as running while any descendant subagent is still active. Disconnects or host switches clear stale counts from the previous host.
150
- - **Localized environment diagnostics (#135)**: diagnostic metrics, services, endpoint checks, and status values now use human-readable Chinese labels instead of duplicated or bare English keys. The new SSE metrics (`mobileOldestAgeMs`, `mobileOldestIdleMs`, `mobileStalled`, `mobileEvicted`, `mobileRejected`) are covered too.
151
-
152
- #### Fixed
153
-
154
- - **Transcript height model rework (ADR 0035, #126/#103/#114)**: short content is now top-aligned and the `_liveBottomGap` bottom placeholder (and its feedback loop) is removed. Collapsed rows are fixed at 24dp; process-group bodies are capped at `min(400dp, 50% of the window)`; tool, reasoning, and user-message bodies are capped at 320dp; images are 320dp each with grids capped at `min(400dp, 50%)`. The activity bar and auto-expanded details are gone; reasoning state now lives in segment summaries, group headers, and provisional rows; gutter is a constant 38dp. This fixes content being pushed off the top, large blank areas above/below the batch-hidden process block, and scroll-range overshoot on real devices.
155
- - **First-screen backfill of the latest turn (#126)**: if the initial 50 events cut off the latest turn (missing `turn/start`), the app now backfills 30 events per page for up to 5 pages, stopping at the latest turn start, at the end of history, or when the user scrolls up. It does not backfill by viewport height, avoiding first-screen jumps.
156
- - **Removed the in-chat background-job card (#128)**: background jobs no longer occupy an inline card in the chat or trigger viewport jumps when the card appears/disappears. Cancellation is centralized in “Session tools → Jobs”; running jobs can be cancelled, stopping jobs cannot be cancelled twice, and retrying the jobs panel clears previous errors.
157
- - **SSE connection leaks and 503 (#131)**: the app now opens a dedicated `http.Client` per SSE connection and explicitly closes it on cancel/timeout/error/503/normal end; 503 responses use 5s/10s backoff. On the host, a full pool no longer returns 503 immediately: it evicts one age-eligible (≥60s) connection ordered by “stalled first → same clientId → same clientIp → oldest”, and only returns 503 + `Retry-After: 5` when no candidate exists. Diagnostics now expose connection age/idle/stalled/evicted/rejected metrics.
158
- - **Native SSE version and lifecycle (#131)**: the floating-bubble native SSE now sends `x-mobile-app-version` and a persistent `x-mobile-client-id`, starts at most one SSE thread per service instance, and guarantees `disconnect()` plus `sseConn` cleanup on setup, read, exception, and onDestroy paths.
159
- - **Navigation regression coverage**: added a test asserting that tapping turn tick N highlights turn N, locking the existing reading-line alignment behavior.
160
-
161
- #### Verification
162
-
163
- - Flutter analyze: 0 errors / 0 warnings (26 infos, same class as the develop baseline)
164
- - Flutter test: **1640 passed / 1 skipped**
165
- - Node suite: 1239 tests, 1218 passed / 17 skipped / **4 failed** — all four are pre-existing local root-environment issues (two `chmod 0500` cases that root bypasses, `host-canary-smoke` source identity, and aapt present under `ANDROID_HOME` but failing to execute). Re-ran the same set against the rc.5 baseline (`1e8658a`) in the same environment: identical failure set, item by item.
166
- - timeline-contract: 181 PASS / 0 FAIL
167
- - account-usage: 15 passed / 0 failed
168
- - Kotlin `UsagePanelModelTest`: BUILD SUCCESSFUL (27 cases, forced rerun with `--rerun-tasks`)
169
- - Affected tests: 323 passed across the 29 changed Flutter test files; 56 passed in the Node `issue131-sse-connections` / `sse-connections` / `session-list-running-indicator` files
170
-
171
- #### Important notes & known risks
172
-
173
- - **The 3080 proxy-leak fix is not included**: that fix lives in the `nas-dsh-migration` image and is not part of rc.6.
174
- - **Build 59 is lower than local test build 61**: devices with local test build 61 installed will treat rc.6 as a downgrade. If installation is rejected, uninstall/reinstall or wait for a build ≥61. Do not hand-edit the build number to work around this.
175
- - **Log levels (#136) are not implemented yet**: this release only comments out three noisy transcript-debug log groups (Chat.geo / build itemCount / follow correction) until #136 lands; they should return as debug-level logs then.
176
- - **Not re-verified on a real device**: the height model and native SSE fixes need on-device confirmation; this release was verified with widget/unit tests plus real code-path replay.
177
-
178
-
179
- ## v3.2.4-rc.5(build 58,真机 59aaa367)— 分批隐藏行导致的底部空白修复
180
-
181
- > 插件 `3.2.4-rc.5` / App `3.2.4+58` / 载体 `3.2.4-rc.5-app`。RC 候选:插件发布到 npm `rc` dist-tag,`latest` 保持 `3.2.3-rc.1` 不动(只有 stable 可前进)。
182
-
183
- ### 分批隐藏行不再被误判为短内容(真机 59aaa367)
184
-
185
- 真机(`3.2.4-rc.4`)会话 `59aaa367`:子代理大量工具调用 → 过程行超过分批上限 50 → 出现「显示更多(还有 86 行)」,同时聊天记录被整体下推、下方留出空白。
186
-
187
- - **根因**:`_scheduleLiveBottomGapMeasure` 用 `liveSliver.geometry.scrollExtent` 测内容高度,该值**只含已渲染行**,不含被 `batchProcessRows` 隐藏的行。详细档里已完成的 7 个折叠组约 700dp < 视口 844dp → 判定「短内容」→ 补 `_liveBottomGap` → 占位把内容整体下推;而实际还有 86 行没渲染,内容客观上一屏装不下。
188
- - **修复**:`shortEnough` 增加 `!_livePlanHasHiddenRows`——live 计划里任一可见轮次存在隐藏行时不补底部占位。判据从 `_livePlanCache.hostsBySeq` 读 `_ProcessBlockPlan.hiddenTotalInTurn`(任一可见轮次,不是只看当前滚动的那个),计划缓存与判定同帧、无额外扫描。
189
- - **分批策略不变**:未改 `batchProcessRows`、未取消分批(维护者确认的方案 A)。
190
-
191
- ### 测试(先红后绿)
192
-
193
- - 新增 `batch_hidden_bottom_gap_test.dart`(真机形态:详细档已完成轮 + 5 step × 20 工具 = 100 行 > 50 + 跟随态):
194
- - 主用例:修复前 `gap=184`、内容被整体下推(内容顶 240 vs 视口顶 56)→ 红;修复后 `gap=0`、内容贴视口顶 → 绿;
195
- - 对照组:无隐藏行的短会话(2 次工具调用)仍必须补占位、贴底(`tailResidual≈0`)。
196
- - `issue123_p1_history_position_test.dart` 的 P1b 夹具改为 `steps: 20`(40 行、不触发分批):该用例锁的是 `atLiveWindow` 路径(paged + 真正短内容 → 补占位),原 52-step 夹具本身带隐藏行、按新契约不应补占位。**只调夹具,断言不变**;P1a 仍用 52(分批 + 历史位置保持)。
197
- - 既有分批/滚动套件全绿:`issue118_*`、`issue52/70/74/75/76/84`、`turn_process`、`issue77/89`。
198
- - 变异反证:去掉 `!_livePlanHasHiddenRows` → 主用例变红(`gap=184`),还原后复绿。
199
-
200
- ### 验证
201
-
202
- - 本机门禁 6 项:`flutter analyze` 0 error / 0 warning(24 info,与基线同)、`flutter test` **1606 通过 / 1 skip**、`node --test` 1220 例 1199 通过 / 17 skip / **4 失败**、timeline-contract 179 PASS / 0 FAIL、account-usage 15 通过 / 0 失败、Kotlin `UsagePanelModelTest` BUILD SUCCESSFUL(`--rerun-tasks`,178 tasks executed)
203
- - node 4 项失败为本机 root 环境既有问题(`chmod 0500` 在 root 下失效 ×2、`host-canary-smoke` 要求 uid>0、`ANDROID_HOME` 下 aapt 存在却执行失败);已与 `v3.2.4-rc.4`(`b088e49`)同环境对照,**失败集合逐条相同、总数相同**(1220/1199/4/17),无新增项
204
-
205
- ### 未验证
206
-
207
- - 真机未复验:以上为 widget 测试 + 真实代码路径回放;落版本后需在真机(同类长会话)确认「显示更多」出现时下方空白消失。
208
-
209
-
210
- ## v3.2.4-rc.4(build 57,issues #118 #122 #123)— 滚动位置修正、组折叠重做
211
-
212
- > 插件 `3.2.4-rc.4` / App `3.2.4+57` / 载体 `3.2.4-rc.4-app`。RC 候选:插件发布到 npm `rc` dist-tag,`latest` 保持 `3.2.3-rc.1` 不动(只有 stable 可前进)。
213
-
214
- ### 历史阅读位置不再被新事件抢回(#118)
215
-
216
- 上翻加载过更早历史后(`paged` 会话),滚动位置可以为负——这是**合法的历史阅读位置**。此前 `_clampOverscrollAfterShrink` 只看 `maxScrollExtent` 不看 `minScrollExtent`,把任何负像素都当作越界并 `jumpTo(0)`,导致新事件到达时用户正在读的历史被拉回。
217
-
218
- - 判据改为真实的 `[minScrollExtent, maxScrollExtent]` 区间(`rangeError`)
219
- - 越界校正改走 `ScrollFollowCoordinator` 的 `requestRangeClamp` 入口,目标是把当前位置夹回合法区间(**不是**回到底部),拖拽中/世代失效作废
220
- - `atTopAlignment` 的 `pixels <= 0.5` 同样是错误假设,改为 `atLiveWindow = pixels >= -0.5`(「没有停在更早历史里」)
221
-
222
- ### 过程组折叠状态重做(#122、#123)
223
-
224
- 原先组折叠状态维护在数据层(`key → bool` 表,键是 `段键:step`)。为让不稳定的键在重建后仍能命中,长出了多层身份迁移逻辑,三轮实现均被判不可交付——根因是 `groups` 按 step **连续**聚合,`1,2,1` 会产生两个同键的组,键本身不唯一。
225
-
226
- 改为与 DSH 本体同构的做法(`useDisclosure(version)` + `retainAccountKeys`):
227
-
228
- - **展开态由 widget `State` 持有**,用 `ValueKey(identity)` 让 Flutter 的 reconciliation 决定复用还是新建
229
- - **数据层只保留「用户选择缓存」**:写入是赋值,清理是**只按存在性过滤**(`removeWhere((key) => !existing.contains(key))`),不做任何身份匹配、快照、指纹或迁移
230
- - **组身份**:`$turn#tool:<首个工具 callId>` → `#think-step:<step>` → `#think-seq:<seq>`。只保证唯一,不保证稳定;identity 变化即回落默认
231
- - 组内行懒构建(折叠时不构建)
232
- - 段级折叠仍用数据层迁移(`boundarySeq` 是 durable 的,保留)
233
-
234
- **与 DSH 的唯一实质差异**:DSH 的组键是 `workspaceId`(内核 durable、不复用);本仓库用 `callId` 派生,理论上可能被不同逻辑组复用,极端情况下会误继承折叠选择。该风险已接受,不为此增加校验或迁移(见 ADR 0034)。
235
-
236
- ### 决策记录
237
-
238
- ADR 0034 重写:组折叠状态归属 widget 层 + 按存在性过滤的用户选择缓存。记录了 v1–v3 三轮失败史与放弃保守失效方案的量化理由(50 次工具调用会产生 100 次失效,含参数 chunk 可达数千次)。
239
-
240
- ### 验证
241
-
242
- - 本机门禁 5 项全绿:`flutter analyze` 0 error/0 warning、`flutter test` **1604 通过 / 1 skip**、timeline-contract 179/0、account-usage 15/0、Kotlin `UsagePanelModelTest` BUILD SUCCESSFUL
243
- - `node --test`:1220 例 1199 通过 / 17 skip / **4 失败**。四项经独立双 worktree 对照确认为本机 root 环境所致(`chmod 0500` 在 root 下失效 ×2、`smoke.mjs` 要求 uid>0、`ANDROID_HOME` 存在时发现真 aapt),与基线完全同集合,非本次引入
244
- - 变异反证:去掉存在性过滤 → 空历史用例变红;恢复旧 `_items.isNotEmpty` 守卫 → 同用例变红;换成「结构变化清空」→ 「不因普通工具事件重置」用例变红
245
-
246
- ### 未验证
247
-
248
- - 真机未验证:以上均为 widget/单测 + 真实代码路径回放
249
- - identity 复用导致的误继承:已声明的风险,未构造真实可达用例
250
- - 无法证明不存在所有未来异步竞态(当前 `_items.clear()` 唯一在同步重建块内)
251
-
252
- ## v3.2.4-rc.3(build 56,issues #118)— 修复折叠变短后的大段空白
253
-
254
- > 插件 `3.2.4-rc.3` / App `3.2.4+56` / 载体 `3.2.4-rc.3-app`。RC 候选:插件发布到 npm `rc` dist-tag,`latest` 保持 `3.2.3-rc.1` 不动(只有 stable 可前进)。
255
-
256
- ### 修复内容下方大段空白(#118)
257
-
258
- `rc.2` 只包含了该 issue 的第一部分修复(SSE 事件改布局后跟随)。本版补齐第二部分:
259
-
260
- - **现象**(真机截图 + 测试稳定复现 3 次):长会话上翻加载过更早历史后,本轮 `turn/end` 自动折叠把过程段大幅压短,内容下方出现大段空白,右下角回底按钮可见。
261
- - **根因**:`_scheduleLiveBottomGapMeasure` 的 `shortEnough = !paged && …` 对 `paged` 会话**永久停用** #77 短内容底部占位。用户上翻过历史后 `paged = true`,此后再也不会补占位;折叠把 live 内容从 1018dp 压到 100dp 时,`maxScrollExtent` 变成 0 而 `pixels` 仍停在旧值 `-40`,内容顶被推到视口上方,下方留 526dp 空白。
262
- - **修复**:新增 `_clampOverscrollAfterShrink()`,挂在所有改变布局的事件出口之后。只在「不可滚动(`max ≈ 0`)且 `pixels` 越界为负」这一确定异常态把位置拉回 `0`。
263
- - **不启用 paged 底部占位**:按维护者决定避开 issue #76 的「占位与位置修正互相拉扯」;可滚动时的越界仍交给 `BallisticScrollActivity` 自行回弹,不抢用户位置。
264
- - **实测**:修复前 `tailResidual=+526` / `pixels=-40`;修复后 `tailResidual=0` / `pixels=0`。
265
-
266
- ### 决策记录
267
-
268
- - ADR 0032 代理面板独立化、ADR 0033 测试夹具按通道推导(文档,不影响产物)。
269
-
270
- ### 验证
271
-
272
- - 本机门禁 6 项全绿:`flutter analyze` 0 error/0 warning、`flutter test` **1559 全绿**、timeline-contract 179/0、account-usage 15/0、`node --test` 1220 例 1199 通过(4 项为本机 root 环境既有失败)、Kotlin `UsagePanelModelTest` BUILD SUCCESSFUL;
273
- - 新增 `issue118_detailed_mode_blank_test.dart`(13 例)覆盖复现场景;
274
- - 变异反证:注释掉 `_clampOverscrollAfterShrink()` 调用 → 1 例变红,还原后复绿。
275
-
276
- ### 真机验收进度
277
-
278
- - `#116` / `#119` 已在 `rc.2` 真机验收通过(#119 的 8 项验收中「子代理会话内 todo/write 回放」未单独覆盖);
279
- - `#118` 第一部分的真机表现待本版合并后一并观察;
280
- - `#120` 的四个归属/时序场景在 `rc.2` 上均正常,(a) 假设未复现;仍需 `[120-debug]` 日志原文才能坐实历史现象。
281
-
282
- ## v3.2.4-rc.2(build 55,issues #116 #118 #119 #120)— 宿主错误透传、时间线清理与滚动跟随补全
283
-
284
- > 插件 `3.2.4-rc.2` / App `3.2.4+55` / 载体 `3.2.4-rc.2-app`。RC 候选:插件发布到 npm `rc` dist-tag,`latest` 保持 `3.2.3-rc.1` 不动(只有 stable 可前进)。本版是首个相对 `alpha.21` / `rc.1` 带**实质功能修复**的 RC。
285
-
286
- ### 宿主拒绝时透传错误码与可执行动作(#116)
287
-
288
- - 插件更新被宿主拒绝时不再只显示 `host-manager-rejected`:新增 `hostErrorCode`(宿主白名单原码)与 `nextAction`(5 个稳定动作:`restart-host` / `version-incompatible` / `invalid-target` / `retry-or-diagnose` / `diagnose`);
289
- - 映射集中在一处,未知 code 保留原码并归为 `diagnose`,空码不编造动作;**只透传 `code`,不透传宿主 `diagnostic` 原文**(可能含路径/凭据);
290
- - `stop-profile` / `bundle-in-use` 文案明确「先重启 DSH 再试」;不自动重启、不自动重试;
291
- - 非宿主结论统一清空两字段,避免上次失败的动作文案残留到下次;
292
- - 旧插件无新字段时 App 回退既有 reason 文案。
293
-
294
- ### 任务清单更新不再生成独立时间线卡(#119)
295
-
296
- - `todo/write` 归入调试专属事件:普通模式时间线不再出现「任务清单已更新」卡,**任务清单面板是唯一展示入口**;调试模式仍可查看;
297
- - 「复制整段」按同一可见性判定过滤,隐藏卡不会从复制文本泄漏(与渲染口径共用 `timelineTypeVisibleIn`);
298
- - 事件本身继续消费:任务面板在实时、历史回放、catch-up 三处一致更新;
299
- - 推翻 v3.1.4「任务面板与时间线同时更新」的约定,注释已同步说明。
300
-
301
- ### SSE 事件统一跟随出口(#118)
302
-
303
- - `_handleEvent` 拆为「内层处理 + 统一布局出口」:内层返回本次处理是否改变消息区布局/视口高度,出口统一做底部占位重测 + 有界跟随校正;**新增事件类型必须显式声明**,避免再漏(此前 `session/jobs` 让视口变矮后不跟随,实测视口停在距真实末端 35px 且 9 帧不恢复);
304
- - 声明为改变布局:`session/jobs`、`question/*`、`approval/*`、`mobile/queue`、主路径(含 turn/end 自动折叠)、结构性 reasoning 行;
305
- - 档位/收起时机变化(会折叠或展开过程段,可能数百 px)同样收口;
306
- - 移除原先散落的重复跟随请求。
307
-
308
- ### 问询归属定位日志与 agentId 归一(#120)
309
-
310
- - 新增 `[120-debug]` 观测日志(4 处):记录帧 sessionId、当前页 sessionId、store sessionId 与 rpcId,可直接区分「帧归属错」还是「页面绑定错位」;
311
- - `onEventsWaterfall` 的 `frame.agentId` 不再裸用,改为剥离 `session:` 前缀(与同文件 `agentSessionId()` 同口径;该路径是四处中唯一未归一的位置);
312
- - **根因未坐实**:本版只加观测,问询不弹的定位需真机日志。
313
-
314
- ### 验证
315
-
316
- - 本机门禁 6 项全绿:`flutter analyze` 0 error/0 warning、`flutter test` **1546 全绿**、timeline-contract 179/0、account-usage 15/0、`node --test` 1220 例 1199 通过(4 项为本机 root 环境既有失败)、Kotlin `UsagePanelModelTest` BUILD SUCCESSFUL;
317
- - 每个修复均做变异反证:删掉修复后对应测试变红(#116 三组、#119 两组、#118 五组、#120 两组);
318
- - 真机项目列为本版验收项。
319
-
320
- ## v3.2.4-rc.1(build 54,issues #113 #114)— 发布工具链精简 + 聊天滚动跟随单一 owner
321
-
322
- > 插件 `3.2.4-rc.1` / App `3.2.4+54` / 载体 `3.2.4-rc.1-app`。本 fork 的 RC 发布候选:插件发布到 npm `rc` dist-tag,`latest` 保持 `3.2.3-rc.1` 不动(只有 stable 可前进)。release 线从 develop `aae26a7` 切出,本版本只接受修复、版本号与 CHANGELOG。
323
-
324
- ### 本机发布工具链精简(#113)
325
-
326
- - 退役三个旧本机发布入口:`tools/restart-dsh-web-service.sh`、`tools/postrestart-check.sh`、`dsh-mobile-app/tools/package-release.ps1`(发布集中在 GitHub Actions tag 触发链路;部署后恢复由已确认的容器/服务管理机制负责,不另造替代脚本);
327
- - `dsh-mobile-app/tools/package-release.sh` 删除 `UPDATE_DIR` 人工目录复制与 `MANIFEST_VERSION` / `ALLOW_TEST_MANIFEST_VERSION` 假版本清单分支;对三个退役变量在写入任何产物/共享目录之前 fail-closed,`--drill` / `--drill-only` / `--check-only` 三条路径保留;
328
- - 新增 `test/release-retired-entrypoints.test.mjs`(退役变量单独/组合 fail-closed、不创建目标目录、守卫先于写盘、dry-run 路径不受影响);`build-app-carrier.mjs` 只报告 CI 期望 tag,不再打印手工 `npm publish` 命令;
329
- - 修复测试夹具的载体发现:相关 HTTP 契约用例的插件根改为隔离目录,不再读到宿主真载体,消除整文件 V8 OOM(根因与前后对比见 #113);
330
- - 文档同步:`docs/10-release.md` 按 tag 触发 CI 链路重写发布步骤,`docs/06-install-run.md` 与 `CONTRIBUTING.md` 发布清单同步。
331
-
332
- ### 聊天滚动跟随收口单一 owner(#114)
333
-
334
- - 新增 `dsh-mobile-app/lib/scroll_follow.dart`(`ScrollFollowCoordinator`,零 Flutter 依赖):把跟随意图、几何事实、用户拖拽、导航/会话世代、待执行校正收口为一个可单测的 owner;near-bottom 与回底按钮显隐只作派生展示,不再反写意图;
335
- - 三个已复现缺陷修复:① 初始定位/布局后校正留下大块空白;② 帧后校正被饿死(执行时重查拖拽/意图/世代);③ 拖拽前 160px 内被程序性校正抢回手势;
336
- - 校正自己保证有帧(post-frame + `ensureVisualUpdate`,合并、有界、收敛即停);强制定位(初始打开/回 live/发送/显式回底)统一走有界收敛入口;
337
- - **真正到底才钉底**:跟随意图只在真实用户拖拽/惯性结束时按「真正到底」(|距末端| ≤ 1px,越过末端同样算)判定;程序性 jump/`ensureVisible` 及其 ballistic `ScrollEnd` 不参与;160px 仅保留为回底按钮/刻度轨/活动条去重的派生展示阈值;
338
- - **阅读态始终显示回底按钮**(判据 `intent==reading || !nearBottom`),消除「近底但无入口」死角;嵌套滚动 `depth≠0` 的拖动/metrics 不再改写主列表意图或几何快照;
339
- - `chat_screen.dart` 删除 `_pinnedToBottom`/`_userDragActive`/`_followBottomScheduled`/`_settledFollowScheduled`/`_settleToBottom`/`_scrollToBottom` 等分散状态与补丁;测试新增动态回放测量闭环、真正到底四情形、惯性生命周期、程序性移动、调度契约、1 帧调度与内层滚动用例(关键守卫 13 项变异反证)。
340
-
341
- ### 决策记录与文档
342
-
343
- - ADR 0030:`release-meta` 只在 GitHub 保留(唯一权威),本机分配用 `node tools/next-build.mjs --remotes github`;单远端仅限该分支,代码分支与 tag 仍推双远端;
344
- - ADR 0031:滚动跟随保留单一 owner 与三条不变量(自己保证有帧 / 执行时重查意图 / 强制定位有界收敛);
345
- - `CONTEXT.md` 新增「跟随意图 / 真正到底 / 末端残差 / 滚动校正 / 滚动跟随协调器 / 发布政策记录单远端」术语,并修正发布政策记录的权威位置;
346
- - `docs/10-release.md`、`docs/06-install-run.md`、`CONTRIBUTING.md` 与 `publish-npm.yml` 注释统一单远端口径(照抄执行的 `next-build` 调用补 `--remotes github`)。
347
-
348
- ### 验证
349
-
350
- - 本机发布门禁(bump 后树,隔离 HOME):flutter analyze 0 error / 0 warning(24 条既有 info)、flutter test **1513** 全绿、timeline-contract **179 PASS / 0 FAIL**、account-usage **15 通过 / 0 失败**、Kotlin `UsagePanelModelTest` 27 用例 0 失败(`--rerun-tasks` 强制重跑,BUILD SUCCESSFUL);
351
- - 真机滚动跟随四档验收列为发布后验收项(与 alpha.21 相同范围)。
23
+ - 真机矩阵(320/390、浅/深、1.0/1.5x)与真实宿主插件安装/升级/卸载/重启仍未完成。
24
+ - 系统 Downloads、前台服务/通知暂停、真实断点恢复未在设备验证。
25
+ - #150 脱底空白回归、#151 手机提问卡偶发缺失仍为独立跟踪项;#137 上游 PR #98 的 Windows CI 仍在处理。
352
26
 
353
27
 
354
28
  ## v3.2.4-alpha.21(build 53,issues #114)— 聊天滚动跟随重写:单一 owner + 真正到底才钉底