Force proportional windowed initial size for Zed; shrink Chrome MCP viewport - #2300
Merged
Merged
Conversation
…iewport
Upstream Zed commit a0d0195ca9 ("Add onboarding for parallel agents",
PR #52940, 2026-04-07) bumped DEFAULT_WINDOW_SIZE from 1536x864 to
1536x1095. That commit landed in the Helix Zed fork via the 001864 merge
on 2026-04-24, and CI built the new binary the same day.
On a 1920x1080 virtual monitor, default_bounds() clips the new value to
1536x1080 — exactly the work-area height — which trips Mutter's
auto-maximize=true and the user sees a fullscreen Zed instead of the
centered floating window they used to see.
Fix part 1: set ZED_WINDOW_SIZE / ZED_WINDOW_POSITION env vars in the
Ubuntu Zed launcher, sized to 80% of the logical work area (logical =
GAMESCOPE_WIDTH/HEIGHT divided by GDK_SCALE) with a 10% margin on each
side. Zed wraps env-var bounds as WindowBounds::Windowed so the
auto-maximize path is skipped entirely. The formula lands on 1536x864 at
1920x1080/100% — the exact size Zed defaulted to before a0d0195ca9 — and
scales proportionally to 4K, 5K, and HiDPI sessions.
Fix part 2: shrink the chrome-devtools MCP viewport from 1600x1080 to
1280x800. The 1600x1080 chosen in task 001532 produced a ~1600x1160
Chrome window (page + decorations) that also tripped Mutter's
auto-maximize. 1280 is the canonical desktop-vs-mobile breakpoint, so
sites still render in desktop mode, and the resulting window fits
comfortably on every supported display.
Sway desktop is unaffected — its tiling behaviour is a separate dynamic
and the Sway launcher is not changed.
Spec-Ref: helix-specs:001916_why-do-the-zed-windows
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.
Summary
Zed has been launching maximised in every new spectask on the Ubuntu/GNOME desktop, and unmaximising it leaves a window taller than the streamed viewport. Root cause: upstream Zed commit
a0d0195ca9("Add onboarding for parallel agents", 2026-04-07) bumpedDEFAULT_WINDOW_SIZEfrom1536×864to1536×1095. That commit landed in the Helix Zed fork via the 001864 merge on 2026-04-24. On a 1920×1080 virtual monitordefault_bounds()clips the new value to1536×1080— exactly the work-area height — which trips Mutter'sauto-maximize=trueand the user sees a fullscreen Zed.Coincidentally, the chrome-devtools MCP
--viewport 1600x1080set in task 001532 produced a ~1600×1160 Chrome window that also tripped the same auto-maximise threshold; shrinking it is a one-line follow-on that gets Chrome out of the same trap.Changes
desktop/ubuntu-config/start-zed-helix.sh: exportZED_WINDOW_SIZEandZED_WINDOW_POSITIONcomputed dynamically as 80% ofGAMESCOPE_WIDTH/HEIGHTdivided byGDK_SCALE, with a 10% margin on each side. Zed wraps env-var bounds asWindowBounds::Windowed, which skips the auto-maximise path entirely. Formula lands on1536×864at 1920×1080/100% — exactly the dimensions Zed defaulted to beforea0d0195ca9— and scales proportionally to 4K (3072×1728), 5K (2048×1152 at 200% zoom), etc.api/pkg/external-agent/zed_config.go: shrink the chrome-devtools MCP viewport from1600x1080to1280x800.1280is the canonical desktop-vs-mobile breakpoint, so sites still render in desktop mode, and the resulting Chrome window leaves a wide margin on a 1920×1080 monitor.The Sway desktop is untouched — its tiling behaviour is a different dynamic and out of scope for this task.
Test plan
GAMESCOPE_WIDTH=3840 GAMESCOPE_HEIGHT=2160: Zed scales to ~3072×1728 centredHELIX_ZOOM_LEVEL=200: Zed at the scaled logical sizeSpec:
helix-specs:001916_why-do-the-zed-windows🔗 Open in Helix
📋 Spec:
🚀 Built with Helix