Skip to content

fix(ui): pin outer width to prevent recorder window growth under fractional scaling - #60

Open
Miguel Vivar (MiguelVivar) wants to merge 1 commit into
microsoft:mainfrom
MiguelVivar:MiguelVivar/recorder-window-grows-horizontally-without-bound
Open

fix(ui): pin outer width to prevent recorder window growth under fractional scaling#60
Miguel Vivar (MiguelVivar) wants to merge 1 commit into
microsoft:mainfrom
MiguelVivar:MiguelVivar/recorder-window-grows-horizontally-without-bound

Conversation

@MiguelVivar

Copy link
Copy Markdown

Fixes #56

Summary

On Windows with fractional display scaling (e.g. 125%), reading outer size on every resize pass and feeding it back into setSize is lossy due to DIP <-> physical pixel conversions. This causes the recorder window width to grow endlessly on every ResizeObserver callback.

Solution

  • Pin the outer window width on the first fit call using a WeakMap.
  • Pass the pinned width to win.setSize.
  • Add a 2px tolerance threshold (HEIGHT_TOLERANCE) for height settling.
  • Add unit test coverage in
    ecorder-window-sizing.test.ts for fractional display scaling.

…tional scaling

Fixes microsoft#56

On Windows with fractional display scaling (e.g. 125%), reading outer size on every resize pass and feeding it back into setSize is lossy due to DIP <-> physical pixel conversions. This causes the recorder window width to grow endlessly on every ResizeObserver callback.

Pin the outer window width on the first fit call using a WeakMap, pass the pinned width to setSize, and add a 2px tolerance threshold for height settling.
Copilot AI lite review requested due to automatic review settings August 8, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@MiguelVivar

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Microsoft"

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recorder window grows horizontally without bound on fractional display scaling (Windows, 125%)

2 participants