fix(web-terminal): 修复 Herdr 只读终端小窗展示#419
Open
luw2007 wants to merge 4 commits into
Open
Conversation
Author
|
先关闭,待本地验证通过后再重新提交。 |
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.
改了什么
herdr agent attach驱动真实 agent TTY 尺寸,后续查看者复用同一网格。根因
原修复只处理了浏览器容器和 xterm 画布。
HerdrBackend.resize()只更新了本地缓存,没有改变 OpenCode 所在的真实 TTY,因此页面虽然全屏,OpenCode 仍按恢复时的54×23小终端绘制,表现为内容只占页面一小块。影响面
验证
pnpm vitest run --project unit test/herdr-backend.test.ts:33/33 通过。pnpm vitest run --project e2e test/herdr-backend.e2e.ts:9/9 通过,其中真实 Herdr +SIGWINCH/stty用例验证 TTY 从80×24变为150×42。pnpm build:通过。prompt-builder、dashboard-create-session、sandbox。浏览器验收
在 OpenCode 只读页面、已知真实 TTY 为
54×23的前置状态下实测:1280×720158×40158×40158×40158×40158×40158×40390×84447×4647×46桌面和移动端均已在本地浏览器截图核对:页面显示“只读模式 · 无写入权限”和
connected,终端容器覆盖完整视口。