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:release/0.5.0from
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:release/0.5.0from
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.

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"

@adilei
adilei force-pushed the MiguelVivar/recorder-window-grows-horizontally-without-bound branch from 2096f74 to 0a28c0a Compare August 10, 2026 19:24
@adilei
adilei changed the base branch from main to release/0.5.0 August 10, 2026 19:24
@MiguelVivar
Miguel Vivar (MiguelVivar) force-pushed the MiguelVivar/recorder-window-grows-horizontally-without-bound branch from 0a28c0a to 6c32133 Compare August 13, 2026 17:37
@MiguelVivar

Copy link
Copy Markdown
Author

El bug de crecimiento del recorder bajo escalado fraccional (#56) ya quedó resuelto en release/0.5.0 por #61, que fuerza el ancho de la ventana a la constante RECORDER_WINDOW_WIDTH en cada fit (con sus propios tests cubriendo el caso de escalado fraccional). Al rebasear esta rama sobre la base actualizada, mi fix quedó completamente redundante (diff vacío), así que cierro este PR.

Fixes microsoft#56

Adds a test simulating the Windows DIP <-> physical pixel round-trip
under fractional display scaling, verifying the outer window width
stays bounded across repeated fitRecorderHeight calls.
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