dsh-lan-guard 0.6.0 → 0.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,104 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.0] — 2026-10-07(手机端轮次浮轨:修掉 iPhone Chrome 错位,并做出 PC 同款「按住后滑动连续预览」)
4
+
5
+ 三件事,都只围绕 `mobileTurnRail`(默认关),不动官方逻辑:
6
+
7
+ ### 一、修掉 iPhone Chrome 上卡片错位到左上角
8
+
9
+ **用户真机反馈**(iPhone 16 Pro Max / Chrome):卡片刷新后会错位到左上角、文字看不清。这条不是本机 Chromium 能复现的——它属于 WebKit 的 coordinate space 行为。
10
+
11
+ **两条真凶,逐条排除**:
12
+
13
+ | 根因 | 修法 |
14
+ | --- | --- |
15
+ | 为取官方预览文本调用了 `mark.focus({preventScroll:true})`;Chromium 遵守 `preventScroll`,但 iOS Chrome 是 WebKit,可能仍把右边缘的已聚焦按钮滚进可视区,视觉视口右移后左边看起来出屏 | 官方 `onPointerMove` 本来就能生成同一份预览,改为**派发 bubbling `pointermove`**,彻底去掉 `focus()` 路径 |
16
+ | 卡片是挂在 `document.body` 上的 `position:fixed` 浮层,WebKit 可能对它选错 visual/layout viewport 坐标系 | 卡片改为**直接挂进官方轨道 `nav`**,`position:absolute; right:calc(100% + 8px)` 从轨道左侧展开;宽度按「轨道左缘到屏幕左侧」的真实空间限制,长英文按钮 `min-width:0` + 省略号,不再撑宽卡片 |
17
+
18
+ 同时把刻度筛选收紧为 `button[data-index]`——卡片自己的 ◀▶/跳转按钮不再混进官方逐轮计算。
19
+
20
+ ### 二、新增「按住后上下滑动 = 连续预览」(对齐 PC hover)
21
+
22
+ 旧实现只能长按定格一格、再用 ◀▶ 微调;用户要求的是 PC 那种「鼠标划过每一轮就看到那一轮的简介」。现在手势约定完整为:
23
+
24
+ | 手势 | 行为 |
25
+ | --- | --- |
26
+ | 轻点刻度 | 跳转(与官方一致,未改) |
27
+ | **0.3 秒内快速拖动** | 普通滚动轨道(scrub 需要独占 `touch-action`,这条改为自己实现,行为等价) |
28
+ | **长按 0.3 秒后上下滑动** | 手指滑到哪个刻度,卡片**立即换成那一轮的提问 + 回复摘要**,不触发跳转 |
29
+ | 停在轨道上/下边缘 30px 内 | 按 16ms 步进**自动卷动**虚拟轨道,可一直扫下去 |
30
+ | 松手 | 卡片保留供阅读,并吞掉长按补发的那次 click |
31
+
32
+ 实现上:`touch-action:none` 由这一层独占(否则 WebKit 会中途把手势交还页面滚动)、`setPointerCapture` 绑定本次手势、`pointerup/cancel` 统一清理;预览文本仍取自官方 tooltip,没有重复实现导航。
33
+
34
+ **手指下那一格要看得见**:官方对 hover 中的刻度只给 0.9 倍、灰色、半透明的细线(`.markPreview`),手指压着根本看不出来——用户真机反馈「能看到提示层是第几轮,但右侧的滑块不跟着动」。因此卡片打开期间(`nav[data-lg-turn-card]`)把该刻度提升为**满长品牌蓝条**(`scaleX(1)` + `--dsw-alias-state-business-primary`),而官方那根表示「会话当前在哪一轮」的黑条保持不变——一个是"手指选中的轮次",一个是"会话当前轮次",两者可区分。实测稳定帧:预览刻度 `scaleX(1)` / `rgb(65,118,230)`,当前轮次 `rgb(15,17,21)`。
35
+
36
+ ### 三、修掉「重启后手机白屏」
37
+
38
+ **用户真机反馈**:重启 dsh web 后手机打开是白屏。
39
+
40
+ **根因(实测复现)**:DSH 的首页响应**没有任何缓存头**(无 `cache-control` / `etag` / `last-modified`),浏览器可以复用重启前渲染的文档;而那份文档里的 bundle 地址带 `?rev=<哈希>`,重启后哈希变了,DSH 对过期 rev 一律 404。于是一次 `dsh web` 重启就可能让手机停留在白屏,直到清掉站点数据。
41
+
42
+ 复现实验:把服务端首页里所有 `rev=` 改成一个死值 → `/plugins/` 出现 3 次 404,App 完全挂载不起来(Chromium 显示 "Failed to load plugins";移动端 Safari 表现为白屏)。
43
+
44
+ **改法**:代理在转发时给 **HTML 文档**补 `cache-control: no-store`(`withDocumentNoStore`)——仅在响应是 HTML 且上游没有给缓存策略时生效,bundle 等非文档响应一律不动,因此不会伤害静态资源缓存。
45
+
46
+ ### 四、修掉「拖动触发上传文件」
47
+
48
+ **用户真机反馈**:手机上拖动会触发上传文件的功能。
49
+
50
+ **机制**:DSH 的附件视图在 document 上监听拖拽,只要拖拽数据里带 `Files` 就激活(`ui-attachment/src/client/drop-events.ts`)——也就是说,**只要轨道上能起一次原生拖拽**,松手时就可能变成一次文件投放。而 iOS 在起原生手势(选择 / 系统拖拽)时会用 `pointercancel` 收走指针流,我们原先只在 `pointerup` 分支吞掉后续 click,**被 cancel 的这次手势不会吞**,那次 click 就落到手指下面(例如输入区的附件按钮)——看起来就是"拖动触发了上传"。
51
+
52
+ **改法(三处一起,缺一不可)**:
53
+ 1. 轨道及其子元素 CSS 加 `-webkit-user-drag:none; user-select:none; -webkit-user-select:none`,并且原来就有 `touch-action:none`、`-webkit-touch-callout:none`;
54
+ 2. 新增捕获阶段 `dragstart` / `selectstart` 拦截:**只有**起点在轨道内的才 `preventDefault` + `stopPropagation`,正文里的正常选择与拖拽不受影响;
55
+ 3. `pointercancel` 现在与 `pointerup` 一样吞掉这次手势的尾随 click(普通轻点没有拖拽状态,因此绝不被吞)。
56
+
57
+ ### 五、修掉「只能滑两下,再滑整个页面跟着拖动 / 触发刷新」
58
+
59
+ **用户真机反馈**:上传问题没了,但**只能滑动两下**,继续滑就整页跟着拖,甚至刷新整个页面。
60
+
61
+ **根因**:`touch-action:none` 原先只写在 `nav`(轨道)上,而手指实际落在 `nav` 的**子元素**(刻度按钮,`touch-action:auto`)上;官方 CSS 在轨道内部**没有任何 `touch-action`**(只有 `overscroll-behavior: contain`)。WebKit 便从那个子元素解析手势,手指滑过约 20px(正好 ≈ 两格)后把垂直拖拽判给页面 → 页面被拖动 → 到顶再下拉就是**下拉刷新**(整页重载)。这也解释了"只能滑两下"的滑程。
62
+
63
+ **改法(三层,逐层收口)**:
64
+ 1. `touch-action:none!important` 从 `nav` 覆盖到**整棵子树** `nav[…] *`,任何后代都不能再把垂直手势让给页面;轨道自身同时 `overscroll-behavior: contain!important`;
65
+ 2. 手势期间改用**非被动 `touchmove`** 监听(`{capture:true,passive:false}`),只要本次手势是从轨道上起(`armed / scrubbing / dragScrolling` 且触点在轨道内)就 `preventDefault()`;**多指触摸放行**(不影响缩放),轨道之外的触摸一律不碰;
66
+ 3. 移动端 `html,body{overscroll-behavior-y:none}`——即使还有过冲,也不再触发下拉刷新整页重载。
67
+
68
+ 实测(服务端原样页面):把注入脚本打进真实页面后逐个元素读计算样式,刻度按钮 / 内层 span / 滚动层全部 `touch-action: none` + `overscroll-behavior: contain`,`html`/`body` 为 `overscroll-behavior-y: none`。
69
+
70
+ ### 六、修掉「蓝色跳转按钮变了,浮窗标题/内容却不变」
71
+
72
+ **用户真机反馈**:按住拖动时,蓝色「加载并跳转到第 N 轮」按钮会变,说明命中的刻度已经切换;但浮窗标题与回复摘要仍停在上一轮。
73
+
74
+ **根因**:蓝色按钮直接读当前刻度的 `aria-label`,因此可同步更新;标题/摘要则读官方 React tooltip 的 DOM。连续拖动时,iPhone WebKit 上 React 对 tooltip 的提交可能晚于原先假定的双 `requestAnimationFrame`,脚本重复读到仍挂在 DOM 上的**上一轮 tooltip**,所以按钮与内容脱节。
75
+
76
+ **改法**:不再赌固定两帧:
77
+ 1. 切换新刻度时只更新操作按钮的 `aria-label`,浮窗标题显示「正在读取本轮摘要…」、旧摘要隐藏,绝不把按钮文案或旧轮次内容伪装成简介;
78
+ 2. 监听官方 tooltip 的文本/子节点更新(`MutationObserver`),React 一提交即重读标题和摘要;
79
+ 3. 同时保留最多约 3.6 秒的有界轮询,覆盖 WebKit 批量提交或替换整个 tooltip 节点的情况;关闭卡片时统一断开 observer / timer;
80
+ 4. 本次卡片打开期间按刻度 `data-index` 缓存已确认的标题/摘要,快速回滑到已读过的轮次直接显示;松手后再向最终刻度发送一次稳定预览信号,避免连续手势的最后一次 React 提交被中间刻度覆盖。
81
+
82
+ 浏览器实测未加载的第 60→61 轮:0ms 为等待态,100ms 官方 tooltip 提交后变为「按照建议执行」+ 对应摘要,持续到 3 秒不回退;快速离开再回到第 61 轮立即命中缓存。新增延迟提交与回滑缓存用例;移除 watcher 后延迟提交用例立即变红。
83
+
84
+ ### 七、验证
85
+
86
+ **服务端原样**(DSH 0.2.1-alpha.1 / iPhone Chrome UA / 440×956 / 经代理 3081,45 格长会话)实测:
87
+
88
+ | 步骤 | 结果 |
89
+ | --- | --- |
90
+ | 按住刻度 | 卡片出现(`Load and jump to turn 16`) |
91
+ | 按住后滑到中间刻度 | 卡片实时 **第 16 轮 → 第 38 轮**,`transcript scrollTop 14359 → 14359`(**未跳转**) |
92
+ | 手指停在轨道上边缘 | `scrollTop 182 → 0`,卡片一路连扫到**第 1 轮** |
93
+ | 松手 | 卡片保留、仍未跳转 |
94
+ | 0.3 秒内快速向上拖 | 轨道 `scrollTop 0 → 50`(普通滚动),卡片内容不变 |
95
+ | 轻点刻度 | `transcript 14359 → 21`(照旧跳转) |
96
+ | 视口 | `visualViewport 0…440`、`scrollX 0`、文档宽 440、0 报错 |
97
+
98
+ **先红后绿 + 反证**:新增 4 条用例(长按后连续换摘要、快速拖动滚动轨道、边缘自动卷动、卡片锚定在 nav)在实现前各自失败;随后逐条回退实现确认再次变红,还原后全绿。全套 **376** 项通过。
99
+
100
+ > 测试踩过的坑(已写入记忆,避免复测误判):官方轨道的滚动层是 `nav > div[class*="_scroller"]`(`max = scrollHeight - clientHeight`),而会话默认停在最新一轮,**轨道往往已经在最底部**——此时「继续往下滚/向下拖」读数不变,看起来像功能失效。要验证请往**上**滑/往上拖。
101
+
3
102
  ## [0.6.0] — 2026-10-06(手机端轮次导航补上可读提示:按住出卡片)
