Files
photocraft/crates
FinnNkandClaude Opus 5.5 2cd1bd8664 fix(ui): cap text fields and oversized text events (#8722)
* fix(ui): cap text fields and oversized text events

Plain text fields took any amount of text, so pasting a huge string grew
the string (and its laid-out galley) without bound; #2258 fixed this for
numeric fields only. The shared text_field now holds at most 1024
characters unless its caller sets a limit, and the app cuts every text,
paste and IME event to 1 MiB of characters (at a character boundary)
before any widget sees it, so the dozens of hand-built TextEdits are
bounded too.

Part of #2150

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ui): bound oversized existing text and synthetic text events

A text_field whose value is already past its limit lays out a bounded
copy and writes it back only on an edit; the text-event cap runs after
the control channel's synthetic events join the input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ui): raw_input_hook caps text the control channel queues

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:41:14 -04:00
..
…