Skip to content

fix(desktop): fit main window to small work areas - #764

Open
Mr-CG-end wants to merge 1 commit into
anywhere-labs:masterfrom
Mr-CG-end:fix/main-window-small-work-area
Open

fix(desktop): fit main window to small work areas#764
Mr-CG-end wants to merge 1 commit into
anywhere-labs:masterfrom
Mr-CG-end:fix/main-window-small-work-area

Conversation

@Mr-CG-end

@Mr-CG-end Mr-CG-end commented Aug 31, 2026

Copy link
Copy Markdown

Summary / 摘要

  • Fit first-launch and restored main-window geometry to the selected display work area.
  • Cap effective minimum dimensions to displays smaller than the configured minimum while preserving the configured minimum on normal displays.
  • Preserve saved positioning when valid, let Electron place an unsaved first window, and fall back safely if state or screen lookup fails.
  • Add pure geometry and Electron-runtime regression coverage for small displays, corrupt state, and screen API failures.

Related Issues / 关联 Issue

N/A — found during local inspection.

Type / 类型

  • Bug fix / Bug 修复
  • Feature / 新功能
  • Refactor / 重构
  • Documentation / 文档
  • Tests / 测试
  • Chore / 维护

Platforms / 影响平台

  • Not platform-specific / 非平台特定
  • Windows installer / Windows 安装版
  • Windows portable / Windows 便携版
  • macOS
  • Linux

Verification / 验证

  • corepack yarn check:layout
  • corepack yarn typecheck
  • corepack yarn test
  • corepack yarn check
  • Platform package smoke / 平台打包冒烟
  • Manual test / 手工测试

Additional verification:

  • Focused desktop regression suites: 84/84 passed.
  • Desktop full suite: 970 passed, 12 skipped, 13 failed due to Windows-host constraints/flakes unrelated to this diff (10 symlink privilege errors, missing pnpm in one packaged fixture, one lifecycle timeout, and one atomic-rename EPERM).
  • Root corepack yarn check passed documentation/layout checks, Market build and 268/268 Market tests, Desktop build, and Desktop typecheck; it stopped at the same 13 Desktop environment failures.
  • git diff --check passed.
  • Independent review found no blocking or non-blocking findings.

Manual Windows monitor-disconnect smoke testing passed: the window was saved on a secondary display, restarted with only the primary display enabled, and remained fully visible after being fitted to the primary work area. High-DPI/RDP was not tested separately.

Release Notes / 发布说明

The Desktop main window now stays within the available display work area on small, scaled, and remote-desktop displays. No migration or configuration change is required.

@Mr-CG-end
Mr-CG-end marked this pull request as ready for review August 31, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant