Workspace transfer reads xterm private state because addon-serialize drops mouse encoding
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- tooling
调研方向
从 lib/src/lib/terminal-transfer.ts 开始,运行 lib/src/lib/terminal-transfer.test.ts 中指定的往返测试,然后阅读 docs/specs/transport.md 和 docs/specs/webgl-text.md,了解传输和版本锁步要求。完成的标准是 addon-serialize 发出鼠标编码,固定的 @xterm beta 版本得到升级,移除私有状态读取,并且回归测试通过。
由索引模型根据 Issue 内容生成。
描述
Problem
When a Workspace moves between standalone windows, each terminal is rebuilt in the target from @xterm/addon-serialize output (serializeTransferTerminal in lib/src/lib/terminal-transfer.ts). The pinned addon (@xterm/addon-serialize 0.15.0-beta.301, with @xterm/xterm 6.1.0-beta.304) serializes the mouse tracking mode (?1000 / ?1002 / ?1003) but not the mouse encoding: SGR (CSI ? 1006 h) or SGR-pixels (CSI ? 1016 h).
Without it, a full-screen program that turned on SGR mouse reporting (vim, tmux, htop, …) arrives in the new window with xterm's default encoding. From then on its mouse reports are misparsed, and clicks past column 223 cannot be encoded at all.
Current workaround (#630)
serializeTransferTerminal reads xterm's private terminal._core.mouseStateService.activeEncoding and appends \x1b[?1006h or \x1b[?1016h after the serialized buffer. docs/specs/transport.md → "Transferring a Workspace" requires the encoding to survive the move, and lib/src/lib/terminal-transfer.test.ts pins it against real xterm parsing:
preserves mouse tracking and encoding %i through real xterm parsingdoes not resurrect encoding after reset %jstill transfers the buffer if private mouse state is unavailable
The weakness is the private field. If an xterm bump renames or moves mouseStateService / activeEncoding, the lookup returns nothing and the buffer transfers without the encoding. The round-trip tests would fail that bump rather than let it regress silently, but the code still reaches into xterm internals.
Proposed fix
- Upstream: have
addon-serializeemit the active mouse encoding alongside the tracking mode (xtermjs/xterm.js,addons/addon-serialize). - Bump the pinned
@xterm/*betas, respecting the version lockstep indocs/specs/webgl-text.md. - Delete the private-state read in
serializeTransferTerminal; keep the round-trip tests as the regression pin.
- 主要语言
- TypeScript
- 星标
- 5
- 派生
- 1
- 平均合并
- 18 小时 26 分钟
- 30 天内合并 PR
- 229
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
diffplug/dormouse 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 25/100
查看 diffplug/dormouse 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
calcite-components needs triage refactor
难度 2/5 1-3 小时 新手友好度 75/100
Esri/calcite-design-system#15203 ·
-
难度 2/5 1-3 小时 新手友好度 90/100
danielmiessler/LifeOS#2218 ·