From e33c505949be63405dda215665113a846cad5304 Mon Sep 17 00:00:00 2001 From: Paul Payne Date: Tue, 7 Jul 2026 21:08:58 -0700 Subject: [PATCH] app: rename the System map route /map -> /system The nav label was already "System" and the page is SystemMap; only the URL was stale. Move it to /system, add a back-compat redirect from /map, and update the command-palette navigations. Unrelated graph node type "map" left as-is. --- app/src/components/CommandPalette.tsx | 6 +++--- app/src/components/Layout.tsx | 2 +- app/src/pages/SystemMap.tsx | 2 +- app/src/router/routes.tsx | 6 ++++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/components/CommandPalette.tsx b/app/src/components/CommandPalette.tsx index 5099fdd..fe3f72d 100644 --- a/app/src/components/CommandPalette.tsx +++ b/app/src/components/CommandPalette.tsx @@ -26,7 +26,7 @@ interface AppItem { function detailPathFor(kind: string, name: string): string { if (kind === "job") return `/jobs/${name}` if (kind === "tool") return `/tools/${name}` - if (kind === "reference") return `/map` + if (kind === "reference") return `/system` return `/services/${name}` } @@ -137,13 +137,13 @@ function PaletteBody({ onClose }: { onClose: () => void }) { const launch = (a: AppItem) => { onClose() if (a.launchUrl) window.open(a.launchUrl, "_blank", "noreferrer") - else if (a.mapNodeId) navigate(`/map?focus=${encodeURIComponent(a.mapNodeId)}`) + else if (a.mapNodeId) navigate(`/system?focus=${encodeURIComponent(a.mapNodeId)}`) else navigate(a.detailPath) } const goToMap = (a: AppItem) => { if (!a.mapNodeId) return onClose() - navigate(`/map?focus=${encodeURIComponent(a.mapNodeId)}`) + navigate(`/system?focus=${encodeURIComponent(a.mapNodeId)}`) } const details = (a: AppItem) => { onClose() diff --git a/app/src/components/Layout.tsx b/app/src/components/Layout.tsx index 4a1ff27..6eaa6d2 100644 --- a/app/src/components/Layout.tsx +++ b/app/src/components/Layout.tsx @@ -32,7 +32,7 @@ type NavGroup = { label: string; icon: LucideIcon; children: NavLeaf[] } // "Deployments" parent. Programs (the catalog) stays top-level. const NAV: (NavLeaf | NavGroup)[] = [ { to: "/", label: "Overview", icon: LayoutDashboard, end: true }, - { to: "/map", label: "System", icon: Gauge }, + { to: "/system", label: "System", icon: Gauge }, { to: "/gateway", label: "Gateway", icon: Globe }, { label: "Deployments", diff --git a/app/src/pages/SystemMap.tsx b/app/src/pages/SystemMap.tsx index 3e12ef7..af5d020 100644 --- a/app/src/pages/SystemMap.tsx +++ b/app/src/pages/SystemMap.tsx @@ -987,7 +987,7 @@ export function SystemMapPage() { setFocus(picks.length === 1 ? picks[0].id : null) }, []) - // "Go to on map" from the command palette (/map?focus=): select + center it. + // "Go to on map" from the command palette (/system?focus=): select + center it. useEffect(() => { const f = searchParams.get("focus") if (!f) return diff --git a/app/src/router/routes.tsx b/app/src/router/routes.tsx index 40eaf4c..3b420b4 100644 --- a/app/src/router/routes.tsx +++ b/app/src/router/routes.tsx @@ -1,4 +1,4 @@ -import { createBrowserRouter } from "react-router-dom" +import { createBrowserRouter, Navigate } from "react-router-dom" import { Layout } from "@/components/Layout" import { Overview } from "@/pages/Overview" import { Services } from "@/pages/Services" @@ -29,7 +29,9 @@ export const router = createBrowserRouter([ { path: "gateway", element: }, { path: "mesh", element: }, { path: "secrets", element: }, - { path: "map", element: }, + { path: "system", element: }, + // Back-compat: the page was formerly at /map. Redirect old links/bookmarks. + { path: "map", element: }, { path: "services/:name", element: }, { path: "jobs/:name", element: }, { path: "tools/:name", element: },