fix(linux): stabilize Wayland HUD and Lightning export - #985
yashovardhanpareek wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughChangesThe HUD overlay now detects Wayland sessions and uses expanded static bounds when mouse passthrough is unavailable. The video exporter now forwards the configured render backend or its default. HUD overlay Wayland handling
Video renderer backend routing
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The Wayland HUD sizing and renderer-backend forwarding changes have focused coverage, with no remaining concrete merge risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Summary
On Linux, the recording HUD fallback window is only
860x160. Radix menus and popovers render inside that window, so controls near the bottom are clipped by the BrowserWindow boundary. The existing HUD expansion path is disabled on Linux, while dynamically resizing/repositioning a transparent always-on-top window is unreliable on Wayland and can oscillate.This change detects a Wayland session and starts the Linux fallback HUD at the already-established expanded size (
860x540). X11 remains at the compact fallback size, and Windows/macOS behavior is unchanged.The patch also extracts the geometry decision into a small pure helper and adds coverage for Wayland, X11, Windows, and macOS behavior.
It also fixes Lightning exports failing before the first rendered frame with
Cannot read properties of undefined (reading '_resourceType'). Although the backend policy declares WebGL as Lightning's stable default,ModernVideoExporterdiscarded the configured/default preference and allowed Pixi to select WebGPU automatically. The exporter now applies the existing stable WebGL default while continuing to honor an explicit WebGPU override.Verification
npx vitest --run electron/hudOverlayBounds.test.ts electron/hudOverlaySession.test.ts— 20 tests passednpm test— 134 test files and 1,193 tests passednpx tsc --noEmit— passed860x540; webcam popover top311, bottom436, fully within the viewportCamera capture itself was not exercised in the sandbox; the regression being verified here is window/popover geometry.
The export regression is verified at the renderer-routing boundary and by the full suite; a complete real-media export was not run in the sandbox.
Scope and tradeoff
This is intentionally Wayland-only. Linux transparent-window mouse passthrough remains limited (see #861), so the larger transparent surface can intercept clicks in its bounds. The change prioritizes usable, unclipped controls and avoids the resize/position feedback behavior reported for Wayland. X11 keeps the existing compact behavior.
Related work
Those proposals explore dynamic resizing or broader Linux changes. This PR is a minimal current-
mainfix that applies static expanded geometry only where Wayland needs it, preserving existing behavior elsewhere.Summary by CodeRabbit
Bug Fixes
Tests