From 40852a804d5abc2ad06323322392467efd53fd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Sat, 16 May 2026 02:28:14 +0800 Subject: [PATCH] Align goal UI with memory activity blocks Goal status previously used a standalone success-card treatment, which made /goal look visually detached from the transcript. Rework the active goal strip and goal event cards to use the same compact memory/tool-result visual language. Constraint: Preserve /goal state visibility while reducing alert-like chrome. Rejected: Continue tuning only goal colors | the layout still read as a separate alert instead of transcript state. Confidence: high Scope-risk: narrow Tested: cd desktop && bun run test -- --run src/components/chat/MessageList.test.tsx src/pages/ActiveSession.test.tsx src/theme/globals.test.ts Tested: cd desktop && bun run test -- --run src/components/chat/MessageList.test.tsx src/pages/ActiveSession.test.tsx Tested: cd desktop && bun run lint Tested: cd desktop && bun run build --- desktop/src/components/chat/MessageList.tsx | 84 ++++++++++++++------- desktop/src/pages/ActiveSession.tsx | 74 +++++++++--------- 2 files changed, 93 insertions(+), 65 deletions(-) diff --git a/desktop/src/components/chat/MessageList.tsx b/desktop/src/components/chat/MessageList.tsx index 76754e0d..abd74ca9 100644 --- a/desktop/src/components/chat/MessageList.tsx +++ b/desktop/src/components/chat/MessageList.tsx @@ -1,5 +1,5 @@ import { useRef, useEffect, useMemo, memo, useState, useCallback, useLayoutEffect, type ReactNode } from 'react' -import { ArrowDown, BookMarked, Settings, Target } from 'lucide-react' +import { ArrowDown, BookMarked, ChevronDown, ChevronRight, Settings, Target } from 'lucide-react' import { ApiError } from '../../api/client' import { sessionsApi, type SessionTurnCheckpoint } from '../../api/sessions' import { useChatStore } from '../../stores/chatStore' @@ -151,6 +151,7 @@ function ChatSelectionMenu({ function GoalEventCard({ message }: { message: GoalEvent }) { const t = useTranslation() + const [expanded, setExpanded] = useState(true) const titleKey = `chat.goalEvent.${message.action === 'status' ? 'statusTitle' : message.action}` as TranslationKey const title = t(titleKey) === titleKey ? t('chat.goalEvent.message') : t(titleKey) const metaDetails = [ @@ -160,35 +161,60 @@ function GoalEventCard({ message }: { message: GoalEvent }) { ].filter((detail): detail is string => detail !== null) return ( -
-
-
-
-
-
{title}
- {message.objective ? ( -
- {t('chat.goalEvent.objective', { value: message.objective })} -
- ) : message.message ? ( -
- {message.message} -
- ) : null} - {metaDetails.length > 0 && ( -
- {metaDetails.map((detail) => ( - - {detail} - - ))} -
+
+
+
+
) diff --git a/desktop/src/pages/ActiveSession.tsx b/desktop/src/pages/ActiveSession.tsx index bcc83ba1..9c835163 100644 --- a/desktop/src/pages/ActiveSession.tsx +++ b/desktop/src/pages/ActiveSession.tsx @@ -218,6 +218,7 @@ function GoalStatusPanel({ : isRunning && goal.status !== 'complete' ? t('chat.activeGoal.running') : t('chat.activeGoal.active') + const hasMeta = Boolean(goal.budget || goal.continuations || goal.elapsed) return (
-
- -