Skip to content

fix: restore ordinary window geometry and Windows startup position - #460

Draft
WilliamWang1721 wants to merge 6 commits into
Kuddev:mainfrom
WilliamWang1721:codex/issue-window-geometry
Draft

WilliamWang1721 wants to merge 6 commits into
Kuddev:mainfrom
WilliamWang1721:codex/issue-window-geometry

Conversation

@WilliamWang1721

Copy link
Copy Markdown
Contributor

Result / 用户结果

Remember ordinary window size across full process exit, restore its Windows position on a still-attached display, and honor explicit Lua window.position. Explicit grid/position settings take priority over saved geometry. Refs #105, #151, #312; grid dimensions and Quick Terminal's independent sizing were already implemented and are not claimed as new fixes.

Design / 设计边界

Geometry shares the existing atomic session document. Only the first ordinary cold-start window consumes it; new windows, Quick Terminal and administrator isolation retain their own policy. Save normal bounds rather than maximized/fullscreen viewport dimensions, preserve an empty last-window snapshot without restoring closed shells, and clamp on the selected display. Optional JSON position/display fields keep old sessions compatible. Ownership and coordinate note.

Windows saves physical desktop position and logical size using the pinned GPUI normal-placement contract. Non-Windows position restoration is outside this change. Hidden Windows configuration placement waits until activation consumes GPUI's cached placement.

Evidence / 验证依据

  • Fork Windows before/after run: the same registered-window snapshot test fails on main because geometry is absent; initial candidate compilation exposed API/borrow errors, subsequently corrected. This run is not a passing fix result.
  • Updated fork proof: source f99fcbac, Windows tests pending at creation. Formatting, architecture against 9dd3d649, and platform branch gate passed. Head 0afbbde9 applies the exact remote formatting and tightens the branch budget.
  • Regressions cover atomic multiwindow/empty-session roundtrips, explicit Lua configuration, legal large window sizes, offscreen fitting, registered-window snapshots, and real HWND outer/normal placement. Fractional DPI and top/left taskbar offsets are conversion tests; multi-monitor hardware and visual acceptance remain unverified. All execution is remote GitHub Actions.

Required Review / 必须确认

  • Followed contribution, architecture and project constraints.
  • Responsibilities and existing persistence authority are retained; no budgets were raised or tests removed.
  • Final-head checks and native platform results complete.
  • Platform and visual verification limits are stated; no new product text.

AI-assisted implementation: GPT-6.1 SOL. Reasoning effort was not verified. No merge or approval is requested from automation.

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