Skip to content

fix(preview): preview viewport resize before applying - #893

Merged
nixuuu merged 1 commit into
devfrom
feat/resize-preview-commit
Nov 16, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/resize-preview-commit

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 16, 2026

Copy link
Copy Markdown
Member

Change

Dragging a browser viewport handle previously resized the remote browser every 120 ms, making it difficult to match a visible rectangle. Dragging now shows a local outline and target dimensions while the live image keeps its size; releasing sends one resize. This works when shrinking or expanding from all four edges.

Thin, muted handles sit outside the image. The outline lives outside the scroll surface so it cannot introduce scrollbars or change the image scale. Escape, window blur, pointer cancellation and lost capture discard the draft. Keyboard resizing remains available. Updated the automation tools documentation and implementation status.

Fixes: #872

Verification

  • Web typecheck: 0 errors and 0 warnings.
  • Lint and formatting of both changed Svelte files; diff whitespace check passed.
  • Agent Browser with the real Preview component in an isolated local harness: exercised synthetic pointer gestures for shrinking and expanding each edge, verified no resize during the gesture, unchanged canvas geometry and exactly one resize on release. Verified all four cancellation paths.
  • Visually checked light and dark themes on desktop and at 390 px phone width; checked 320 px wrapping and actual-size scrolling without handle overlap on the toolbar. Screenshots reviewed by the user.
  • Full repository checks and builds remain with CI. No persistent UI test suite added, per repository policy.

Copy audit (§8): passed for the new “Release to apply · Esc to cancel” hint. Previously there was no drag guidance; the hint explains when the size applies and how to cancel. Labels remain unchanged. Sentence case, plain language, glossary, accessibility, duplication and narrow-width checks passed; error, empty-state and humour checks are not applicable.

Keep the live image stationary while dragging and send one resize on release.
Move thin handles outside the image and isolate the draft outline from scrolling.

Fixes: #872
@nixuuu
nixuuu enabled auto-merge (squash) November 16, 2026 21:11
@nixuuu
nixuuu merged commit 2ec2040 into dev Nov 16, 2026
15 checks passed
@nixuuu
nixuuu deleted the feat/resize-preview-commit branch November 16, 2026 21:17
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.

1 participant