From be64d84cc7e8099602fc0bfc7b2c79d902e4d76b Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 14 Jan 2026 16:28:28 +0000 Subject: [PATCH] feat: Add AppShell header to pop-out command page Wrap RunCommandPage with AppShell (hideBottomBar) to show the header with user menu and command launcher, matching the behavior of NIP-19 preview pages. When a command is launched from the /run page, it navigates to the main dashboard (/) where the window system exists. --- src/components/CommandLauncher.tsx | 11 +++++++---- src/root.tsx | 6 +++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/CommandLauncher.tsx b/src/components/CommandLauncher.tsx index 6e4e1f5..50b0226 100644 --- a/src/components/CommandLauncher.tsx +++ b/src/components/CommandLauncher.tsx @@ -12,8 +12,11 @@ import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"; import { VisuallyHidden } from "@/components/ui/visually-hidden"; import "./command-launcher.css"; -/** Check if current path is a NIP-19 preview route (no window system) */ -function isNip19PreviewRoute(pathname: string): boolean { +/** Check if current path doesn't have the window system (should navigate to / when launching commands) */ +function isNonDashboardRoute(pathname: string): boolean { + // /run route - pop-out command page + if (pathname.startsWith("/run")) return true; + // NIP-19 preview routes are single-segment paths starting with npub1, note1, nevent1, naddr1 const segment = pathname.slice(1); // Remove leading / if (segment.includes("/")) return false; // Multi-segment paths are not NIP-19 previews @@ -123,9 +126,9 @@ export default function CommandLauncher({ }); setEditMode(null); // Clear edit mode } else { - // If on a NIP-19 preview route (no window system), navigate to dashboard first + // If on a non-dashboard route (no window system), navigate to dashboard first // The window will appear after navigation since state persists - if (isNip19PreviewRoute(location.pathname)) { + if (isNonDashboardRoute(location.pathname)) { navigate("/"); } diff --git a/src/root.tsx b/src/root.tsx index 023c315..93e30a5 100644 --- a/src/root.tsx +++ b/src/root.tsx @@ -16,7 +16,11 @@ const router = createBrowserRouter([ }, { path: "/run", - element: , + element: ( + + + + ), }, { path: "/preview/:actor/:identifier",