4
103
 
5
104
  **用户真机反馈**(iPhone 16 Pro Max / iOS Safari,`0.5.0`):浮轨能看到了,但「太靠右」且「看不到它提示的内容」——点得到历史、看不到内容。
package/README.md CHANGED
@@ -148,10 +148,11 @@ The plugin reads its config from its Cordis entry. **Every key has a usable defa
148
148
 
149
149
  ## Compatibility
150
150
 
151
- Current version: plugin **`0.5.0`**; compatible with DeepSeek Harness **`0.2.1-alpha.1`** (the adaptation itself is declaration-only and touches no code; this release also adds one off-by-default switch, `mobileTurnRail`).
151
+ Current version: plugin **`0.7.0`**; compatible with DeepSeek Harness **`0.2.1-alpha.1`**.
152
152
 
153
153
  | Plugin | Verified DeepSeek Harness | What this version is |
154
154
  | --- | --- | --- |
155
+ | **`0.7.0`** | **`0.2.1-alpha.1`**, `0.2.0-rc.2`, `0.2.0-rc.1`, `0.1.7-rc.2` | A quality release for the phone turn rail: (1) **misplacement fixed** — on iPhone Chrome the card could jump to the top-left corner because the `focus()` call scrolled the right-edge button into view and a body-level `position:fixed` layer got the wrong coordinate space; the card now anchors inside the official rail (`position:absolute; right:calc(100% + 8px)`) and previews are triggered by a dispatched `pointermove`, with `focus()` removed entirely. (2) **Hold, then slide up/down = continuous previews**, matching desktop hover; resting at either rail edge auto-scrolls the virtual rail on a 16ms step. (3) A quick drag within 0.3s still scrolls the rail and a tap still jumps. Measured (440×956 via proxy 3081, 45-mark session): card swept turn 16 → turn 38 with `transcript scrollTop` unchanged, edge auto-scroll `182 → 0`, quick drag `0 → 50`, zero errors; all **386** specs pass |
155
156
  | **`0.5.0`** | **`0.2.1-alpha.1`**, **`0.2.0-rc.2`**, `0.2.0-rc.1`, `0.1.7-rc.2` | (1) **Adaptation, zero code**: across the 266 commits from `rc.2` to `0.2.1-alpha.1`, of the six surfaces this plugin depends on only `ui-layout` (new `shell.bottom` slot, frame grid rows → `minmax(0,1fr) auto`) and `ui-renderer` (drops the unreferenced `invariant.ts`) changed source, and neither concerns this plugin (nothing renders `shell.bottom` — measured at 0 height). devDependencies raised to `dsh-host-webserver`/`dsh-client-connection` `0.2.1-alpha.1`, **and — because the new host packages peer-require the vendor prereleases — `@deepseek-ai/cordis` to `4.0.5-alpha.1` and `@deepseek-ai/schemastery` to `3.18.5-alpha.1`** (a `^4.0.4` range excludes prereleases); type check + 368 tests green. (2) **New `mobileTurnRail` (off by default)**: un-hides DSH's own turn rail, which the official narrow-screen container query hides. (3) Narrow-screen regression re-run: right sidebar 100% visible, 0 clipped layers, healthy scroll range, zero compensation engagement — identical on 3080 and 3081 |
