fix(frontend): 修复终端面板高度适配与拖拽回弹 - #1001
Open
2379278408 wants to merge 3 commits into
Open
Conversation
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.
修改说明
react-resizable-panelsv4 支持的显式百分比20%至70%,保持拖拽过程连续并为上方内容保留可用空间ResizeObserver和FitAddon.fit()统一决定 xterm 行列数问题原因
该问题包含两层原因:
react-resizable-panelsv4 将数字尺寸解释为像素,任务详情页传入的75、25、30等旧版百分比数值使面板约束退化为固定像素。fit()后,服务端异步返回的resize帧会再次用旧行列数覆盖 xterm。容器尺寸此时保持稳定,页面缺少后续观察事件来触发第二次fit(),从而留下空白区域。修复后,浏览器容器成为 xterm 行列数的唯一来源;服务端继续接收浏览器上报的最新尺寸以调整 PTY。
验证结果
预览地址
https://11180-44fb865d4a1f81e6.monkeycode-ai.online
效果展示
Closes #950