dsh-lan-guard 0.4.4 → 0.4.6
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 +42 -0
- package/README.md +9 -4
- package/README.zh.md +9 -4
- package/lib/index.js +1 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.6] — 2026-10-01(兼容 DeepSeek Harness `0.2.0-rc.2`)
|
|
4
|
+
|
|
5
|
+
**结论:仅声明,零代码。** `0.2.0-rc.1 → 0.2.0-rc.2` 之间,本插件用到的宿主接口面没有发生任何变化:
|
|
6
|
+
|
|
7
|
+
| 本插件用到的接口 | `0.2.0-rc.2` 状态 |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `webServer.register(route)` / `webServer.tapIndex(transform)` | 签名不变 |
|
|
10
|
+
| `connection.authenticatedUrl(baseUrl)` / `connection.requestRejection(request)` | 签名不变 |
|
|
11
|
+
| `slots.inject` / `slots.register`、`settings.section` seat | 不变 |
|
|
12
|
+
|
|
13
|
+
**依据**:上游 `0.2.0-rc.1..0.2.0-rc.2` 的 diff 中,`packages/host/webserver`、`packages/client/connection`、`packages/client/ui-slots`、`packages/client/ui-settings`、`packages/client/ui-layout` **只有 `package.json` 里的版本号改动**;唯一一处源码改动在 `packages/client/ui-renderer/src/client/scoped-slots.tsx`(把 `nextAncestors` 提到 `useMemo` 里,修 React hooks 调用顺序),与本插件无关。`devDependencies` 里的两个宿主包已升到 `0.2.0-rc.2`,类型检查与 **359** 个用例全部通过。
|
|
14
|
+
|
|
15
|
+
**移动端裁剪补偿在 `0.2.0-rc.2` 上不再介入**:`0.2.0-rc.1` 那个「官方滚动层内部有一层 `overflow:hidden` 且高度被锁死」的回归已被上游修掉。
|
|
16
|
+
|
|
17
|
+
| | `0.2.0-rc.1`(0.4.4/0.4.5 实测) | `0.2.0-rc.2`(本次实测) |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| 滚动层内部被裁的层 | 1(`EvIC1a_frame`,796 高) | **0** |
|
|
20
|
+
| 官方滚动层 client / scroll | 668 / 1004 | 736 / 93079 |
|
|
21
|
+
| 可滚范围 | **336px** | **92343px** |
|
|
22
|
+
|
|
23
|
+
`?lgdiag=1` 的诊断日志同步印证:补偿脚本的每一轮都落在 `clipping=0` → `ineffective -> reverted (stock page)` 或 `official scroll layer works`,**从不写入任何内联样式**(`html` 上只剩 `color-scheme`,`#root` 为空)。因此 `mobileScrollFix` 保留、默认仍开:它在 `0.2.0-rc.2` 上零副作用,在 `0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1` 上仍是必需的。
|
|
24
|
+
|
|
25
|
+
**窄屏右侧栏在 `0.2.0-rc.2` 上验证正常**(iPhone 视口 390×844):点会话头部的「展开右侧栏」后按钮消失、面板铺满视口,可见面积 **100%**、屏幕正中命中面板内部;`http://127.0.0.1:3080/` 直连与经代理的 `https://<主机>:3081/` 逐项一致。
|
|
26
|
+
|
|
27
|
+
## [0.4.5] — 2026-09-29(长会话延迟挂载时,裁剪补偿不再提前收工)
|
|
28
|
+
|
|
29
|
+
**现象**:0.4.4 之后,部分长会话在手机上依旧「只有一小段、拖不到底」,而同一条会话在宽屏/桌面完全正常。
|
|
30
|
+
|
|
31
|
+
**根因**:`run()` 在 `convScrolls()` 为真时立刻 `done=true` 收工,而 `fixClip()` 每次只处理当次已存在的被裁层。长会话的正文是**后挂载**的——官方滚动层先拿到少量可滚范围(本次实测仅 336px),`EvIC1a_frame` 稍后才以 `overflow:hidden` 锁死高度。于是补偿恰好在最需要它的那一刻已经停止轮询;真机上表现为注入标记在、`fixClip()` 的补偿逻辑在,却没有留下任何内联修补。
|
|
32
|
+
|
|
33
|
+
**修法**:`convScrolls()` 为真时不再结束,改为保留原有的每 1.5s、最多 30 次(约 45s)轮询窗口,等延迟出现的裁剪层交给 `fixClip()` 释放;补偿成功或回退分支成功才收工。`fixClip()` 自身「可滚范围没有变大就整体回退」的自检不变。
|
|
34
|
+
|
|
35
|
+
**真机验收**(iPhone 16 Pro Max / iOS 27,经代理 3081,同一长会话):
|
|
36
|
+
|
|
37
|
+
| | 修复前 | 修复后 |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| 官方滚动层 client / scroll | 668 / 1004 | 668 / 7557 |
|
|
40
|
+
| 可滚范围 | **336** | **6889** |
|
|
41
|
+
| 滚动层内部被裁层 | 1(`EvIC1a_frame` 796 高、`overflow:hidden`) | **0** |
|
|
42
|
+
|
|
43
|
+
官方「回到底部」按钮仍在屏内(y=538),未复现 0.4.4 修过的 sticky 回退;脚本仍只在窄屏 + 移动 UA 下运行,宽屏与桌面不受影响。
|
|
44
|
+
|
|
3
45
|
## [0.4.4] — 2026-09-29(补偿 DSH `0.2.0-rc.1` 的会话裁剪回归)
|
|
4
46
|
|
|
5
47
|
**现象**(真机 iPhone 16 Pro Max / iOS 27,经代理的 3081):会话内容看得见,但**手指几乎拖不动、打开会话也不停在最新消息**。
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<a href="https://github.com/idoall/dsh-lan-guard/actions/workflows/ci.yml"><img src="https://github.com/idoall/dsh-lan-guard/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
7
7
|
<a href="https://www.npmjs.com/package/dsh-lan-guard"><img src="https://img.shields.io/npm/v/dsh-lan-guard?label=npm&color=CB3837" alt="npm version"></a>
|
|
8
8
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-0F172A" alt="MIT"></a>
|
|
9
|
-
<img src="https://img.shields.io/badge/DSH-0.
|
|
9
|
+
<img src="https://img.shields.io/badge/DSH-0.2.0--rc.2-4B6BFB" alt="DSH 0.2.0-rc.2">
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">English | <a href="README.zh.md">中文</a></p>
|
|
@@ -49,7 +49,7 @@ Requirements:
|
|
|
49
49
|
|
|
50
50
|
- DeepSeek Harness with a Web profile
|
|
51
51
|
- Node.js 20 or newer
|
|
52
|
-
- Verified DeepSeek Harness: `0.
|
|
52
|
+
- Verified DeepSeek Harness: `0.2.0-rc.2`
|
|
53
53
|
|
|
54
54
|
Install from npm:
|
|
55
55
|
|
|
@@ -147,11 +147,16 @@ The plugin reads its config from its Cordis entry. **Every key has a usable defa
|
|
|
147
147
|
|
|
148
148
|
## Compatibility
|
|
149
149
|
|
|
150
|
-
Current version: plugin **`0.4.
|
|
150
|
+
Current version: plugin **`0.4.6`**; compatible with DeepSeek Harness **`0.2.0-rc.2`** (declaration only, zero code) — that release fixed the `0.2.0-rc.1` transcript-clipping regression, so the mobile clip compensation no longer engages (it stays for older releases).
|
|
151
151
|
|
|
152
152
|
| Plugin | Verified DeepSeek Harness | What this version is |
|
|
153
153
|
| --- | --- | --- |
|
|
154
|
+
| **`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) |
|
|
155
|
+
| **`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 |
|
|
154
156
|
| **`0.4.4`** | **`0.2.0-rc.1`**, `0.1.7-rc.2` | iOS session scrolling on DSH `0.2.0-rc.1`: an inner `overflow:hidden` layer with a locked height clipped the conversation (measured on device: 21083px of content behind a 336px scroll range), so a session did not open at the newest message and barely dragged. `mobileScrollFix` now grows that inner layer and drops its scroll-container role, restoring 20675px — verified on device with the composer still pinned and the official "back to bottom" button back in place |
|
|
157
|
+
| **`0.4.3`** | **`0.2.0-rc.1`**, `0.1.7-rc.2`, `0.1.7-rc.1` | Direction change: fix the mobile **height chain** instead of patching `overflow` — a definite height for `html/body/#root`, `100dvh` on the shell and `min-height:0` along the clipping chain, self-checked and reverted wholesale when the official scroll layer still does not scroll; removes the self-made "back to bottom" button and every `overflow-y`/`-webkit-overflow-scrolling` patch; declares DSH `0.2.0-rc.1` and widens the `dsh`/peer ranges to `<0.3.0` |
|
|
158
|
+
| **`0.4.2`** | `0.1.7-rc.2` | The official "back to bottom" button restored: the narrow-screen correction left the conversation's own scroll layer without a growing height, so the official button never believed it was away from the end — the plugin supplies one while hidden and yields as soon as the official one works; also reverts its `overflow-y` patch whenever a full-screen mask or dialog opens (the drawer-scrim regression) |
|
|
159
|
+
| **`0.4.1`** | `0.1.7-rc.2` | First cut of `mobileScrollFix` for "the chat area cannot be dragged on a phone": applies touch-scrollable treatment only when narrow viewport + mobile UA + the page cannot scroll + a clipped overflowing layer is found, and never touches an already-scrolling page; adds the `?lgdiag=1` layout report; measured on device, 86.4s of connection survival with heartbeat answering |
|
|
155
160
|
| **`0.4.0`** | **`0.1.7-rc.2`**, `0.1.7-rc.1` | Mobile long-connection self-healing: the proxy answers DSH's WebSocket heartbeat (measured: 6 s reap without it, 20 s+ survival with it); page patches adding a socket watchdog and mobile compatibility shims; a connection health check and relay counters on the "connection" tab |
|
|
156
161
|
| **`0.3.6`** | **`0.1.7-rc.2`**, `0.1.7-rc.1` | Adding a workspace from a remote device: the browser half shadows the official directory flow (the local browser keeps the OS dialog, a remote device gets an in-page browser and can unlock inside it); fixes the proxy dropping the plugin's admin cookie in both directions, which made `password_unlock` meaningless remotely; adds the missing "remote management rights" control; moves the "saved" confirmation to a top-right notification; reworks status-surface colours against measured contrast; fixes the picker's crushed breadcrumb/shortcut rows |
|
|
157
162
|
| **`0.3.5`** | **`0.1.7-rc.2`**, `0.1.7-rc.1` | Connection-level visibility: an `http://` request to the TLS port goes from "blank page + no log" to a 301 onto `https` with a log line; a deleted device record no longer locks that browser out (revoked/blocked still refuse); the removal-page copy follows |
|
|
@@ -164,7 +169,7 @@ Current version: plugin **`0.4.4`**; compensates a DSH `0.2.0-rc.1` layout regre
|
|
|
164
169
|
| `0.1.1` | `0.1.7-rc.1` | Documentation release: bilingual user READMEs |
|
|
165
170
|
| `0.1.0` | `0.1.7-rc.1` | First release: gated reverse proxy, self-signed HTTPS, device pairing, settings page, QR access |
|
|
166
171
|
|
|
167
|
-
- Declared range `>=0.1.7-rc.1 <0.3.0` (`dsh.engines.dsh`); verified releases: `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`. DSH versions not listed are **unverified** — verify them yourself before use. The upper bound was widened from `<0.2.0` in `0.4.3` because profile load refuses a bundle whose range excludes the running release, and a plain `<0.2.0` would exclude the `0.2.0` stable.
|
|
172
|
+
- Declared range `>=0.1.7-rc.1 <0.3.0` (`dsh.engines.dsh`); verified releases: `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`. DSH versions not listed are **unverified** — verify them yourself before use. The upper bound was widened from `<0.2.0` in `0.4.3` because profile load refuses a bundle whose range excludes the running release, and a plain `<0.2.0` would exclude the `0.2.0` stable.
|
|
168
173
|
- Host/client interfaces this plugin uses: `webServer.register` / `webServer.tapIndex` (indexTaps), `connection.requestRejection`, `connection.authenticatedUrl`, the additive `settings.section` seat, `@deepseek-ai/schemastery`, and `profileContext` (for deriving the default data directory).
|
|
169
174
|
- **Breaking default change (from `0.3.2`)**: `listenHost` now defaults to `0.0.0.0` instead of `127.0.0.1`, so one restart after install is enough; `0.3.1` and earlier default to loopback only. The gate and self-signed TLS defaults are unchanged (with no password the gate still refuses every device). See the [CHANGELOG](CHANGELOG.md).
|
|
170
175
|
- **`0.4.0` verification status**: all three changes carry measurements, not just specs.
|
package/README.zh.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<a href="https://github.com/idoall/dsh-lan-guard/actions/workflows/ci.yml"><img src="https://github.com/idoall/dsh-lan-guard/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
7
7
|
<a href="https://www.npmjs.com/package/dsh-lan-guard"><img src="https://img.shields.io/npm/v/dsh-lan-guard?label=npm&color=CB3837" alt="npm 版本"></a>
|
|
8
8
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-0F172A" alt="MIT"></a>
|
|
9
|
-
<img src="https://img.shields.io/badge/DSH-0.
|
|
9
|
+
<img src="https://img.shields.io/badge/DSH-0.2.0--rc.2-4B6BFB" alt="DSH 0.2.0-rc.2">
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center"><a href="README.md">English</a> | 中文</p>
|
|
@@ -49,7 +49,7 @@ DSH 的 Web 界面只监听 `127.0.0.1`,而官方明确拒绝绑定 `0.0.0.0`
|
|
|
49
49
|
|
|
50
50
|
- 带 Web profile 的 DeepSeek Harness
|
|
51
51
|
- Node.js 20 或更新
|
|
52
|
-
- 已验证的 DeepSeek Harness:`0.
|
|
52
|
+
- 已验证的 DeepSeek Harness:`0.2.0-rc.2`
|
|
53
53
|
|
|
54
54
|
从 npm 安装:
|
|
55
55
|
|
|
@@ -147,11 +147,16 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
147
147
|
|
|
148
148
|
## 兼容性
|
|
149
149
|
|
|
150
|
-
当前版本:插件 **`0.4.
|
|
150
|
+
当前版本:插件 **`0.4.6`**;兼容 DeepSeek Harness **`0.2.0-rc.2`**(仅声明,零代码)——该版本修掉了 `0.2.0-rc.1` 的会话裁剪回归,移动端裁剪补偿因此不再介入(保留以兼容旧版本)。
|
|
151
151
|
|
|
152
152
|
| 插件 | 已验证的 DeepSeek Harness | 这个版本是什么 |
|
|
153
153
|
| --- | --- | --- |
|
|
154
|
+
| **`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**,脚本每轮自检后整体撤销、不写任何内联样式) |
|
|
155
|
+
| **`0.4.5`** | **`0.2.0-rc.1`**、`0.1.7-rc.2` | 长会话的正文是在官方滚动层拿到少量可滚范围**之后**才挂载的,旧逻辑把这个中间态当成「已正常」收工,晚出现的 `overflow:hidden` 层再也没人放行(真机实测:可滚范围 336px、滚动层内部仍有 1 层被裁)。现在改为在既有轮询窗口内继续侦测并放行迟到的裁剪层:可滚范围 336px → 6889px,被裁层 1 → 0,官方「回到底部」仍在屏内 |
|
|
154
156
|
| **`0.4.4`** | **`0.2.0-rc.1`**、`0.1.7-rc.2` | 修好 DSH `0.2.0-rc.1` 上的 iOS 会话滚动:官方滚动层内部有一层 `overflow:hidden` 且高度锁死,把会话内容裁掉(真机实测:21083px 的内容只换来 336px 可滚范围),表现为打开会话不在最新、手指几乎拖不动。`mobileScrollFix` 现在让该层长高并脱离滚动容器身份,可滚范围恢复到 20675px;真机验收同时确认输入框仍吸底、官方「回到底部」按钮回到原位 |
|
|
157
|
+
| **`0.4.3`** | **`0.2.0-rc.1`**、`0.1.7-rc.2`、`0.1.7-rc.1` | 方向修正:不再给内容层打 `overflow` 补丁,改修移动端**高度链**——给 `html/body/#root` 确定高度、shell 用 `100dvh`、沿被裁层补 `min-height:0`,并自检「官方滚动层真的能滚」否则整体回退;移除自建「回到底部」按钮与全部 `overflow-y`/`-webkit-overflow-scrolling` 补丁;声明 DSH `0.2.0-rc.1` 并把 `dsh`/peer 范围放宽到 `<0.3.0` |
|
|
158
|
+
| **`0.4.2`** | `0.1.7-rc.2` | 找回官方「回到底部」按钮:窄屏矫正让 conversation 自己的滚动层高度不再增长,官方按钮因此永远认为还在尾部——插件在官方按钮缺席时补一个,官方按钮一恢复就自动让位;同时修复矫正的 `overflow-y` 补丁与全屏遮罩打架导致侧边栏被灰雾盖住的回归 |
|
|
159
|
+
| **`0.4.1`** | `0.1.7-rc.2` | `mobileScrollFix` 首版,修「手机上聊天区滑不动」:仅在「窄屏 + 移动 UA + 整页不可滚 + 找到被裁剪溢出的层」四条同时成立时才处理,正常页面一律不碰;新增 `?lgdiag=1` 布局诊断;真机实测连接存活 86.4 秒 |
|
|
155
160
|
| **`0.4.0`** | **`0.1.7-rc.2`**、`0.1.7-rc.1` | 手机长连接自愈:代理代答 DSH 的 WebSocket 心跳(实测把「停回心跳 6 秒被切断」变成「20 秒以上存活」);页面补丁加入断线看门狗与移动端兼容垫片;「连接与证书」新增连接体检与代理侧计数 |
|
|
156
161
|
| **`0.3.6`** | **`0.1.7-rc.2`**、`0.1.7-rc.1` | 远程也能添加工作区:浏览器侧遮蔽官方目录流程(本机仍走系统对话框,远程改用页面内目录浏览器,可在弹层内解锁);修掉代理双向丢弃插件管理 cookie 导致 `password_unlock` 对远程形同虚设;补上一直缺失的「远程设备管理权限」控件;「已保存」改为右上角提示;状态表面配色按实测重做;弹层两行被压扁重叠 |
|
|
157
162
|
| **`0.3.5`** | **`0.1.7-rc.2`**、`0.1.7-rc.1` | 连接层可见性:`http://` 访问 TLS 端口由「空白页 + 无日志」改为 301 跳 `https` 并记日志;删除设备记录后旧 cookie 不再把浏览器锁死(吊销/拉黑仍拒绝);移除页文案同步修正 |
|
|
@@ -164,7 +169,7 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
164
169
|
| `0.1.1` | `0.1.7-rc.1` | 文档版:中英双语用户 README |
|
|
165
170
|
| `0.1.0` | `0.1.7-rc.1` | 首个版本:门禁反向代理、自签 HTTPS、设备配对、设置页、扫码访问 |
|
|
166
171
|
|
|
167
|
-
- 声明范围 `>=0.1.7-rc.1 <0.3.0`(`dsh.engines.dsh`);已验证版本:`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`。未列入的 DSH 版本属**未验证**,请自行验证后再使用。上界在 `0.4.3` 从 `<0.2.0` 放宽:profile 加载会拒绝范围不含运行版本的 bundle,而裸的 `<0.2.0` 恰好排除 `0.2.0` 正式版。
|
|
172
|
+
- 声明范围 `>=0.1.7-rc.1 <0.3.0`(`dsh.engines.dsh`);已验证版本:`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`。未列入的 DSH 版本属**未验证**,请自行验证后再使用。上界在 `0.4.3` 从 `<0.2.0` 放宽:profile 加载会拒绝范围不含运行版本的 bundle,而裸的 `<0.2.0` 恰好排除 `0.2.0` 正式版。
|
|
168
173
|
- 本插件用到的宿主/客户端接口:`webServer.register` / `webServer.tapIndex`(indexTaps)、`connection.requestRejection`、`connection.authenticatedUrl`、追加型 `settings.section` seat、`@deepseek-ai/schemastery`,以及 `profileContext`(用于推导默认数据目录)。
|
|
169
174
|
- **破坏性默认值变更(`0.3.2` 起)**:`listenHost` 默认由 `127.0.0.1` 改为 `0.0.0.0`,装完重启一次即可用;`0.3.1` 及更早默认仅回环。门禁与自签 TLS 的默认值未变(未设密码仍拒绝所有设备)。详见 [CHANGELOG](CHANGELOG.md)。
|
|
170
175
|
- **`0.4.0` 的验证状态**:三处改动都做了实测,不只跑用例。
|
package/lib/index.js
CHANGED
|
@@ -3214,7 +3214,7 @@ const MOBILE_SCROLL_MARKER = "/*dsh-lan-guard:mobile-scroll*/";
|
|
|
3214
3214
|
* @returns one inline `<script>` element.
|
|
3215
3215
|
*/
|
|
3216
3216
|
function mobileScrollFixScript() {
|
|
3217
|
-
return `<script>${MOBILE_SCROLL_MARKER}(function(){try{var diag=/[?&]lgdiag/.test(self.location.search);var out=[];function log(s){out.push(s);if(diag)draw()}function draw(){try{var p=document.getElementById("lgsc");if(!p){p=document.createElement("pre");p.id="lgsc";p.style.cssText="position:fixed;left:0;top:0;right:0;height:46%;z-index:2147483647;background:rgba(0,0,0,.92);color:#0f0;font:10px/1.3 monospace;padding:6px;margin:0;overflow:auto;white-space:pre-wrap;pointer-events:none";(document.body||document.documentElement).appendChild(p)}p.textContent="[lan-guard 手机滚动诊断]"+String.fromCharCode(10)+out.join(String.fromCharCode(10))}catch(e){}}var touched=[];function set(el,prop,val){if(!el)return;try{el.style.setProperty(prop,val,"important");touched.push([el,prop])}catch(e){}}function undoAll(){for(var i=0;i<touched.length;i++){try{touched[i][0].style.removeProperty(touched[i][1])}catch(e){}}touched=[]}function conv(){try{return document.querySelector("[data-conversation-scroll]")}catch(e){return null}}function convScrolls(){var c=conv();return !!c&&c.scrollHeight>c.clientHeight+8}function pageScrolls(){var d=document.documentElement,b=document.body;return (d&&d.scrollHeight>d.clientHeight+8)||(b&&b.scrollHeight>b.clientHeight+8)}function clipping(){var r=[];var all=document.querySelectorAll("div");var lim=Math.min(all.length,5000);for(var i=0;i<lim;i++){var el=all[i];var cs=getComputedStyle(el);if(cs.overflowY!=="hidden"&&cs.overflowY!=="clip")continue;if(el.clientHeight<150)continue;if(el.scrollHeight<=el.clientHeight+8)continue;r.push(el)}r.sort(function(a,b){return (b.scrollHeight-b.clientHeight)-(a.scrollHeight-a.clientHeight)});return r}function overlayOpen(){try{if(document.querySelector("[aria-modal=true],[role=dialog],[data-conversation-overlay]"))return true;var el=document.elementFromPoint(Math.round(innerWidth*0.92),Math.round(innerHeight*0.45));while(el&&el!==document.body){var cs=getComputedStyle(el);if((cs.position==="fixed"||cs.position==="absolute")&&cs.pointerEvents!=="none"){var r=el.getBoundingClientRect();if(r.width>innerWidth*0.85&&r.height>innerHeight*0.7)return true}el=el.parentElement}}catch(e){}return false}function touchPassThrough(){var layers=document.querySelectorAll("div");var lim=Math.min(layers.length,5000);var n=0;for(var i=0;i<lim;i++){var el=layers[i];var cs=getComputedStyle(el);if(cs.position!=="fixed"&&cs.position!=="absolute")continue;if(cs.pointerEvents==="none")continue;var r=el.getBoundingClientRect();if(r.width<innerWidth*0.9||r.height<innerHeight*0.8)continue;if(el.querySelector("button,input,textarea,select,[contenteditable]"))continue;if((el.textContent||"").length>40)continue;el.style.setProperty("pointer-events","none","important");n++}log("touch passthrough layers="+n);return n}function fixClip(){var c=conv();if(!c)return false;var list=clipping();var before=c.scrollHeight-c.clientHeight;var n=0;for(var i=0;i<list.length;i++){if(!c.contains(list[i]))continue;set(list[i],"height","auto");set(list[i],"overflow","visible");n++}if(!n)return false;var after=c.scrollHeight-c.clientHeight;log("clip grow layers="+n+" max "+before+"->"+after);if(after<=before+8){undoAll();log("clip grow ineffective -> reverted");return false}return true}function fix(){if(convScrolls()){log("official scroll layer works; done");return true}var list=clipping();var clip=list[0];log("clipping="+list.length+(clip?(" first="+String(typeof clip.className==="string"?clip.className:"")+" "+clip.clientHeight+"/"+clip.scrollHeight):""));var root=document.getElementById("root");set(document.documentElement,"height","100%");set(document.body,"height","100%");set(document.body,"overflow","hidden");set(root,"height","100dvh");set(root,"min-height","0");set(root,"overflow","hidden");var n=clip,d=0;while(n&&n!==document.body&&d<8){var cs=getComputedStyle(n);if(cs.display.indexOf("flex")>=0||cs.display.indexOf("grid")>=0)set(n,"min-height","0");n=n.parentElement;d++}var ok=convScrolls();log("chainFix convScroll="+(conv()?(conv().clientHeight+"/"+conv().scrollHeight):"n/a")+" scrollable="+ok);if(!ok){undoAll();log("ineffective -> reverted (stock page)")}return ok}var done=false,tries=0;function run(){if(done)return;var narrow=self.matchMedia?self.matchMedia("(max-width: 1023px)").matches:false;var mobile=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent||"");log("narrow="+narrow+" mobile="+mobile+" innerH="+innerHeight+" vv="+(self.visualViewport?self.visualViewport.height:"-")+" pageScrolls="+pageScrolls());if(!narrow||!mobile){done=true;return}if(overlayOpen()){undoAll();log("overlay/dialog open -> reverted");return}touchPassThrough();if(fixClip()){log("clip released -> max="+(conv().scrollHeight-conv().clientHeight));done=true;return}if(convScrolls()){log("official scroll layer
|
|
3217
|
+
return `<script>${MOBILE_SCROLL_MARKER}(function(){try{var diag=/[?&]lgdiag/.test(self.location.search);var out=[];function log(s){out.push(s);if(diag)draw()}function draw(){try{var p=document.getElementById("lgsc");if(!p){p=document.createElement("pre");p.id="lgsc";p.style.cssText="position:fixed;left:0;top:0;right:0;height:46%;z-index:2147483647;background:rgba(0,0,0,.92);color:#0f0;font:10px/1.3 monospace;padding:6px;margin:0;overflow:auto;white-space:pre-wrap;pointer-events:none";(document.body||document.documentElement).appendChild(p)}p.textContent="[lan-guard 手机滚动诊断]"+String.fromCharCode(10)+out.join(String.fromCharCode(10))}catch(e){}}var touched=[];function set(el,prop,val){if(!el)return;try{el.style.setProperty(prop,val,"important");touched.push([el,prop])}catch(e){}}function undoAll(){for(var i=0;i<touched.length;i++){try{touched[i][0].style.removeProperty(touched[i][1])}catch(e){}}touched=[]}function conv(){try{return document.querySelector("[data-conversation-scroll]")}catch(e){return null}}function convScrolls(){var c=conv();return !!c&&c.scrollHeight>c.clientHeight+8}function pageScrolls(){var d=document.documentElement,b=document.body;return (d&&d.scrollHeight>d.clientHeight+8)||(b&&b.scrollHeight>b.clientHeight+8)}function clipping(){var r=[];var all=document.querySelectorAll("div");var lim=Math.min(all.length,5000);for(var i=0;i<lim;i++){var el=all[i];var cs=getComputedStyle(el);if(cs.overflowY!=="hidden"&&cs.overflowY!=="clip")continue;if(el.clientHeight<150)continue;if(el.scrollHeight<=el.clientHeight+8)continue;r.push(el)}r.sort(function(a,b){return (b.scrollHeight-b.clientHeight)-(a.scrollHeight-a.clientHeight)});return r}function overlayOpen(){try{if(document.querySelector("[aria-modal=true],[role=dialog],[data-conversation-overlay]"))return true;var el=document.elementFromPoint(Math.round(innerWidth*0.92),Math.round(innerHeight*0.45));while(el&&el!==document.body){var cs=getComputedStyle(el);if((cs.position==="fixed"||cs.position==="absolute")&&cs.pointerEvents!=="none"){var r=el.getBoundingClientRect();if(r.width>innerWidth*0.85&&r.height>innerHeight*0.7)return true}el=el.parentElement}}catch(e){}return false}function touchPassThrough(){var layers=document.querySelectorAll("div");var lim=Math.min(layers.length,5000);var n=0;for(var i=0;i<lim;i++){var el=layers[i];var cs=getComputedStyle(el);if(cs.position!=="fixed"&&cs.position!=="absolute")continue;if(cs.pointerEvents==="none")continue;var r=el.getBoundingClientRect();if(r.width<innerWidth*0.9||r.height<innerHeight*0.8)continue;if(el.querySelector("button,input,textarea,select,[contenteditable]"))continue;if((el.textContent||"").length>40)continue;el.style.setProperty("pointer-events","none","important");n++}log("touch passthrough layers="+n);return n}function fixClip(){var c=conv();if(!c)return false;var list=clipping();var before=c.scrollHeight-c.clientHeight;var n=0;for(var i=0;i<list.length;i++){if(!c.contains(list[i]))continue;set(list[i],"height","auto");set(list[i],"overflow","visible");n++}if(!n)return false;var after=c.scrollHeight-c.clientHeight;log("clip grow layers="+n+" max "+before+"->"+after);if(after<=before+8){undoAll();log("clip grow ineffective -> reverted");return false}return true}function fix(){if(convScrolls()){log("official scroll layer works; done");return true}var list=clipping();var clip=list[0];log("clipping="+list.length+(clip?(" first="+String(typeof clip.className==="string"?clip.className:"")+" "+clip.clientHeight+"/"+clip.scrollHeight):""));var root=document.getElementById("root");set(document.documentElement,"height","100%");set(document.body,"height","100%");set(document.body,"overflow","hidden");set(root,"height","100dvh");set(root,"min-height","0");set(root,"overflow","hidden");var n=clip,d=0;while(n&&n!==document.body&&d<8){var cs=getComputedStyle(n);if(cs.display.indexOf("flex")>=0||cs.display.indexOf("grid")>=0)set(n,"min-height","0");n=n.parentElement;d++}var ok=convScrolls();log("chainFix convScroll="+(conv()?(conv().clientHeight+"/"+conv().scrollHeight):"n/a")+" scrollable="+ok);if(!ok){undoAll();log("ineffective -> reverted (stock page)")}return ok}var done=false,tries=0;function run(){if(done)return;var narrow=self.matchMedia?self.matchMedia("(max-width: 1023px)").matches:false;var mobile=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent||"");log("narrow="+narrow+" mobile="+mobile+" innerH="+innerHeight+" vv="+(self.visualViewport?self.visualViewport.height:"-")+" pageScrolls="+pageScrolls());if(!narrow||!mobile){done=true;return}if(overlayOpen()){undoAll();log("overlay/dialog open -> reverted");return}touchPassThrough();if(fixClip()){log("clip released -> max="+(conv().scrollHeight-conv().clientHeight));done=true;return}if(convScrolls()){log("official scroll layer works; waiting for late clip");return}if(fix())done=true}run();var t=setInterval(function(){tries++;run();if(done||tries>30)clearInterval(t)},1500);}catch(e){}})()<\/script>`;
|
|
3218
3218
|
}
|
|
3219
3219
|
/**
|
|
3220
3220
|
* Insert the narrow-screen scroll correction.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-lan-guard",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "DSH web plugin: expose the official desktop Web UI to the local network through a gated reverse proxy, without touching DSH's own loopback binding.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -69,7 +69,8 @@
|
|
|
69
69
|
"dshReleases": {
|
|
70
70
|
"0.1.7-rc.2": "compatible",
|
|
71
71
|
"0.1.7-rc.1": "compatible",
|
|
72
|
-
"0.2.0-rc.1": "compatible"
|
|
72
|
+
"0.2.0-rc.1": "compatible",
|
|
73
|
+
"0.2.0-rc.2": "compatible"
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
},
|
|
@@ -91,8 +92,8 @@
|
|
|
91
92
|
],
|
|
92
93
|
"devDependencies": {
|
|
93
94
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
94
|
-
"@deepseek-ai/dsh-client-connection": "0.
|
|
95
|
-
"@deepseek-ai/dsh-host-webserver": "0.
|
|
95
|
+
"@deepseek-ai/dsh-client-connection": "0.2.0-rc.2",
|
|
96
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.0-rc.2",
|
|
96
97
|
"@deepseek-ai/schemastery": "^3.18.4",
|
|
97
98
|
"@types/node": "^26.2.0",
|
|
98
99
|
"@types/qrcode": "^1.5.6",
|