fix(linux): resolve HUD overlay restricted width and popover clipping… - #799
fix(linux): resolve HUD overlay restricted width and popover clipping…#799sahilcodexx wants to merge 3 commits into
Conversation
… on Hyprland/Wayland
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughHUD overlay bounds now use the full work area on Linux and when mouse passthrough is unsupported. Non-passthrough dimensions increase. Launch bar width is constrained to its containing block. ChangesHUD overlay bounds
Launch bar width
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant HUDBounds
participant Platform
participant WorkArea
HUDBounds->>Platform: Check platform and passthrough support
Platform->>WorkArea: Provide complete work area
HUDBounds->>WorkArea: Return full bounds on Linux
HUDBounds->>HUDBounds: Calculate expanded fallback bounds on non-Linux
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@electron/hudOverlayBounds.test.ts`:
- Around line 25-35: Make the overlay bounds tests platform-specific: in
electron/hudOverlayBounds.test.ts:25-35, mock Linux before asserting full
work-area results from getHudOverlayWindowBounds, while retaining non-Linux
assertions for constrained fallback geometry; in
electron/hudOverlayBounds.test.ts:47-89, mock Linux before full-work-area resize
assertions and retain non-Linux compact and expanded fallback resize
expectations.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 849561c1-52c3-430d-9b26-28063bacf15d
📒 Files selected for processing (4)
electron/hudOverlayBounds.test.tselectron/hudOverlayBounds.tselectron/windows.tssrc/components/launch/LaunchWindow.module.css
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@electron/hudOverlayBounds.test.ts`:
- Around line 25-27: Replace the invalid process.platform getter spies in
getHudOverlayWindowBounds tests with a data-property override and restore
mechanism. Apply this to electron/hudOverlayBounds.test.ts at lines 25-27,
30-32, 40-42, 50-52, 70-72, 104-106, 120-122, 141-143, and 162-164, covering the
linux and win32 cases while restoring the original platform value after each
test.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c08e9fe8-d4c0-4a9f-a881-97d4c6867454
📒 Files selected for processing (1)
electron/hudOverlayBounds.test.ts
…y override helper
Pull Request Template
Description
This PR resolves an issue on Linux environments (specifically tiling Wayland compositors like Hyprland/Sway and X11 desktop managers) where the floating recording HUD overlay was constrained by artificial window bounds, causing:
160pxheight.860px/1200px), preventing full display utilization.Technical Root Cause
electron/windows.ts, an explicitif (process.platform !== "linux")check was skippingsetHudOverlayFallbackExpanded(!ignore)when mouse events arrived. This meant that when users hovered over the HUD bar or opened a popover menu on Linux, the window bounds were never expanded from160pxcompact height to the expanded height.electron/hudOverlayBounds.ts,getHudOverlayWindowBoundswas returning partial fallback dimensions instead of utilizing full display work area bounds ({ ...workArea }) for Linux transparent windows.Changes Implemented
getHudOverlayWindowBoundsandresizeHudOverlayFallbackBoundsinelectron/hudOverlayBounds.tsto return full work area bounds ({ ...workArea }) on Linux, allowing transparent click-through windows to span the full screen seamlessly.if (process.platform !== "linux")guard inelectron/windows.ts, allowingsetHudOverlayFallbackExpanded(!ignore)to trigger when popovers open or when mouse hover starts on Linux..barinsrc/components/launch/LaunchWindow.module.cssfrommax-width: 1200pxtomax-width: 100%so the HUD bar scales fluidly without hardcoded CSS limits.Motivation
On Linux Wayland compositors (such as Hyprland), opening any menu card or settings popover from the recording HUD resulted in severely truncated options (e.g. Language options were cut off at the top edge of the 160px window). This fix ensures that Linux users enjoy the exact same unconstrained, premium floating HUD experience as users on macOS and Windows.
Type of Change
Related Issue(s)
N/A
Screenshots
Before

After

Testing Guide
npx tsc --noEmitto verify zero TypeScript errors.npm run testto verify all 106 test suites (996 tests) pass.npx vitest run electron/hudOverlayBounds.test.tsto test HUD overlay bounds logic specifically.npm run dev.Checklist
Thank you for contributing!
Summary by CodeRabbit
New Features
Bug Fixes