Repository navigation
fix(dsh-tui): 只读 Web 终端允许转发 SGR 滚轮 - #3534
Merged
deepcoldy merged 1 commit intoNov 17, 2026
Merged
Conversation
BanboLee
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
November 17, 2026 06:18
Owner
|
感谢贡献,已 squash 合入 master(961320e2a3)。 评审中确认:只读权限边界保持不变( 已知范围外项(不影响本次合入):Herdr 后端的只读滚动仍受 以上为自动评审的初步意见落地记录,最终以维护者审阅为准。 |
deepcoldy
pushed a commit
to xushulong-solo/botmux
that referenced
this pull request
Nov 17, 2026
合入 master 的 deepcoldy#3528/deepcoldy#3515/deepcoldy#3526/deepcoldy#3500/deepcoldy#3534;与本 PR 的 worker.ts、 dashboard.ts 改动区段非相邻,merge-tree 无冲突。合并树 tsc/build、 vitest 20 文件 746 项、bun 18 文件 474 项全绿。 Co-Authored-By: Claude Fable 5 <[email protected]>
|
🚀 Released in v3.59.19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什么
dsh-tui 会话在只读 Web 终端页(
/s/<sessionId>?viewToken=...)无法上下滚动查看历史输出。本 PR 给 dsh-tui 适配器声明readOnlyRemoteScroll: true(与 claude-code 同款),让只读页面把滚轮转成 SGR wheel 事件发回 CLI。src/adapters/cli/dsh-tui.ts:在altScreen: false旁新增readOnlyRemoteScroll: true+ 注释test/cli-adapters.test.ts:断言 dsh-tui 为 true、resolveEffectiveCliId('dsh','tui')映射路径为 true、headless dsh 两条路径不带该字段为什么
alternate_on=1),备用屏没有 xterm scrollback,本地无从可滚;scrollBy(±3));readOnlyRemoteScroll决定。claude-code 已声明,dsh-tui 漏了 → 滚轮被preventDefault后既不本地滚、也不发给 CLI。影响面
dsh不设置该能力(有反向变异断言保护)type:'input'仍要求写权限(authedClients仅在hasWrite时加入);type:'scroll'仍要求适配器 opt-in + 非写连接 + SGR 64/65 同向连续、单帧 ≤6 事件 + 12 事件/秒限流验证
运行态(部署到本机后真实链路)
dist/worker.js,启动时间晚于 daemon 重启readOnlyRemoteScroll=true、hasToken=false、wsHasWrite=false{"type":"scroll","data":"\u001b[<64;…M"×3}(不是input);pane 出现↓ back to bottom (Enter/End),反向65三次后提示消失、回到底部测试
bun run build通过test/cli-adapters.test.ts(干净 TMPDIR)530 passed / 2 skipped;test/web-terminal-scroll*.test.ts11 passed;test/dsh-tui-adapter.test.ts6 passeddsh→ headless 保护断言红备注
workerViewToken在 worker 重启后会失效(403),由terminalCardEpoch派生的 card viewToken 不受影响;排查时先区分 token 类型,不要误判为 flag 未生效altScreen:false;该字段目前只影响 Herdr 的forceRemoteScroll,本次不改,留待 Herdr 只读滚动单独评估