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",