From 8c54c48514d313f981cefab051202da8aef9212a 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: Sun, 12 Apr 2026 14:15:33 +0800 Subject: [PATCH] =?UTF-8?q?ui(desktop):=20enlarge=20default=20window=20to?= =?UTF-8?q?=201440=C3=97960=20and=20show=20welcome=20hero=20on=20empty=20s?= =?UTF-8?q?ession=20tabs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 14" MacBook-friendly default size (was 1280×800). New session tabs now display the same icon + title welcome screen as the landing page until the first message. Co-Authored-By: Claude Opus 4.6 (1M context) --- desktop/src-tauri/tauri.conf.json | 8 +-- desktop/src/pages/ActiveSession.tsx | 107 +++++++++++++++++----------- 2 files changed, 69 insertions(+), 46 deletions(-) diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.json index 80c24ddf..0224416a 100644 --- a/desktop/src-tauri/tauri.conf.json +++ b/desktop/src-tauri/tauri.conf.json @@ -13,10 +13,10 @@ "windows": [ { "title": "Claude Code Haha", - "width": 1280, - "height": 800, - "minWidth": 900, - "minHeight": 600, + "width": 1440, + "height": 960, + "minWidth": 960, + "minHeight": 640, "decorations": true, "titleBarStyle": "Overlay", "hiddenTitle": true, diff --git a/desktop/src/pages/ActiveSession.tsx b/desktop/src/pages/ActiveSession.tsx index 2df707dc..3aeb1eeb 100644 --- a/desktop/src/pages/ActiveSession.tsx +++ b/desktop/src/pages/ActiveSession.tsx @@ -3,6 +3,7 @@ import { useTabStore } from '../stores/tabStore' import { useSessionStore } from '../stores/sessionStore' import { useChatStore } from '../stores/chatStore' import { useCLITaskStore } from '../stores/cliTaskStore' +import { useTranslation } from '../i18n' import { MessageList } from '../components/chat/MessageList' import { ChatInput } from '../components/chat/ChatInput' import { TeamStatusBar } from '../components/teams/TeamStatusBar' @@ -53,6 +54,11 @@ export function ActiveSession() { fetchSessionTasks, ]) + const t = useTranslation() + const messages = sessionState?.messages ?? [] + const streamingText = sessionState?.streamingText ?? '' + const isEmpty = messages.length === 0 && !streamingText + const isActive = chatState !== 'idle' const totalTokens = tokenUsage.input_tokens + tokenUsage.output_tokens @@ -69,51 +75,68 @@ export function ActiveSession() { return (
- {/* Session info header */} -
-
-

- {session?.title || 'Untitled Session'} -

-
- {isActive && ( - - - session active - - )} - {totalTokens > 0 && ( - <> - · - {totalTokens.toLocaleString()} t - - )} - {lastUpdated && ( - <> - · - last updated {lastUpdated} - - )} - {session?.messageCount !== undefined && session.messageCount > 0 && ( - <> - · - {session.messageCount} messages - - )} + {isEmpty ? ( + /* Welcome hero — same look as EmptySession */ +
+
+ Claude Code Haha +

+ {t('empty.title')} +

+

+ {t('empty.subtitle')} +

- {session?.workDirExists === false && ( -
- warning - - Workspace unavailable: {session.workDir || 'directory no longer exists'} - -
- )}
-
+ ) : ( + <> + {/* Session info header */} +
+
+

+ {session?.title || 'Untitled Session'} +

+
+ {isActive && ( + + + session active + + )} + {totalTokens > 0 && ( + <> + · + {totalTokens.toLocaleString()} t + + )} + {lastUpdated && ( + <> + · + last updated {lastUpdated} + + )} + {session?.messageCount !== undefined && session.messageCount > 0 && ( + <> + · + {session.messageCount} messages + + )} +
+ {session?.workDirExists === false && ( +
+ warning + + Workspace unavailable: {session.workDir || 'directory no longer exists'} + +
+ )} +
+
- {/* Message stream */} - + {/* Message stream */} + + + )} {/* Session task bar — sticky at bottom */}