mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
On mobile, the server drops live stream events for backgrounded or unfocused agents. When the user returns, a seq gap triggers a catch-up fetch whose canonical entries are appended to the tail — but the head was never flushed. Stale live items from before the gap stayed in the head and rendered after the newer catch-up entries, breaking chronological order. Worse, subsequent live events of the same kind (e.g. assistant_message) would append to the stale head item, garbling message content. Now the incremental path in processTimelineResponse flushes head → tail before reducing canonical entries, keeping the timeline ordered and the head clean for new live events.