Repository navigation
Persist opt-in native window placement - #63
Merged
Merged
Conversation
Refs #14 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Account for content and frame height on macOS and retain normal bounds through zoom animations. Add native smoke evidence and transition regression coverage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1bye
marked this pull request as ready for review
November 12, 2026 16:42
Preserve native menu installation and window placement hooks; retain both documentation entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Refs #14
Adds opt-in native window placement through App::window_state and a shared WindowState preferences policy. Explicit application-owned keys keep windows independent; per-window opt-out and asynchronous reset are supported. Restore logic validates versioned records, matches display UUIDs, and clamps or falls back onto visible displays using logical coordinates. Saving is coalesced for 250 ms, serialized across windows and resets, and flushed on close/quit. Web is a documented no-op.
The desktop example opts in. Public rustdoc, a placement guide, pure serialization/clamping tests, public API tests, and GPUI headless lifecycle tests are included.
Validation completed locally:
Native results: macOS 26.6.2 (25G83), Apple silicon, built-in 3456×2234 / logical 1728×1117 at 2x, with a second 3840×2160 / logical 1920×1080 at 2x connected. Three launches retained a 720×480 content area at (200, 150), with a stable 720×512 native frame, despite changed fallback defaults. Saved maximized/fullscreen records restored their modes and normal bounds. Injected off-screen geometry and a missing display UUID fell back onto the visible main display. The guide records the setup and reproducible smoke procedure; missing-display injection does not establish physical unplug/replug behavior.
Design notes: account for macOS content/frame height differences and protect restore bounds from intermediate zoom frames. Where the adapter does not expose unmaximized restore bounds, retain windowed bounds settled for 250 ms; an immediate resize-then-maximize can therefore use the preceding settled size. Rejected startup mode requests follow actual host state after two seconds. Opaque native workspace archives are not persisted. Wayland placement/compositor limits are documented.
Merged origin/main (
083a370773d25e1811c8412d897d91b67a5daad7) as a new merge commit,7e16e0613226a767c9ee366f6558fb0735a64718. Both menu installation and window-state installation/prepare/observe hooks are retained; the documentation index keeps both guides. All five requested local validation commands passed again after the merge. CI is being rerun on this new head before the approved PR merge.Remaining acceptance work:
Approved for merge. Issue #14 remains open pending the remaining native platform verification.
🤖 Generated with Claude Code