From ca71ef9b9ba434c743defc165e8db73776f428b9 Mon Sep 17 00:00:00 2001 From: Felix <24791380+vcfgv@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:37:39 +0800 Subject: [PATCH] feat: add Gateway button to dashboard header (#10) lgtm --- .github/workflows/release.yml | 3 --- src/components/layout/Header.tsx | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae03dc641..e536a28a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,9 +4,6 @@ name: Release on: - pull_request: - branches: - - main push: tags: - 'v*' diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index 274a641a4..6967db75c 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -4,7 +4,9 @@ * On the Chat page, shows session selector, refresh, thinking toggle, and new session. */ import { useLocation } from 'react-router-dom'; +import { Terminal } from 'lucide-react'; import { ChatToolbar } from '@/pages/Chat/ChatToolbar'; +import { Button } from '@/components/ui/button'; // Page titles mapping const pageTitles: Record = { @@ -20,6 +22,20 @@ export function Header() { const location = useLocation(); const currentTitle = pageTitles[location.pathname] || 'ClawX'; const isChatPage = location.pathname === '/'; + const isDashboard = location.pathname === '/dashboard'; + + const handleOpenDevConsole = async () => { + try { + const result = await window.electron.ipcRenderer.invoke('gateway:getControlUiUrl') as { success: boolean; url?: string; error?: string }; + if (result.success && result.url) { + window.electron.openExternal(result.url); + } else { + console.error('Failed to get Dev Console URL:', result.error); + } + } catch (err) { + console.error('Error opening Dev Console:', err); + } + }; return (
@@ -27,6 +43,19 @@ export function Header() { {/* Chat-specific controls */} {isChatPage && } + + {/* Dashboard specific controls - Dev Console Button */} + {isDashboard && ( + + )}
); }