fix(recording): compact HUD fallback on Windows 10#584
Conversation
|
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 (4)
📝 WalkthroughWalkthroughAdds HUD overlay bounds calculation and a resize helper used when mouse passthrough is unavailable. getHudOverlayWindowBounds returns the full work area when passthrough is supported or a centered, bottom-aligned fallback (compact or expanded) when not. Integration adds fallback-expanded state, UI drag-mode changes, and tests. ChangesHUD Overlay Bounds and Fallback Behavior
Sequence DiagramsequenceDiagram
participant App as App / Display change
participant Bounds as getHudOverlayWindowBounds
participant Resize as resizeHudOverlayFallbackBounds
participant Windows as electron/windows
participant UI as LaunchWindow (useNativeHudBarDrag)
App->>Bounds: compute bounds(workArea, passthroughFlag, fallbackExpanded)
alt passthrough supported
Bounds-->>App: return workArea
else passthrough unavailable
Bounds-->>App: return centered, bottom-aligned fallback (compact|expanded)
end
Windows->>Resize: resize(currentBounds, fallbackExpanded)
Resize->>Bounds: request fallback bounds(workArea,false,fallbackExpanded)
Resize-->>Windows: return clamped next bounds
Windows-->>UI: expose passthrough state -> UI sets useNativeHudBarDrag accordingly
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/windows.ts`:
- Around line 246-260: The code currently recomputes full fallback bounds from
getHudOverlayBounds() on each ignore-mouse transition and snaps any user-dragged
fallback position back to the default; modify setHudOverlayFallbackExpanded to
preserve the dragged origin by using the existing window bounds when present
(e.g. call hudOverlayWindow.getBounds() and reuse its x/y when building the new
bounds or store a persisted hudFallbackDraggedOrigin when the user moves the
window and feed that into getHudOverlayBounds), then call
hudOverlayWindow.setBounds with the preserved x/y and the new width/height;
apply the same preservation logic to the similar code path referenced around the
other block that also calls getHudOverlayBounds()/setBounds so drags are not
lost on expand/collapse.
In `@src/components/launch/LaunchWindow.tsx`:
- Around line 429-431: The predicate that sets useNativeHudBarDrag incorrectly
includes !showRecordingWebcamPreview, causing the Win10 non-passthrough fallback
to use the JS drag path when the webcam preview is visible; remove the
showRecordingWebcamPreview check so useNativeHudBarDrag is driven only by
platform and hudOverlayMousePassthroughSupported (i.e., compute
useNativeHudBarDrag from (platform === "linux" ||
hudOverlayMousePassthroughSupported === false)); apply the same change to the
other identical predicate that references useNativeHudBarDrag /
hudOverlayMousePassthroughSupported near the second occurrence.
🪄 Autofix (Beta)
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: db9a6038-6286-4599-b3e0-f490ca9f856e
📒 Files selected for processing (4)
electron/hudOverlayBounds.test.tselectron/hudOverlayBounds.tselectron/windows.tssrc/components/launch/LaunchWindow.tsx
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Description
Constrain the recorder HUD fallback window on platforms where Electron mouse passthrough is unavailable, especially Windows 10.
Instead of keeping a full-work-area transparent HUD window that must remain mouse-interactive, the fallback now uses:
Motivation
Issue #581 reports that on Windows 10 / Recordly 1.3.0 the recorder HUD blocks click and scroll behind Recordly after recording starts, and one reporter also no longer sees the countdown after updating. Current
maindisables HUD mouse passthrough for Windows builds below 22000, but still creates a full-work-area transparent overlay. That means the fallback can swallow the whole screen.Type of Change
Related Issue(s)
Changes Made
getHudOverlayWindowBoundshelper for full, compact fallback, and expanded fallback bounds.hud-overlay-set-ignore-mousesignal to expand the fallback only when the HUD needs interaction.Scope Note
This PR only targets the Windows 10/non-passthrough HUD input blocker. It does not change export routing, WGC capture startup, NVIDIA export, or the timeline speed-overlap report from #581.
Testing Guide
On Windows 10:
Checklist
Local Checks
npm test -- electron/hudOverlayBounds.test.ts src/components/launch/hudMousePassthrough.test.ts src/components/launch/floatingWebcamPreview.test.tsnpx tsc --noEmit --pretty falsenpx biome check --formatter-enabled=false electron/hudOverlayBounds.ts electron/hudOverlayBounds.test.ts electron/windows.ts src/components/launch/LaunchWindow.tsxgit diff --checkSummary by CodeRabbit
New Features
Tests