Store a resize on release and settle its position a frame later (#231)

* Store a resize when it is released, not a frame later

A resize waited one frame after release before storing, so the final
size was laid out. A page switch inside that frame could land the
resize on the next page's copy of the item, which keeps the same id.

Pointer events arrive between frames, and a frame builds and lays out
together. So on release the box on screen always matches the size it
was last built at. Storing that size with the rendered box makes the
commit synchronous and exact. A final move the frame never drew is
dropped, so the box stays where the user last saw it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Keep a quick resize's last movement and write only to its own item

Storing the size last drawn at release dropped movement that arrived
after the last frame: a quick drag could be lost entirely. Go back to
storing the final size one frame after release, when it is laid out.
Write it only if the text or image being resized is still loaded. A page
switch in that frame loads the next page's copy, which keeps the same
id, so the resize can no longer land on it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Store a resize's size on release and settle its position a frame later

With the write deferred a frame, a page save right after release still
read the old size, and the page switch then replaced the item, so the
resize was lost. Store the size, and a position from the current
layout, as soon as the handle is released. Hold the pin one more frame,
then store the position again if the final layout moved it, only while
the same item is still loaded. Normally that second write finds nothing
to change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0491d518b7Dara Adedeji committed on 9/29/2026, 6:43:19 AM· committed by GitHubparent4bb0050
3 files changedLine totals unavailable