Skip to content

Commit 85940df

Browse files
author
7418
committed
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
1 parent 9e7ccfe commit 85940df

File tree

7 files changed

+4
-26
lines changed

7 files changed

+4
-26
lines changed

build/icon-original.png

378 KB
Loading

build/icon.icns

-208 KB
Binary file not shown.

build/icon.png

-83.1 KB
Loading

src/app/chat/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default function ChatSessionPage({ params }: ChatSessionPageProps) {
166166
{/* Chat title bar */}
167167
{sessionTitle && (
168168
<div
169-
className="flex items-center justify-center px-4 pb-2 gap-1"
169+
className="flex h-12 shrink-0 items-center justify-center px-4 gap-1"
170170
style={{ WebkitAppRegion: 'drag' } as React.CSSProperties}
171171
>
172172
{projectName && (

src/components/chat/ChatView.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -504,17 +504,6 @@ export function ChatView({ sessionId, initialMessages = [], initialHasMore = fal
504504
}
505505
}, [sessionId, sendMessage]);
506506

507-
// Determine if "Start Execution" button should show
508-
const showStartExecution = mode === 'plan' && !isStreaming && messages.length > 0 && messages[messages.length - 1]?.role === 'assistant';
509-
510-
const handleStartExecution = useCallback(() => {
511-
handleModeChange('code');
512-
// Small delay to let mode change propagate before sending
513-
setTimeout(() => {
514-
sendMessage('请按照上面的计划开始执行。');
515-
}, 100);
516-
}, [handleModeChange, sendMessage]);
517-
518507
return (
519508
<div className="flex h-full min-h-0 flex-col">
520509
<MessageList
@@ -533,17 +522,6 @@ export function ChatView({ sessionId, initialMessages = [], initialHasMore = fal
533522
loadingMore={loadingMore}
534523
onLoadMore={loadEarlierMessages}
535524
/>
536-
{showStartExecution && (
537-
<div className="flex justify-center py-3 px-4">
538-
<button
539-
onClick={handleStartExecution}
540-
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"
541-
>
542-
<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>
543-
开始执行
544-
</button>
545-
</div>
546-
)}
547525
<MessageInput
548526
onSend={sendMessage}
549527
onCommand={handleCommand}

src/components/layout/AppShell.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ export function AppShell({ children }: { children: React.ReactNode }) {
258258
<ResizeHandle side="left" onResize={handleChatListResize} onResizeEnd={handleChatListResizeEnd} />
259259
)}
260260
<div className="flex min-w-0 flex-1 flex-col overflow-hidden">
261-
{/* Electron draggable title bar region */}
261+
{/* Electron draggable title bar region — matches side panels' mt-5 */}
262262
<div
263-
className="h-11 w-full shrink-0"
263+
className="h-5 w-full shrink-0"
264264
style={{ WebkitAppRegion: 'drag' } as React.CSSProperties}
265265
/>
266266
<main className="relative flex-1 overflow-hidden">{children}</main>

src/components/layout/DocPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export function DocPreview({
120120
style={{ width }}
121121
>
122122
{/* Header */}
123-
<div className="flex h-10 shrink-0 items-center gap-2 px-3">
123+
<div className="flex h-12 mt-5 shrink-0 items-center gap-2 px-3">
124124
<div className="min-w-0 flex-1">
125125
<p className="truncate text-sm font-medium">{fileName}</p>
126126
</div>

0 commit comments

Comments
 (0)