From 8c10ffba55d8bbe6e3b658a041df113dbb87dbb2 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Mon, 7 Sep 2026 01:50:40 -0700 Subject: [PATCH] fix: preserve Desktop async report bodies during hydration Keep compact completion labels while rendering only result and job output bodies, including legacy and batch deliveries. Credit Gyarados4157's #101083 investigation; avoid rendering its full model instruction envelope. --- .../hooks/use-session-actions/utils.ts | 1 + .../assistant-ui/thread/system-message.tsx | 17 +++++++ apps/desktop/src/lib/async-report.test.ts | 48 +++++++++++++++++++ .../src/lib/chat-messages/hydration.ts | 30 ++++++++++++ apps/desktop/src/lib/chat-messages/types.ts | 2 + apps/desktop/src/lib/chat-runtime.ts | 2 +- website/docs/user-guide/desktop.md | 2 + 7 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 apps/desktop/src/lib/async-report.test.ts diff --git a/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts b/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts index 875b059ed2..c3a38d4638 100644 --- a/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts +++ b/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts @@ -150,6 +150,7 @@ const _chatMessageFieldsExhaustive: { } = {} const COMPARED_FIELDS = [ + 'asyncResult', 'id', 'role', 'pending', diff --git a/apps/desktop/src/components/assistant-ui/thread/system-message.tsx b/apps/desktop/src/components/assistant-ui/thread/system-message.tsx index 112611ffe0..08a919e9de 100644 --- a/apps/desktop/src/components/assistant-ui/thread/system-message.tsx +++ b/apps/desktop/src/components/assistant-ui/thread/system-message.tsx @@ -1,6 +1,7 @@ import { MessagePrimitive, useAuiState } from '@assistant-ui/react' import { type FC } from 'react' +import { MarkdownTextContent } from '@/components/assistant-ui/markdown-text' import { messageContentText } from '@/components/assistant-ui/thread/content' import { MessageTimelineTimestamp } from '@/components/assistant-ui/thread/timeline-timestamp' import { SCAFFOLD_LABEL_CLASS } from '@/components/chat/scaffold-row' @@ -15,11 +16,27 @@ const REVIEW_NOTE_RE = /^review:(?