Repository navigation
fix(window): prevent z-index occlusion during minimize/restore flights - #916
Open
KarunyaChavan wants to merge 5 commits into
Open
KarunyaChavan wants to merge 5 commits into
KarunyaChavan wants to merge 5 commits into
Conversation
- When multiple windows are open, minimizing a window triggers focus() on the next visible window synchronously while the WAAPI genie animation is in flight. - This restacks z-indices and places the minimizing window behind the newly focused window mid-flight. - Guard setZIndex() while 'os-window--minimizing' is active so the animating window remains on top throughout its flight path to the dock.
…ght CSS token Refactor the z-index occlusion fix from a procedural guard inside Window.setZIndex() into a declarative CSS token and class: - Remove the `os-window--minimizing` class check from setZIndex(), keeping the method pure. - Declare `--os-z-genie: 199` in variables.css and style `.os-window--genie-flight` in window-states.css to manage flight layer elevation purely in CSS. - Toggle `.os-window--genie-flight` across both minimize and restore WAAPI animation lifecycles.
KarunyaChavan
marked this pull request as ready for review
September 28, 2026 13:04
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 #906
This PR fixes an issue where the genie minimize/restore animation cuts off abruptly and gets hidden behind other windows when multiple windows are open on the desktop.
Why?
Mid-Flight Restacking Occlusion:
z-indexof all windows on the desktop.z-index, causing the flying window to be obscured behind background windows before it could complete its flight path down to the dock.Declarative Stacking Hierarchy:
100–120) and directly underneath the dock (200) throughout the entire flight lifecycle without adding procedural branching tosetZIndex().What Changed?
--os-z-genieDesign Token (assets/css/variables.css):--os-z-genie: 199;underbody.os-activeto establish a formal stacking layer for in-flight animations directly below the dock (200)..os-window--genie-flightRule (assets/css/window-states.css):.os-window--genie-flight { z-index: var( --os-z-genie, 199 ) !important; }to handle flight layer elevation declaratively via CSS.src/window/index.ts):.os-window--genie-flightat the start of bothminimize()andrestore()flights..os-window--genie-flightis stripped cleanly across all completion (onfinish), cancellation (oncancel,_cancelGenieAnimation), and early return paths.Window.prototype.setZIndex()pure and unblocked.Steps for Testing
-) button.npm run typecheck,npm run lint, andnpm run test:jsto verify that all type checks, lint rules, and test suites pass.