From 04975db9a13868975d80e784ddd298f89d7f6d6b Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Thu, 12 Nov 2026 21:53:31 +1100 Subject: [PATCH] feat(ui): move desktop navigation into the topbar breadcrumb (#1880) --- ui/src/App.vue | 19 +++++-- ui/src/components/AppSidebar.vue | 8 +-- ui/src/components/NavMain.vue | 10 +--- ui/src/components/topbar/AccountMenu.vue | 39 +++++++++++++++ ui/src/components/topbar/OrgCrumb.vue | 51 +++++++++++++++++++ ui/src/components/topbar/SectionCrumb.vue | 60 +++++++++++++++++++++++ ui/src/dashboard/state.ts | 7 +-- ui/src/lib/nav-icons.ts | 10 ++++ 8 files changed, 183 insertions(+), 21 deletions(-) create mode 100644 ui/src/components/topbar/AccountMenu.vue create mode 100644 ui/src/components/topbar/OrgCrumb.vue create mode 100644 ui/src/components/topbar/SectionCrumb.vue create mode 100644 ui/src/lib/nav-icons.ts diff --git a/ui/src/App.vue b/ui/src/App.vue index 715a85f54..4b3ef8f3b 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -9,9 +9,13 @@ import ChatDock from "@/chat/ChatDock.vue"; import AlertsBell from "@/alerts/AlertsBell.vue"; import AppSidebar from "@/components/AppSidebar.vue"; import CommandPalette from "@/components/command-palette/CommandPalette.vue"; +import AccountMenu from "@/components/topbar/AccountMenu.vue"; +import OrgCrumb from "@/components/topbar/OrgCrumb.vue"; +import SectionCrumb from "@/components/topbar/SectionCrumb.vue"; import Brand from "@/components/topbar/Brand.vue"; import Logo from "@/components/topbar/Logo.vue"; import ConnectionPill from "@/components/topbar/ConnectionPill.vue"; +import { Breadcrumb, BreadcrumbItem, BreadcrumbList, BreadcrumbSeparator } from "@/components/ui/breadcrumb"; import { Alert, AlertDescription } from "@/components/ui/alert"; import { Card } from "@/components/ui/card"; import { SidebarInset, SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar"; @@ -94,13 +98,22 @@ watch(() => accounts.status?.user, (user) => {
- + + + + + + + + +
+
accounts.status?.user, (user) => {
- - + diff --git a/ui/src/components/AppSidebar.vue b/ui/src/components/AppSidebar.vue index 3ce4b43b1..537ba225c 100644 --- a/ui/src/components/AppSidebar.vue +++ b/ui/src/components/AppSidebar.vue @@ -2,13 +2,16 @@ import NavMain from "@/components/NavMain.vue"; import NavUser from "@/components/NavUser.vue"; import TeamSwitcher from "@/components/TeamSwitcher.vue"; -import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarRail } from "@/components/ui/sidebar"; +import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, useSidebar } from "@/components/ui/sidebar"; defineProps<{ hidden: string[] }>(); + +// Desktop navigation lives in the topbar; only the phone sheet remains. +const { isMobile } = useSidebar(); diff --git a/ui/src/components/NavMain.vue b/ui/src/components/NavMain.vue index 42649c35e..9053e38c6 100644 --- a/ui/src/components/NavMain.vue +++ b/ui/src/components/NavMain.vue @@ -1,10 +1,10 @@ + + diff --git a/ui/src/components/topbar/OrgCrumb.vue b/ui/src/components/topbar/OrgCrumb.vue new file mode 100644 index 000000000..ede01b0f3 --- /dev/null +++ b/ui/src/components/topbar/OrgCrumb.vue @@ -0,0 +1,51 @@ + + + diff --git a/ui/src/components/topbar/SectionCrumb.vue b/ui/src/components/topbar/SectionCrumb.vue new file mode 100644 index 000000000..45abbd848 --- /dev/null +++ b/ui/src/components/topbar/SectionCrumb.vue @@ -0,0 +1,60 @@ + + + diff --git a/ui/src/dashboard/state.ts b/ui/src/dashboard/state.ts index f8cc04171..70b7e92a6 100644 --- a/ui/src/dashboard/state.ts +++ b/ui/src/dashboard/state.ts @@ -1,11 +1,8 @@ import { onMounted } from "vue"; -import { useLiveResource } from "@/stores/session"; import { useTasksStore } from "@/stores/tasks"; -/** Owns the initial fetch and the event stream for the page's lifetime. */ +/** Fetches the board when the page opens; the shell keeps it live. */ export function useDashboard(): void { - const store = useTasksStore(); - useLiveResource("tasks", () => void store.load(), 5000); - onMounted(store.load); + onMounted(useTasksStore().load); } diff --git a/ui/src/lib/nav-icons.ts b/ui/src/lib/nav-icons.ts new file mode 100644 index 000000000..578e2ae99 --- /dev/null +++ b/ui/src/lib/nav-icons.ts @@ -0,0 +1,10 @@ +import { Building2, LayoutDashboard, ListChecks, Server, Workflow, Zap, type LucideIcon } from "@lucide/vue"; + +export const navIcons: Record = { + "/": LayoutDashboard, + "/tasks": ListChecks, + "/workflows": Workflow, + "/events": Zap, + "/org": Building2, + "/settings": Server, +}; -- 2.54.0