156
157
  | **`0.4.6`** | **`0.2.0-rc.2`**, **`0.2.0-rc.1`**, `0.1.7-rc.2` | Verification release for `0.2.0-rc.2`: zero code changes, compatibility metadata only (`dsh.compatibility.dshReleases` gains `0.2.0-rc.2`), plus both host devDependencies raised to `0.2.0-rc.2` and the type check and full suite re-run. Upstream changed only version numbers between `rc.1` and `rc.2` (the sole source edit is a hooks-ordering fix in `ui-renderer`, unrelated to this plugin), so the plugin runs on `rc.2` unchanged; measurements also confirm the mobile clip compensation now has nothing to act on (clipped layers 1 → **0**, scroll range 336px → **92343px**; every polling round reverts wholesale and writes no inline style) |
157
158
  | **`0.4.5`** | **`0.2.0-rc.1`**, `0.1.7-rc.2` | Long transcripts hydrate after the official scroller has already picked up a small scroll range; the mobile clip compensation treated that intermediate state as healthy and stopped, so a late `overflow:hidden` layer was never released (measured on device: 336px of scroll range with 1 clipped layer inside the scroller). It now keeps looking inside the existing polling window and releases the late layer — 336px → 6889px, 1 clipped layer → 0, official "back to bottom" still on screen |
