fix(desktop): keep workspace dock within viewport#3878
Conversation
Clamp the right Workspace dock to available window width and remove the docked layout's summed min-width so the app shell reflows instead of clipping at the right edge. Co-authored-by: Cursor <cursoragent@cursor.com>
Align the Workspace resize separator's ARIA minimum with the viewport-clamped width so constrained dock states report a valid range. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the stale floating-mode comment with the viewport-clamped dock strategy implemented for the Workspace panel. Co-authored-by: Cursor <cursoragent@cursor.com>
|
已检查失败项:两个失败均为 CodeQL init authentication failure,所有常规 CI 和 desktop build 已通过。 |
|
我已在 macOS desktop 构建中做过真实 GUI 验收,右侧 Workspace 文件预览在常规窗口宽度、左侧栏展开/收起场景下不再被窗口边缘裁切。Windows desktop 使用同一套前端布局,理论上同样生效,但仍建议后续 spot-check。 |
|
测试视频如下: 本机:MacBook Air 13 寸 20260611001112-Reasonix-.-1.mp4 |
以后用腾讯会议录屏得全屏录,如果选择只录APP窗口,调整 APP 窗口大小时,录屏效果就会卡。 |
SivanCola
left a comment
There was a problem hiding this comment.
Approved. This is a well-scoped fix for the Workspace dock overflow in #3863. The PR addresses the root cause by clamping the dock to available viewport width and switching the docked layout to shrinkable grid tracks, so file previews no longer force the app wider than the window.
I added f1ac264 to extract the layout width calculation into a small helper and cover the key regression cases: expanded sidebar, collapsed sidebar, very narrow viewports, ARIA resize bounds, closed state, and maximized state.
Verified locally:
pnpm --dir desktop/frontend run testpassedpnpm --dir desktop/frontend run test:allpassedpnpm --dir desktop/frontend run typecheckpassed after generating the Wails modulepnpm --dir desktop/frontend run buildpassedgo test ./...fromdesktoppassedgit diff --checkpassed
GitHub checks are green: CodeQL, lint, desktop, coverage, race, govulncheck, and macOS/Ubuntu/Windows tests all passed.
Summary
Test plan
pnpm --dir desktop/frontend run buildafterwails generate moduleNotes
Made with Cursor