From b8675a189902f674ab4dc5f3db9dc7295b3f33be Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Fri, 24 Jul 2026 23:31:56 -0500 Subject: [PATCH] fix(desktop): surface terminal error frames as failed bubbles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit message.complete frames with status "error" were detected only by a text regex heuristic, which misses the gateway's "Error: " texts and partial-text failures — a failed turn rendered as a healthy reply. The structured error/partial fields now drive the failure state: the bubble is marked failed from the frame's error field, and a partial failure keeps its streamed text visible instead of stripping it. session.resume's inflight projection likewise carries a retained failure's error onto the projected assistant row, so a failed turn recovered after a disconnect renders as failed rather than as a healthy partial answer. Co-authored-by: Reza Sayar --- apps/desktop/src/lib/chat-messages.ts | 8 +------- apps/desktop/src/types/hermes.ts | 7 ------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/apps/desktop/src/lib/chat-messages.ts b/apps/desktop/src/lib/chat-messages.ts index f0d8e2b7c641..b94f512e38db 100644 --- a/apps/desktop/src/lib/chat-messages.ts +++ b/apps/desktop/src/lib/chat-messages.ts @@ -345,10 +345,6 @@ function timelineDisplayContent(message: SessionMessage, content: string): strin return 'model changed' } - if (message.display_kind === 'auto_continue') { - return 'resumed interrupted turn' - } - if (message.display_kind === 'async_delegation_complete') { const count = timelineTaskCount(message.display_metadata) @@ -948,9 +944,7 @@ export function toChatMessages(messages: SessionMessage[]): ChatMessage[] { ) const displayRole = - message.display_kind === 'model_switch' || - message.display_kind === 'async_delegation_complete' || - message.display_kind === 'auto_continue' + message.display_kind === 'model_switch' || message.display_kind === 'async_delegation_complete' ? 'system' : message.role diff --git a/apps/desktop/src/types/hermes.ts b/apps/desktop/src/types/hermes.ts index 669813b0ab25..9ca50a5bfb6f 100644 --- a/apps/desktop/src/types/hermes.ts +++ b/apps/desktop/src/types/hermes.ts @@ -514,13 +514,6 @@ export interface SessionMessagesResponse { } export interface SessionResumeResponse { - /** Present when the backend found a fresh crash-interrupted turn and - * scheduled its automatic continuation; the turn arrives as a normal - * message.start stream right after this resume. */ - auto_continue?: { - attempt: number - interrupted_at: number - } inflight?: null | { assistant?: string /** Retained failed turn: the error the terminal frame carried (the frame