Ryker_Feng c0f1cfef69
fix(frontend): hide stale follow-up chips while a turn is streaming (#3395) (#3396)
* fix(frontend): hide stale follow-up chips while a turn is streaming (#3395)

Follow-up suggestion chips are generated when a turn finishes streaming,
but `showFollowups` did not exclude the streaming state. If a user sent a
new message before the previous response finished, the old chips (and the
lone close button) stayed mounted and overlapped the To-dos panel and the
input box.

Gate `showFollowups` on `status !== "streaming"` so stale chips are never
shown while a response is in progress.

* fix(frontend): suppress follow-up suggestions for user-interrupted turns (#3395)

Gating showFollowups on status alone was not enough: stopping a streaming
turn (or sending a new message mid-stream, which also stops it) flips
status back to a non-streaming state and triggers the follow-up generation
effect on that streaming->ready transition, producing chips for a
half-finished, interrupted response.

Track user interruption with a ref set in the stop path, and have the
generation effect skip that transition (and clear/hide any pending chips),
so follow-ups are only generated for turns that finished on their own.
2026-08-02 09:17:26 +08:00
..
2026-02-06 15:18:37 +08:00