fix: keep chat prompt input stable during streaming

Coalesce session status/activity updates into one render per animation
frame instead of one per token, ignore prompt-editor status changes that
do not affect what it displays, and stop per-keystroke draft state from
re-rendering the surrounding template. This prevents streaming-driven
re-renders from interrupting in-progress touch gestures such as the iOS
long-press paste/edit callout.
This commit is contained in:
Federico Jaramillo Martinez
2026-06-27 08:12:01 +02:00
parent 041423a03b
commit 2009e6a883
7 changed files with 287 additions and 36 deletions
@@ -0,0 +1,5 @@
---
"@jmfederico/pi-web": patch
---
Keep the chat prompt input stable during streaming so mobile touch gestures (such as the iOS long-press paste/edit callout) are no longer interrupted. Session status and activity updates are now coalesced into a single render per animation frame instead of one per token, the prompt editor ignores status changes that do not affect what it displays, and per-keystroke draft state no longer triggers surrounding re-renders.