Skip to content
This repository was archived by the owner on Oct 17, 2026. It is now read-only.

fix(hud): avoid horizontal scrollbar when recording on Windows - #328

Merged
siddharthvaddem merged 2 commits into
siddharthvaddem:mainfrom
AmirYunus:fix/305-hud-horizontal-scrollbar
May 3, 2026
Merged

siddharthvaddem merged 2 commits into
siddharthvaddem:mainfrom
AmirYunus:fix/305-hud-horizontal-scrollbar

Conversation

@AmirYunus

@AmirYunus AmirYunus commented Apr 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes an unwanted horizontal scrollbar on the recording HUD (the small bottom overlay) on Windows, which appeared after starting a recording when the toolbar widened to show the stop control, timer, and restart button.

The HUD is a fixed 600×160 BrowserWindow (electron/windows.ts). The renderer no longer uses 100vw / 100vh (w-screen / h-screen) for the HUD root. It now uses h-full / w-full with min-w-0, max-w-full, and overflow clipping. The hud-overlay document shell is also pinned to the window via html / body / #root height and hidden overflow so the layout matches the real viewport.

Motivation

Users on Windows 10 with v1.3.0 saw a horizontal scrollbar on the HUD after recording started, even though the overlay should stay within its fixed window. Viewport units and unconstrained overflow produced extra horizontal scroll when the recording controls widened the bar. This change aligns the DOM with the fixed Electron window and removes that overflow.

Type of Change

  • Bug Fix

Related Issue(s)

Fixes #305

Testing

npm run lint
npm test
npx tsc --noEmit

To verify the fix: run the app on Windows, open the HUD, select a source, start recording, and confirm no horizontal scrollbar appears on the HUD overlay.

Checklist

  • I have performed a self-review of my code.
  • I have linked related issue(s).

Summary by CodeRabbit

  • Bug Fixes
    • Resolved HUD overlay layout issues by switching window sizing to be container-relative rather than viewport-based.
    • Suppressed horizontal and vertical scrollbars in HUD overlay mode to prevent visual artifacts.
    • Applied explicit height, margin, and overflow adjustments to ensure overlay windows render correctly within their parent containers.

Use full-size layout and overflow clipping instead of 100vw/100vh on the HUD shell so the fixed 600×160 overlay does not gain a horizontal scrollbar when recording widens the toolbar.

Fixes siddharthvaddem#305
@coderabbitai

coderabbitai Bot commented Apr 4, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The PR adjusts layout and overflow handling for HUD overlays: App sets html/body/#root sizing and overflow when URL-derived type === "hud-overlay", and LaunchWindow changes its root wrapper from viewport-sized classes to container-relative sizing and adds vertical overflow suppression.

Changes

HUD overlay + LaunchWindow layout

Layer / File(s) Summary
DOM / Root style adjustments
src/App.tsx
Adds branch for type === "hud-overlay" that sets document.documentElement and document.body to height: 100%, sets document.body margin: 0, and forces overflow: hidden on html and body; updates #root to height: 100%, min-height: 0, and overflow: hidden.
Component wrapper sizing
src/components/launch/LaunchWindow.tsx
Replaces root wrapper classes from w-screen h-screen overflow-x-hidden to h-full w-full min-w-0 max-w-full overflow-x-hidden overflow-y-hidden, keeping bg-transparent and styles.electronDrag.
Behavioral intent / visuals
(same files)
Changes ensure the LaunchWindow fills its HUD parent rather than the viewport and suppresses scrollbars on both axes for overlay usage.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • FabLrc
  • siddharthvaddem

Poem

late-night devs whisper, css on the mend,
html and body now nicely penned,
the hud tucks in, no scrollbar dance,
launch window fits — a layout romance,
🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly summarizes the main bug fix: removing horizontal scrollbar on HUD during recording on Windows.
Description check ✅ Passed Description covers all template sections including motivation, type of change, related issue, testing steps, and checklist completion.
Linked Issues check ✅ Passed Changes directly address issue #305 by eliminating viewport units and constraining overflow to prevent horizontal scrollbar on Windows HUD.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the HUD scrollbar issue; no unrelated modifications or feature creep detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

@RutsuKun

Copy link
Copy Markdown

There's a issue with this on macOS too
image

@FabLrc

FabLrc commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

Hey @AmirYunus ,
Thank for your PR ! Can you please resolve the conflicts ? A fix has been merged #357 but seem to be only a partial fix for the problem; your fix goes further.
I'll review it when it's done.

Resolved conflicts in src/App.tsx and src/components/launch/LaunchWindow.tsx:
- App.tsx: kept main's split useEffect for loadAllCustomFonts; placed PR's
  HUD-overlay style block inside the original [windowType] effect.
- LaunchWindow.tsx: kept main's systemLocaleSuggestion modal in place of the
  earlier inline language switcher; preserved PR's root-div className change
  that fixes the Windows horizontal-scrollbar bug.
@siddharthvaddem
siddharthvaddem self-requested a review as a code owner May 3, 2026 06:21
@siddharthvaddem
siddharthvaddem merged commit 876378b into siddharthvaddem:main May 3, 2026
4 of 8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: horizontal scroll bar appears on the screen

4 participants