Files
hyperframes/packages
Vance IngallsandClaude Opus 4.8 5dcd168a28 perf(sdk): cache draft element in applyDraft, drop HTMLElement casts (R1 #1490a)
applyDraft runs at 60fps during a drag but re-ran doc.querySelector on every
call — the _draftEl/_draftId fields were only consumed by commit/cancel, never
to skip the query. Reuse the tracked element when the id matches and the node
is still connected; re-query only on id change or detach (iframe reload).

Retypes _draftEl to HTMLElement | null (only ever set from
querySelector<HTMLElement>), which removes the `as HTMLElement` casts in
commitPreview / _clearDraft. Test asserts a repeated same-id drag queries once.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 14:55:41 -07:00
..
2026-06-17 10:23:49 -04:00
2026-06-17 10:23:49 -04:00
2026-06-17 10:23:49 -04:00
2026-06-17 10:23:49 -04:00
2026-06-17 10:23:49 -04:00
2026-06-17 10:23:49 -04:00
2026-06-16 13:16:09 -04:00