Skip to content

fix(desktop): keep workspace dock within viewport#3878

Merged
SivanCola merged 4 commits into
esengine:main-v2from
lifu963:pr/issue-3863-workspace-overflow
Jun 10, 2026
Merged

fix(desktop): keep workspace dock within viewport#3878
SivanCola merged 4 commits into
esengine:main-v2from
lifu963:pr/issue-3863-workspace-overflow

Conversation

@lifu963

@lifu963 lifu963 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Clamp the right Workspace dock to available viewport width so opening file previews no longer pushes content past the window edge.
  • Replace the docked layout's summed min-width with shrinkable grid tracks and keep Workspace resize metadata valid under constrained widths.
  • Clarify the Workspace open behavior comment to match the viewport-clamped dock strategy.

Test plan

  • pnpm --dir desktop/frontend run build after wails generate module
  • Manual macOS Wails GUI acceptance at normal window sizes, including Workspace file preview with the sidebar collapsed and expanded

Notes

Made with Cursor

lifu963 and others added 3 commits June 10, 2026 23:46
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>
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 10, 2026
@lifu963

lifu963 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

已检查失败项:两个失败均为 CodeQL init authentication failure,所有常规 CI 和 desktop build 已通过。
需要有权限的佬运行该 CodeQL。

@lifu963

lifu963 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

我已在 macOS desktop 构建中做过真实 GUI 验收,右侧 Workspace 文件预览在常规窗口宽度、左侧栏展开/收起场景下不再被窗口边缘裁切。Windows desktop 使用同一套前端布局,理论上同样生效,但仍建议后续 spot-check。

@lifu963

lifu963 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

测试视频如下:

本机:MacBook Air 13 寸

20260611001112-Reasonix-.-1.mp4

@lifu963

lifu963 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

测试视频如下:

本机:MacBook Air 13 寸

20260611001112-Reasonix-.-1.mp4

以后用腾讯会议录屏得全屏录,如果选择只录APP窗口,调整 APP 窗口大小时,录屏效果就会卡。

@SivanCola SivanCola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 test passed
  • pnpm --dir desktop/frontend run test:all passed
  • pnpm --dir desktop/frontend run typecheck passed after generating the Wails module
  • pnpm --dir desktop/frontend run build passed
  • go test ./... from desktop passed
  • git diff --check passed

GitHub checks are green: CodeQL, lint, desktop, coverage, race, govulncheck, and macOS/Ubuntu/Windows tests all passed.

@SivanCola SivanCola merged commit 5dac1df into esengine:main-v2 Jun 10, 2026
13 checks passed
@lifu963 lifu963 deleted the pr/issue-3863-workspace-overflow branch June 11, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 应用最右侧被窗口边缘截断,无法完整显示;左侧会话栏展开后问题加重

2 participants