@@ -236,12 +237,14 @@ The official UI is reused with zero modifications and adapts on a phone viewport
236
237
  | Gesture | What happens |
237
238
  | --- | --- |
238
239
  | Tap a mark | Unchanged: jump to that turn (paging history in first when needed) |
239
- | **Hold a mark for ~0.3s** | A readable **turn card** opens: that turn's prompt plus an excerpt of the reply — the very text the official component renders for a hover, read out by focusing the mark |
240
+ | **Hold a mark for ~0.3s** | A readable **turn card** opens: that turn's prompt plus an excerpt of the reply — the very text the official component renders for a hover, read out by dispatching `pointermove` (no `focus()` call) |
241
+ | **Slide up/down after the hold** | **Sweeps every turn**: the card immediately switches to whatever tick the finger is over, exactly like desktop hover |
242
+ | Rest at either rail edge | Auto-scrolls the virtual rail on a 16ms step, so you can keep sweeping |
240
243
  | ◀ / ▶ on the card | Step turn by turn while reading, so a 10px tick is never the target |
241
244
  | “Jump to turn N” on the card | Runs the official click and dismisses the card |
242
- | Drag (>16px) while holding | Cancels the hold so the rail still scrolls, and the card never pops |
245
+ | Quick drag within 0.3s | Scrolls the rail normally (no card) |
243
246
 
