Skip to content

fix: stop a fitted remote display from resizing in a loop - #64

Merged
LukeGus merged 1 commit into
Termix-SSH:dev-1.4.2from
ZacharyZcR:fix/rdp-resize-loop
Nov 16, 2026
Merged

LukeGus merged 1 commit into
Termix-SSH:dev-1.4.2from
ZacharyZcR:fix/rdp-resize-loop

Conversation

@ZacharyZcR

Copy link
Copy Markdown
Member

Fixes #51: since Termix 26.11.1, an RDP session at 100% zoom with automatic resolution keeps growing and shrinking. 75% and 125% are stable.

The display container (absolute inset-0 overflow-auto) scrolled at every zoom. At 100% the display is fitted to the container edge (fitScale = min(cWidth / w, cHeight / h)), so one pixel of rounding or extra height from the page's styles makes it overflow. The loop:

  1. the display overflows by a pixel, so a scrollbar appears
  2. the scrollbar shrinks clientWidth, so the resize observer refits the display smaller
  3. now it fits, so the scrollbar goes away and the container grows back
  4. the refit makes it touch the edge again, back to 1

isSmallChange (#12) only stops resending the size to the server. This loop is the local refit, which is why the Reconnect resize method doesn't help. Below 100% the display stays clear of the edge, and above it it always overflows, so neither flips. A fixed resolution is stable for the same reason.

The container now scrolls only when the zoom is past the fit (zoom > 1). That is the only case with anything to scroll to. applyZoom sets it, so the toolbar zoom, pinch zoom and refits all go through the same place. The container starts as overflow-hidden.

Validation: a new test zooms in and back out through the display handle and checks the container scrolls only while zoomed in. It fails before the change. All 575 plugin tests (1 skipped), typecheck, build, manifest validation and prettier pass. Not reproduced in a browser here; the loop needs the real layout.

@termix-triage-bot

termix-triage-bot Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

AI review | Looks safe to merge

The PR fixes a UI resize loop at 100% zoom by conditionally setting container overflow to hidden when not zoomed in, and adds a test to verify the behavior. No security, malware, or bug issues found.

Reviewed 5abc681. AI can be wrong, a maintainer still decides. Comment /termix review to run it again.

@termix-ci
termix-ci Bot deleted the branch Termix-SSH:dev-1.4.1 November 15, 2026 19:35
The display container scrolled at every zoom. Fitted to the container at
100%, a pixel of rounding made the display overflow, the scrollbar that
appeared shrank the container, the display was refitted smaller, the
scrollbar went away and the cycle started again. 75% and 125% were stable
because the display stays clear of the edge or always overflows.

The container now scrolls only when the display is zoomed in past the fit,
which is when there is something to scroll to.

Fixes Termix-SSH#51
@ZacharyZcR
ZacharyZcR changed the base branch from dev-1.4.1 to dev-1.4.2 November 16, 2026 13:25

@LukeGus LukeGus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@LukeGus
LukeGus merged commit d3655ad into Termix-SSH:dev-1.4.2 Nov 16, 2026
4 checks passed
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.

2 participants