Repository navigation
fix(hud): put the bar back where it was dropped once a popover closes - #1161
Merged
Merged
Conversation
A popover opening near the top of the screen pushes the HUD window down so it fits. Every re-clamp then started from the pushed window, so the bar stayed down after the popover closed, and moved further with each taller popover. The main process now keeps the bar's home, its bottom-centre where a drag or the first resize left it, and places the window from there. A popover still pushes the bar while it is open; closing it brings the bar back. Refs #1136.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Collaborator
Author
|
@coderabbitai review |
Contributor
|
2 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.
Summary
When a popover closes, the HUD bar goes back to where the user dropped it.
hud-overlay-content), andreclampHudpushes the window down until the popover fits. Every later re-clamp started from that pushed window. When the popover closed, the bar was already on screen, so nothing moved it back. Each taller popover pushed it further: 200 → 268 → 380 in the report.hudResizeBounds's newanchorinput. A popover still pushes the bar while it is open, and closing it brings the bar back.hudBarAnchorgives the bar's bottom-centre from any stack rect. The stack is centred and bottom-anchored on the bar, so an open popover does not change that point.Candidate for cherry-pick to release/v2.1.0.
Related issue
Fixes #1136
Type of change
Release impact
Desktop impact
Screenshots / video
None. Nothing was run against a real window: the change is placement math, tested headless. A human check is below.
Testing
electron/hudWindowBounds.test.ts: the report's sequence. The bar is dropped with its top at y 200. The language menu (320 px) pushes it down and closing the menu brings it back to 200. Device settings (470 px) pushes from home and returns there. A bar with room above it does not move.npx tsc --noEmit,npx tsc -p tsconfig.test.json --noEmitand Biome pass.To check by hand (Windows and macOS)
🤖 Generated with Claude Code