# fix\(web\): repaint resizes synchronously and settle PTY dims after drags · stienswout/t3code

[View on GitCafe](https://git.cafe/stienswout/t3code/commit/3cf380ccaf98c1c9a0192d5f50ca899d58d2f718)

Repository: [stienswout/t3code](https://git.cafe/stienswout/t3code)

Visibility: public

Requested revision: 3cf380ccaf98c1c9a0192d5f50ca899d58d2f718

Requested commit: 3cf380ccaf98c1c9a0192d5f50ca899d58d2f718

Commit: 3cf380ccaf98c1c9a0192d5f50ca899d58d2f718

Tree: 1558f7a29f0c890869a5b47f1cc826c236ca580a

Author: Wout Stiens

Committer: Wout Stiens

## Message

```
fix(web): repaint resizes synchronously and settle PTY dims after drags

Two remaining sources of resize jitter:

- The canvas backing store was resized in a deferred animation frame,
  so every drag step painted one frame with the old backing stretched
  into the new element box before the repaint landed. ResizeObserver
  callbacks run before paint, so fit() now applies the backing size,
  DPR transform, and a full repaint synchronously — the browser never
  composites a stale frame.

- Every row-boundary crossing notified the PTY immediately, making the
  shell reprint its prompt mid-drag. The local Ghostty grid still
  reflows instantly, but the resize RPC now settles 150ms after the
  last change, so applications redraw once for the final size.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

```

## Parents

- [c94e6bf56d51b9bb3bec457a608ea6e65c52826a](https://git.cafe/stienswout/t3code/commit/c94e6bf56d51b9bb3bec457a608ea6e65c52826a?format=markdown)

[Source at this commit](https://git.cafe/stienswout/t3code/tree/3cf380ccaf98c1c9a0192d5f50ca899d58d2f718?format=markdown)
