fix: align title bar headers across panels, fix macOS Dock icon size

Title bar alignment (AppShell.tsx, page.tsx, DocPreview.tsx):
- Reduce AppShell draggable spacer from h-11 to h-5 to match side panels' mt-5
- Chat title bar uses normal flow h-12 instead of absolute positioning hack
- DocPreview header changed from h-10 to h-12 mt-5
- All three columns now align at the same vertical position

macOS Dock icon (build/icon.png, build/icon.icns):
- Add 100px transparent padding on all sides (content 824x824 in 1024x1024 canvas)
- Follows Apple Human Interface Guidelines for macOS app icons
- Regenerated icon.icns with all required sizes
- Original icon backed up as icon-original.png

Remove start execution button (ChatView.tsx):
- Remove showStartExecution logic and handleStartExecution callback
- Mode switching is now handled automatically by SDK
This commit is contained in:
7418 committed 2026-02-24 15:30:42 +08:00
1 parent 9e7ccfefaa
commit 85940dfde3
7 files changed
+4 -26

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 KiB

After

Width:  |  Height:  |  Size: 295 KiB

+1 -1
View File
@@ -166,7 +166,7 @@ export default function ChatSessionPage({ params }: ChatSessionPageProps) {
{/* Chat title bar */}
{sessionTitle && (
<div
className="flex items-center justify-center px-4 pb-2 gap-1"
className="flex h-12 shrink-0 items-center justify-center px-4 gap-1"
style={{ WebkitAppRegion: 'drag' } as React.CSSProperties}
>
{projectName && (
-22
View File
@@ -504,17 +504,6 @@ export function ChatView({ sessionId, initialMessages = [], initialHasMore = fal
}
}, [sessionId, sendMessage]);
// Determine if "Start Execution" button should show
const showStartExecution = mode === 'plan' && !isStreaming && messages.length > 0 && messages[messages.length - 1]?.role === 'assistant';
const handleStartExecution = useCallback(() => {
handleModeChange('code');
// Small delay to let mode change propagate before sending
setTimeout(() => {
sendMessage('请按照上面的计划开始执行。');
}, 100);
}, [handleModeChange, sendMessage]);
return (
<div className="flex h-full min-h-0 flex-col">
<MessageList
@@ -533,17 +522,6 @@ export function ChatView({ sessionId, initialMessages = [], initialHasMore = fal
loadingMore={loadingMore}
onLoadMore={loadEarlierMessages}
/>
{showStartExecution && (
<div className="flex justify-center py-3 px-4">
<button
onClick={handleStartExecution}
className="inline-flex items-center gap-2 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90"
>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>
开始执行
</button>
</div>
)}
<MessageInput
onSend={sendMessage}
onCommand={handleCommand}
+2 -2
View File
@@ -258,9 +258,9 @@ export function AppShell({ children }: { children: React.ReactNode }) {
<ResizeHandle side="left" onResize={handleChatListResize} onResizeEnd={handleChatListResizeEnd} />
)}
<div className="flex min-w-0 flex-1 flex-col overflow-hidden">
{/* Electron draggable title bar region */}
{/* Electron draggable title bar region — matches side panels' mt-5 */}
<div
className="h-11 w-full shrink-0"
className="h-5 w-full shrink-0"
style={{ WebkitAppRegion: 'drag' } as React.CSSProperties}
/>
<main className="relative flex-1 overflow-hidden">{children}</main>
+1 -1
View File
@@ -120,7 +120,7 @@ export function DocPreview({
style={{ width }}
>
{/* Header */}
<div className="flex h-10 shrink-0 items-center gap-2 px-3">
<div className="flex h-12 mt-5 shrink-0 items-center gap-2 px-3">
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-medium">{fileName}</p>
</div>