Repository navigation
fix(window): honor configured startup dimensions in the GPUI product - #377
Merged
Merged
Conversation
The default shell had no reader for `config.window.*`, so `pebrel config check` accepted a window size the GUI then ignored: every start used the built-in 116x30 canvas regardless of the user's file. Read the grid once during shell init through the same discovery and parse entry points `pebrel config check` uses, so Lua, TOML and YAML all work and precedence matches the rest of the app. It stays a grid rather than pixels: the existing sizing path multiplies it by the cell it measures in the window's own scale domain, which keeps 155x43 correct at 125% scaling. `config.window.position` is deliberately not wired here. gpui accepts placement only at window creation, in logical pixels, and exposes no app-level scale factor, while the legacy shell hands winit a physical position; passing the raw numbers through would place the window a fifth of the screen off at exactly the scaling the report uses. Refs #312
…w/pr313-20260930 # Conflicts: # nebula_app/src/gpui_shell/mod.rs
4 tasks done
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.
Integrates the reviewed startup-size implementation from #313 and addresses the dimensions portion of #312.
The GPUI product now reads
config.window.dimensionsonce through the same Lua/TOML/YAML discovery and parser used bypebrel config check, including an explicitly selected--config-file. The measured font cell determines the initial grid and native window size; unset values retain the existing canvas, and the display bounds still constrain oversized requests. Startup parsing stays separate from settings reloads so saving a preference does not re-evaluate user Lua.The integration preserves the original contributor commits and the current native Agent lifecycle, open-directory/reopen handlers and first-frame sizing. Discovery failures now produce a diagnostic instead of being silently ignored.
Validation: startup parsing/grid regressions from #313 retained; formatting, base-relative architecture and platform-condition checks passed locally. The final integration commit passed every required check, all five native platforms, and both macOS release compilations. Windows 125% visual acceptance has not been performed here.
config.window.positionis still outside this change. The legacy value denotes physical window placement, while the pinned GPUI Windows backend converts client bounds and native frame offsets; passing the raw value as logical coordinates would be incorrect. Keep #312 open for that remaining part. Use a merge commit to preserve #313's ancestry.Final validated commit:
af06891a7c0df5bc66a4a85b01c102217e62f5e6. Native CI.