From 7dc0b59784025f33d484ae8f9de66becc2152f46 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 01:44:42 +0800 Subject: [PATCH] Refine goal UI around memory theme tokens Goal status needed to read like persistent agent state, not a success alert. Reuse the Memory surface language and expose goal-specific aliases so the visual treatment follows each supported desktop theme.\n\nConstraint: Must keep /goal visible in both active-session chrome and transcript events.\nRejected: Continue using success tokens | they made the UI look like a warning/success card and clashed with white/dark themes.\nConfidence: high\nScope-risk: narrow\nTested: cd desktop && bun run test -- --run src/pages/ActiveSession.test.tsx src/components/chat/MessageList.test.tsx src/theme/globals.test.ts\nTested: cd desktop && bun run lint\nTested: cd desktop && bun run build\nTested: Chrome screenshot fixture for light, white, and dark goal UI tokens. --- desktop/src/components/chat/MessageList.tsx | 67 ++++++++---------- desktop/src/pages/ActiveSession.tsx | 75 ++++++++++----------- desktop/src/theme/globals.css | 18 +++++ desktop/src/theme/globals.test.ts | 6 ++ 4 files changed, 88 insertions(+), 78 deletions(-) diff --git a/desktop/src/components/chat/MessageList.tsx b/desktop/src/components/chat/MessageList.tsx index b3840e04..76754e0d 100644 --- a/desktop/src/components/chat/MessageList.tsx +++ b/desktop/src/components/chat/MessageList.tsx @@ -153,52 +153,41 @@ function GoalEventCard({ message }: { message: GoalEvent }) { const t = useTranslation() const titleKey = `chat.goalEvent.${message.action === 'status' ? 'statusTitle' : message.action}` as TranslationKey const title = t(titleKey) === titleKey ? t('chat.goalEvent.message') : t(titleKey) - const objective = message.objective ? t('chat.goalEvent.objective', { value: message.objective }) : null - const details = [ + const metaDetails = [ message.status ? t('chat.goalEvent.statusValue', { value: message.status }) : null, message.budget ? t('chat.goalEvent.budget', { value: message.budget }) : null, message.continuations ? t('chat.goalEvent.continuations', { value: message.continuations }) : null, ].filter((detail): detail is string => detail !== null) return ( -
-
-