244
- The card exists only on a coarse pointer and a narrow screen, and closes on ✕, on a tap outside, or after a jump.
247
+ The card exists only on a coarse pointer and a narrow screen, and closes on ✕, on a tap outside, or after a jump. It is anchored **inside the official rail**, not a body-level fixed layer — that is what stopped the top-left misplacement on iPhone Chrome.
245
248
 
246
249
  **Known limit (hence off by default)**: each mark is 28×10px and the pitch is fixed at 10px inside DSH's own JavaScript, so CSS-growing them to 44px would make neighbours overlap and mis-tap. Precision comes from the card and its steppers, not from bigger marks. The rail also cannot move further inwards: its left edge sits exactly on the message column (measured on a 440px viewport: rail `[401,411,28,52]`, column right edge 401), and anything further left would cover text.
247
250
 
package/README.zh.md CHANGED
@@ -100,7 +100,7 @@ dsh plugin --profile web add "link:$(pwd)"
100
100
  | 断线看门狗 | **开** | 页面补丁:卡在「连接中」超过 8 秒的 WebSocket 会被关掉;从后台回来 10 秒后仍一条都没连上时自动重载一次(每标签最多连续 3 次,冷却 20 秒起)。只对真的连不上的页面生效。刷新页面生效。 |
101
101
  | 移动端兼容垫片 | **开** | 页面补丁:补 `AbortSignal.any`/`AbortSignal.timeout`/`Promise.withResolvers`/`Iterator` 与移动端 meta。缺这些 API 时 DSH 客户端在会话流里抛错,界面只会一直显示「载入历史…」且没有报错。现代浏览器上这些分支不生效。刷新页面生效。 |
