Fix active window offscreen overflow and reflow at high zoom - #766
Open
Pranjal1423 wants to merge 1 commit into
Open
Fix active window offscreen overflow and reflow at high zoom #766Pranjal1423 wants to merge 1 commit into
Pranjal1423 wants to merge 1 commit into
Conversation
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.
Closes #556
This PR resolves the issue where zooming the browser to 400% on compact/mobile viewports left the active window almost entirely offscreen with title bars, action buttons, and content out of reach while the dock obscured the visible area.
Root Cause
clampGeometryToViewportinsrc/boot/geometry.tsenforced an artificial200pxminimum floor onmaxWandmaxH, preventing windows from shrinking down to constrained work areas (such as ~97px at 400% zoom).WindowManagerdid not subscribe to work-area changes to reflow floating windows when zoom level or viewport dimensions changed.clampWindowPositionand rigid dock sizing on compact screens pushed windows and occupied excessive vertical height.Changes
src/boot/geometry.ts: Removed the rigid200pxfloor inclampGeometryToViewportto dynamically bound dimensions within available work-area insets.src/window-manager/index.ts: SubscribedWindowManagertosubscribeWorkArea()to dynamically re-clamp floating windows on zoom/resize, and adapt default/unpinned dimensions on small viewports.src/window/pointer.ts: Dynamically scaled grab margins inclampWindowPosition()so narrow screens do not push windows offscreen.assets/css/dock.css: Added@media (max-width: 480px), (max-height: 400px)rules to scale dock tile icons and padding compactly at high zoom.src/release-card.ts: Constrained.dm-release-cardmax-dimensions with scrollable overflow so action buttons stay reachable at high zoom.tests/vitest/high-zoom-window-clamp.test.ts: Added automated unit tests verifying high zoom clamping, position boundaries, and work area shrink reflow.Automated Test Results (Before vs After Fix)
Before the Fix (Failures due to rigid 200px floor & missing reflow)
After the Fix (All tests passing)