Files
sure/app/models
Guillem Arias Fauste 5937195df0 fix(chat): clear assistant bubble on destroy so the chat doesn't hang on Thinking (#2315)
* fix(chat): clear the assistant message bubble when a turn is destroyed

When an assistant turn fails before any text streams (e.g. a provider
auth/model/network error on the first call), Assistant::Builtin#respond_to
destroys the still-pending message. Message only broadcast on create and
update, never on destroy, so the rendered 'Thinking…' bubble was never
removed — the chat appeared stuck thinking forever even though the job
had already errored (and appended an error via chat#add_error below it).

Add after_destroy_commit broadcast_remove_to so a destroyed message is
removed from the page.

* refactor(chat): trim destroy-broadcast comment to one line

Project convention asks for comments only when the why is non-obvious; the
behaviour is already covered by the commit/PR description. Per review feedback.

---------

Co-authored-by: Guillem Arias <guillem.arias@col.vueling.com>
2026-06-14 22:09:02 +02:00
..
2025-03-28 13:08:22 -04:00
2026-01-22 20:37:07 +01:00
2026-01-22 20:37:07 +01:00
2026-03-25 17:47:04 +01:00
2026-03-25 17:47:04 +01:00
2026-04-09 18:33:59 +02:00
2026-03-25 10:50:23 +01:00
2024-02-02 09:05:04 -06:00
2026-03-25 10:50:23 +01:00
2026-03-25 10:50:23 +01:00
2024-10-18 11:26:58 -05:00
2026-01-23 22:05:28 +01:00
2024-08-23 09:33:42 -04:00
2025-11-01 09:12:42 +01:00
2026-01-23 22:05:28 +01:00
2024-05-23 08:09:33 -04:00
2025-03-28 13:08:22 -04:00