Skip to content

Commit c86492f

Browse files
createpjfclaude
andcommitted
feat: add Chat and Spotlight buttons to panel header
Adds MessageSquare (Chat) and Sparkles (Spotlight) icons to the HeroSection title bar so users can open these windows from the panel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 00c4dfb commit c86492f

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed

apps/desktop/src/App.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ export function App() {
176176
gatewayState={gatewayState}
177177
gatewayError={gatewayError}
178178
onOpenSettings={() => setShowSettings(true)}
179+
onOpenChat={() => {
180+
import("@tauri-apps/api/core").then(({ invoke }) => invoke("open_chat")).catch(() => {});
181+
}}
182+
onOpenSpotlight={() => {
183+
import("@tauri-apps/api/core").then(({ invoke }) => invoke("toggle_spotlight")).catch(() => {});
184+
}}
179185
/>
180186
{alert && (
181187
<AlertBanner

apps/desktop/src/components/HeroSection.tsx

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Settings, Loader2 } from "lucide-react";
1+
import { Settings, Loader2, MessageSquare, Sparkles } from "lucide-react";
22

33
type GatewayState = "idle" | "checking" | "starting" | "running" | "failed";
44

@@ -8,9 +8,11 @@ interface HeroSectionProps {
88
gatewayState?: GatewayState;
99
gatewayError?: string | null;
1010
onOpenSettings: () => void;
11+
onOpenChat?: () => void;
12+
onOpenSpotlight?: () => void;
1113
}
1214

13-
export function HeroSection({ connected, stale, gatewayState, gatewayError, onOpenSettings }: HeroSectionProps) {
15+
export function HeroSection({ connected, stale, gatewayState, gatewayError, onOpenSettings, onOpenChat, onOpenSpotlight }: HeroSectionProps) {
1416
// Derive status text & color
1517
let statusText = connected ? "Online" : "Offline";
1618
let statusColor = connected ? "#34C759" : "#C7C7CC";
@@ -68,12 +70,32 @@ export function HeroSection({ connected, stale, gatewayState, gatewayError, onOp
6870
</div>
6971
</div>
7072

71-
<button
72-
onClick={onOpenSettings}
73-
className="flex items-center justify-center w-7 h-7 rounded-lg hover:bg-[#E8E8ED] transition-colors"
74-
>
75-
<Settings size={16} strokeWidth={1.6} className="text-[#AEAEB2]" />
76-
</button>
73+
<div className="flex items-center gap-1">
74+
{onOpenSpotlight && (
75+
<button
76+
onClick={onOpenSpotlight}
77+
className="flex items-center justify-center w-7 h-7 rounded-lg hover:bg-[#E8E8ED] transition-colors"
78+
title="Spotlight (⌘⇧X)"
79+
>
80+
<Sparkles size={15} strokeWidth={1.6} className="text-[#AEAEB2]" />
81+
</button>
82+
)}
83+
{onOpenChat && (
84+
<button
85+
onClick={onOpenChat}
86+
className="flex items-center justify-center w-7 h-7 rounded-lg hover:bg-[#E8E8ED] transition-colors"
87+
title="Chat"
88+
>
89+
<MessageSquare size={15} strokeWidth={1.6} className="text-[#AEAEB2]" />
90+
</button>
91+
)}
92+
<button
93+
onClick={onOpenSettings}
94+
className="flex items-center justify-center w-7 h-7 rounded-lg hover:bg-[#E8E8ED] transition-colors"
95+
>
96+
<Settings size={16} strokeWidth={1.6} className="text-[#AEAEB2]" />
97+
</button>
98+
</div>
7799
</div>
78100
{gatewayState === "failed" && shortError && (
79101
<div className="px-5 pb-2 -mt-1">

0 commit comments

Comments
 (0)