102
102
  | 手机滚动矫正(窄屏) | **开** | 手机端 DSH 外壳在窄屏下把对话列裁在 `overflow:hidden` 的层里(实测 844/1688),整页也不可滚 → 内容可见但**滑不动**。开启后只在「窄屏 + 移动端 + 整页不可滚 + 找到被裁剪溢出的层」四条同时成立时,把那几层改成可触摸滚动;正常页面不碰。页面加 `?lgdiag=1` 可看布局诊断。刷新页面生效。 |
103
- | 手机端轮次导航 | 关 | 把 PC 右侧那根**轮次浮轨**搬到手机:DSH 在手机上其实照样渲染它(可跳转到某一轮、未加载的会先翻历史再跳、当前轮次跟随),只是被它自己的窄屏容器查询藏了起来(`@container (max-width: 900px)`)。开启后用一段只在 ≤1023px 生效的样式把它放出来(`right:4px`、宽 28px,正好占满对话区右侧留白、不压正文),并给手机补一套手势:**轻点 = 跳转**、**按住 ≈0.3 秒 = 弹出可读的轮次卡片**(含该轮提问与回复摘要 + ◀▶ 逐轮微调 + 一键跳转)、**按住后拖动 = 滚动刻度**。**已知短板**:每格 28×10px、格间距在官方 JS 里锁死 10px,所以"点得准"靠卡片与 ◀▶ 而不是放大刻度。上游若改了隐藏规则,脚本会在 3 秒内自检失败并**整体摘掉样式**(页面回到官方原样)。刷新页面生效;`?lgdiag=1` 底部会多一屏轮次导航诊断。 |
103
+ | 手机端轮次导航 | 关 | 把 PC 右侧那根**轮次浮轨**搬到手机:DSH 在手机上其实照样渲染它(可跳转到某一轮、未加载的会先翻历史再跳、当前轮次跟随),只是被它自己的窄屏容器查询藏了起来(`@container (max-width: 900px)`)。开启后用一段只在 ≤1023px 生效的样式把它放出来(`right:4px`、宽 28px,正好占满对话区右侧留白、不压正文),并给手机补一套手势:**轻点 = 跳转**、**按住 ≈0.3 秒 = 弹出可读的轮次卡片**(含该轮提问与回复摘要 + ◀▶ 逐轮微调 + 一键跳转)、**按住成功后上下滑动 = 连续预览**(手指滑到哪一格就换成那一轮的摘要,停在轨道上下边缘会自动继续卷动)、**0.3 秒内快速拖动 = 普通滚动轨道**。**已知短板**:每格 28×10px、格间距在官方 JS 里锁死 10px,所以"点得准"靠卡片与 ◀▶ 而不是放大刻度。上游若改了隐藏规则,脚本会在 3 秒内自检失败并**整体摘掉样式**(页面回到官方原样)。刷新页面生效;`?lgdiag=1` 底部会多一屏轮次导航诊断。 |
104
104
  | 新设备需要命名确认 | **开** | 新设备首次通过门禁时要自己命名一次,之后才出现在设备列表里。 |
105
105
  | 新设备需要管理员批准 | 关 | 开启后,命名完还要你在设备列表点「批准」才能进入。 |
106
106
  | TLS | **自签 HTTPS** | 关闭会明文传输门禁密码;非回环 + 关闭 TLS 必须显式设置 `tls.allowInsecureLan: true`,否则**拒绝启动**。 |
@@ -149,10 +149,11 @@ dsh plugin --profile web add "link:$(pwd)"
149
149
 
150
150
  ## 兼容性
151
151
 
152
- 当前版本:插件 **`0.5.0`**;兼容 DeepSeek Harness **`0.2.1-alpha.1`**(适配仅声明、零代码;本版另加一个默认关闭的 `mobileTurnRail`)。
152
+ 当前版本:插件 **`0.7.0`**;兼容 DeepSeek Harness **`0.2.1-alpha.1`**。
153
153
 
154
154
  | 插件 | 已验证的 DeepSeek Harness | 这个版本是什么 |
