Skip to content

fix: floating HUD bar blocks interactions, can't be repositioned, and disappears during recording#730

Open
sandeepannandi wants to merge 4 commits into
webadderallorg:mainfrom
sandeepannandi:fix/hud-bar-position-interaction
Open

fix: floating HUD bar blocks interactions, can't be repositioned, and disappears during recording#730
sandeepannandi wants to merge 4 commits into
webadderallorg:mainfrom
sandeepannandi:fix/hud-bar-position-interaction

Conversation

@sandeepannandi

@sandeepannandi sandeepannandi commented Jul 7, 2026

Copy link
Copy Markdown

Description

Fixes issue #728 three related HUD overlay bar bugs:

  1. Disappears during recording – If the user drags the bar to the top before recording, the CSS translate3d offset carried over into the compact recording window, pushing the bar content far off-screen and making controls inaccessible.

  2. Cannot be moved freely – During recording the window uses a compact layout but relied on JS-based CSS transform dragging, which only translated content within the window rather than moving the window itself.

  3. Blocks nearby interactionssetHudOverlayMousePassthrough() called applyHudOverlayBounds() redundantly on recording start, causing a double-bounds-set that could briefly leave the full-screen window interactive before shrinking it.

  4. No dock/taskbar presence – The HUD window had skipTaskbar: true permanently, making it impossible to find without Alt+Tab or Mission Control.

Changes

  • electron/windows.ts – Removed redundant applyHudOverlayBounds() in the recording branch of setHudOverlayMousePassthrough(). Added setSkipTaskbar(false) during recording so the window appears in the dock/taskbar.

  • src/components/launch/hooks/useHudBarDrag.ts – Added a recording prop. When recording starts, the drag offset is reset to (0,0) so any pre-recording position doesn't push the bar off-screen.

  • src/components/launch/LaunchWindow.tsx – Passed recording to the drag hook. Enabled native OS window dragging (-webkit-app-region: drag) on the compact recording window so the user can freely reposition the bar.

Testing

  • Start recording → bar appears as compact floating window at the bottom
  • Drag the bar by its handle → window moves with the cursor
  • Move the bar to the top before recording, then start recording → bar stays visible
  • Bar is visible in the taskbar/dock during recording
  • Stop recording → HUD returns to full-screen passthrough mode

Summary by CodeRabbit

  • Bug Fixes
    • Improved HUD overlay recording behavior, including more consistent mouse handling and preventing unintended HUD overlay shifts.
    • Updated the launch HUD bar drag/reset logic so the HUD bar position is recalibrated correctly while recording.
    • HUD overlay taskbar visibility now automatically tracks recording status.
  • Chores
    • Cleaned up .gitignore by removing outdated ignore rules.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 21448f1d-9f0d-4d2a-8945-d1473ed36e57

📥 Commits

Reviewing files that changed from the base of the PR and between 953d5ab and 04d30c1.

📒 Files selected for processing (2)
  • electron/windows.ts
  • src/components/launch/hooks/useHudBarDrag.ts
💤 Files with no reviewable changes (2)
  • src/components/launch/hooks/useHudBarDrag.ts
  • electron/windows.ts

📝 Walkthrough

Walkthrough

Electron HUD overlay behavior now forces interactive mode while recording and updates taskbar visibility from recording state. The launch HUD bar drag hook now accepts recording input, resets its offset and transform when recording starts, and the native drag path includes recording.

Changes

HUD recording behavior updates

Layer / File(s) Summary
Electron HUD overlay recording state handling
electron/windows.ts
The recording-active branch of the mouse-passthrough setter now directly disables mouse-event ignoring and returns early; the recording-active setter also toggles hudOverlayWindow.setSkipTaskbar based on recording state.
HUD bar drag reset and native drag path during recording
src/components/launch/hooks/useHudBarDrag.ts, src/components/launch/LaunchWindow.tsx
useHudBarDrag gains a recording prop and a new effect that resets the HUD offset and transform to origin when recording starts; LaunchWindow passes recording into the hook and extends the native drag condition to include recording.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant LaunchWindow
  participant useHudBarDrag
  participant HudBarElement
  LaunchWindow->>useHudBarDrag: recording
  useHudBarDrag->>HudBarElement: reset offset and set translate3d(0px, 0px, 0)
  LaunchWindow->>LaunchWindow: enable native HUD drag when recording
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main HUD overlay recording fixes and is concise.
Description check ✅ Passed The description covers the problem, changes, and testing, but omits template sections like Motivation, Type of Change, and Screenshots/Video.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sandeepannandi sandeepannandi force-pushed the fix/hud-bar-position-interaction branch from 720c092 to 953d5ab Compare July 7, 2026 15:16
@sandeepannandi sandeepannandi force-pushed the fix/hud-bar-position-interaction branch from 953d5ab to 04d30c1 Compare July 7, 2026 15:19
@mantertius

Copy link
Copy Markdown

up! if i click just once the click will be captured by the app but not the website i'm filming...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants