fix(ui): 右侧工具栏在左侧边栏展开时内容跟随面板宽度重排 - #841
Merged
Loosand merged 1 commit intoSep 20, 2026
Merged
Conversation
The tools panel content kept its saved pixel width anchored right. When the group shrank (left sidebar expanded) the panel kept its percentage share and got narrower, so the fixed-width content overflowed to the left and was clipped by the panel's overflow: hidden, looking as if the main column covered it. Only keep the fixed width during the open transition; once settled, size the content to 100% of the panel.
StackCairn
marked this pull request as draft
September 20, 2026 07:09
Contributor
|
PR governance checks passed. Awaiting human review. |
AlphaCatMeow
marked this pull request as ready for review
September 20, 2026 08:09
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.
Linked issue
Closes #840
Summary
右侧工具栏打开时展开左侧边栏,右栏变窄了,内容却保持原来的像素宽度,左边一截被 panel 的
overflow: hidden裁掉,看起来像被主面板盖住。WorkspaceToolsPanel的内容层宽度固定为savedWidth,只在拖拽期间切到100%。这个固定宽度只有开关动画那 200ms 有用:让内容随 flex-grow 过渡滑入,避免动画期间反复重排。动画结束后它就成了负担,panel 组一变窄(左栏展开)内容就溢出。改法:加一个
settled状态。打开后等过渡结束(240ms,对应duration-200)把内容层切到100%;immediate模式直接100%;关闭或移动端复位。之后左栏展开,主面板位移,右栏同步缩窄,内容按新宽度重排。这个组件桌面端
ChatPage.tsx和 gateway webGatewayAppView.tsx共用,一处修复覆盖两端。Change scope
crates/agent-ui/src/components/project-tools/WorkspacePanels.tsxcrates/agent-gui/test/chat/sidebar-shells.test.mjs(新增回归测试,并把 panel 布局 mock 抽成installPanelLayoutMocks)docs/worklog/right-dock-clipped-when-sidebar-expands.mdScreenshots / preview
Verification
node --test crates/agent-gui/test/chat/sidebar-shells.test.mjs7/7 通过node scripts/run-node-tests.mjs test/chat(agent-gui):1441 pass / 7 fail,同样的 7 个失败在未改动的 develop 基线上也存在(源码扫描类测试受 CRLF 影响),与本次改动无关tsc --noEmit -p crates/agent-ui/tsconfig.json通过Pre-submit checklist