155
155
  | --- | --- | --- |
156
+ | **`0.7.0`** | **`0.2.1-alpha.1`**、`0.2.0-rc.2`、`0.2.0-rc.1`、`0.1.7-rc.2` | 手机端轮次浮轨的质量版,三件事:①**修错位**——iPhone Chrome 上卡片会跑到左上角,根因是 `focus()` 把右边缘按钮滚进可视区、以及 body 级 `position:fixed` 被算错坐标系;现在卡片挂进官方轨道 `nav`(`position:absolute; right:calc(100% + 8px)`)、预览改派发 `pointermove`,`focus()` 彻底移除。②**按住后上下滑动 = 连续预览**,对齐 PC 的鼠标划过;停在轨道上下边缘按 16ms 步进自动卷动虚拟轨道。③0.3 秒内快速拖动仍是普通滚动轨道,轻点仍是跳转。实测(440×956 / 经代理 3081 / 45 格长会话):卡片第 16 轮 → 第 38 轮连续切换且 `transcript scrollTop` 不变、边缘自动卷动 `182 → 0`、快速拖动 `0 → 50`、0 报错;全套 **386** 项通过 |
156
157
  | **`0.5.0`** | **`0.2.1-alpha.1`**、**`0.2.0-rc.2`**、`0.2.0-rc.1`、`0.1.7-rc.2` | ①**适配(零代码)**:`rc.2 → 0.2.1-alpha.1` 的 266 个提交里,本插件依赖的 6 个面中只有 `ui-layout`(新增 `shell.bottom` 槽、frame 网格行改 `minmax(0,1fr) auto`)与 `ui-renderer`(删掉未被引用的 `invariant.ts`)有源码改动,两者都与本插件无关(`shell.bottom` 无人渲染,实测占位 0 高)。devDependency 升到 `dsh-host-webserver`/`dsh-client-connection` `0.2.1-alpha.1`,**并按新宿主包的 peer 要求连带把 `@deepseek-ai/cordis` 升到 `4.0.5-alpha.1`、`@deepseek-ai/schemastery` 升到 `3.18.5-alpha.1`**(`^4.0.4` 不含预发布版);类型检查 + 368 个用例全绿。②**新增 `mobileTurnRail`(默认关)**:把被官方窄屏容器查询藏起来的轮次浮轨放出来。③窄屏四判据复测:右侧栏可见 100%、被裁层 0、可滚范围正常、补偿零介入,3080 与 3081 逐项一致 |
157
158
  | **`0.4.6`** | **`0.2.0-rc.2`**、**`0.2.0-rc.1`**、`0.1.7-rc.2` | 针对 `0.2.0-rc.2` 的验证版:代码零改动,只更新兼容元数据(`dsh.compatibility.dshReleases` 补 `0.2.0-rc.2`),并把两个宿主 devDependency 升到 `0.2.0-rc.2` 后重跑类型检查与全部用例。上游在 `rc.1 → rc.2` 之间只动了版本号(唯一源码改动是 `ui-renderer` 的 hooks 顺序修复,与本插件无关),因此本插件在 `rc.2` 上零改动可用;同时实测确认移动端裁剪补偿在 `rc.2` 上已无作用对象(被裁层 1 → **0**,可滚范围 336px → **92343px**,脚本每轮自检后整体撤销、不写任何内联样式) |
158
159
  | **`0.4.5`** | **`0.2.0-rc.1`**、`0.1.7-rc.2` | 长会话的正文是在官方滚动层拿到少量可滚范围**之后**才挂载的,旧逻辑把这个中间态当成「已正常」收工,晚出现的 `overflow:hidden` 层再也没人放行(真机实测:可滚范围 336px、滚动层内部仍有 1 层被裁)。现在改为在既有轮询窗口内继续侦测并放行迟到的裁剪层:可滚范围 336px → 6889px,被裁层 1 → 0,官方「回到底部」仍在屏内 |
