Fix window management and dock state leaking across virtual desktops - #318
Merged
AllTerrainDeveloper merged 4 commits intoJul 8, 2026
Conversation
- Add `getAllByBaseIdOnActiveDesktop` and `isActiveByBaseId` to WindowManager. - Filter `minimizeAll`, `restoreFrom`, and `toggleShowDesktop` to the active desktop. - Update Dock hover peek to only show instances from the current desktop. - Update Vitest mocks to satisfy the new active-desktop methods.
- Check for any active bin window by base ID instead of exact target ID. - Attach lifecycle listeners to all bin instances, not just the first one. - Prevent the dock badge from hiding when looking at a bin on another desktop.
KarunyaChavan
marked this pull request as ready for review
July 6, 2026 13:54
Collaborator
|
Again, thank you for your contributions @KarunyaChavan! We will test and release those changes too! |
Collaborator
|
I have updated the docs and added new tests :) |
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 #316
This PR fixes cross-desktop state leakage where window management operations, dock hover previews, and app badges were incorrectly applying to windows located on non-active virtual desktops (Spaces).
What has Changed?
winDesktop === activeDesktopIdguard checks to core methods (isActive,minimizeAll,restoreFrom,toggleShowDesktop).getAllByBaseIdOnActiveDesktop()andisActiveByBaseId()helper methods toWindowManager.getInstancesdata source to use the newgetAllByBaseIdOnActiveDesktop()method.isBinWindowActiveto use the newisActiveByBaseId()method.vitestmocks indock-badge.test.tsanddock-peek-instance-fanout.test.tsto support the newWindowManagermethods.Why?
Previously, the framework assumed that multi-instance window collections returned by
getAllByBaseId()and directgetById()checks were valid across all virtual desktops.This assumption breaks down in a multi-desktop environment.
Examples of the resulting issues:
How it fixes
The fix scopes window state queries and window management operations to the currently active virtual desktop.
isActiveByBaseId(). This prevents the badge from being hidden due to windows on other desktops.toggleShowDesktop,minimizeAll, and related window state changes now affect only windows on the active desktop, preserving the state of windows on other virtual desktops.