@@ -237,12 +238,14 @@ dsh plugin --profile web add "link:$(pwd)"
237
238
  | 手势 | 行为 |
238
239
  | --- | --- |
239
240
  | 轻点刻度 | 与原来一致:跳转到该轮(未加载的先翻历史) |
240
- | **按住刻度约 0.3 秒** | 弹出**轮次卡片**:该轮的用户提问 + 回复摘要(文本正是官方组件为悬停渲染的那份,靠聚焦刻度取出) |
241
+ | **按住刻度约 0.3 秒** | 弹出**轮次卡片**:该轮的用户提问 + 回复摘要(文本正是官方组件为悬停渲染的那份,靠派发 `pointermove` 取出,不调用 `focus()`) |
242
+ | **按住成功后上下滑动** | **连续扫过每一轮**:手指滑到哪一格,卡片立刻换成那一轮的摘要——与 PC 上鼠标划过一致 |
243
+ | 手指停在轨道上/下边缘 | 按 16ms 步进自动卷动虚拟轨道,可以一直往下或往上扫 |
241
244
  | 卡片上的 ◀ / ▶ | 逐轮微调,边看边选——不必瞄准 10px 的格子 |
242
245
  | 卡片上的「跳到第 N 轮」 | 走官方点击,一键跳转后卡片自动关闭 |
243
- | 按住后上下拖动(>16px) | 取消长按,让刻度正常滚动,不会误弹卡片 |
246
+ | 0.3 秒内快速拖动 | 普通滚动轨道(不会弹卡片) |
244
247
 
245
- 卡片只在手机(`pointer: coarse`)与窄屏下存在;点空白处、✕ 或跳转都会关掉它。
248
+ 卡片只在手机(`pointer: coarse`)与窄屏下存在;点空白处、✕ 或跳转都会关掉它。卡片**挂在官方轨道内**(不是 body 上的 fixed 浮层),这是 iPhone Chrome 上不再错位到左上角的关键。
246
249
 
247
250
  **已知短板(所以默认关)**:每格只有 28×10px,而格间距在官方 JS 里锁死为 10px——用 CSS 撑到 44px 会让相邻格互相覆盖、反而点错。所以精度的答案不是放大刻度,而是上面的卡片与 ◀▶。另外轨道无法再往中间挪:它左边紧贴正文列(实测 440px 视口下轨道 `[401,411,28,52]`、正文列右缘 401),再往内就会压字。
248
251
 
package/lib/client.js CHANGED
@@ -1805,7 +1805,7 @@ window.__ModuleLoader__.load({
1805
1805
  (0, react.createElement)("p", {
1806
1806
  className: "lg-hint",
1807
1807
  key: "h2"
1808
- }, "📱 手机上的三种手势:① 轻点刻度 = 直接跳过去(与官方一致);② 按住刻度约 0.3 秒 = 弹出卡片,显示这一轮的用户提问与回复摘要,卡片里的 ◀ ▶ 可以逐轮微调、「跳到第 N 轮」一键跳转——PC 上那套「鼠标移上去看提示」是悬停交互,手机上根本触发不了,所以改成按住;③ 按住后上下拖动 = 让刻度自己滚动,不会误弹卡片。"),
1808
+ }, "📱 手机上的三种手势:① 轻点刻度 = 直接跳过去(与官方一致);② 按住刻度约 0.3 秒 = 弹出卡片,显示这一轮的用户提问与回复摘要,卡片里的 ◀ ▶ 可以逐轮微调、「跳到第 N 轮」一键跳转——PC 上那套「鼠标移上去看提示」是悬停交互,手机上根本触发不了,所以改成按住;③ 按住成功后上下滑动 = 像 PC 鼠标划过一样,卡片会连续换成手指下每一轮的摘要;停在轨道上/下边缘会自动继续卷动。想普通滚动轨道时,在 0.3 秒前快速拖动即可。"),
1809
1809
  (0, react.createElement)("p", {
1810
1810
  className: "lg-hint",
1811
1811
  key: "h3"