diff --git a/ui/src/App.vue b/ui/src/App.vue index 94d7e323d..8d99699e2 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -7,7 +7,13 @@ import AccountEntry from "@/accounts/AccountEntry.vue"; import { useAccountsStore } from "@/accounts/accounts"; import ChatDock from "@/chat/ChatDock.vue"; -import Topbar from "@/components/topbar/Topbar.vue"; +import AlertsBell from "@/alerts/AlertsBell.vue"; +import AppSidebar from "@/components/AppSidebar.vue"; +import CommandPalette from "@/components/command-palette/CommandPalette.vue"; +import Brand from "@/components/topbar/Brand.vue"; +import ConnectionPill from "@/components/topbar/ConnectionPill.vue"; +import { SidebarInset, SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar"; +import NewTaskDialog from "@/tasks/NewTaskDialog.vue"; import SettingsShell from "@/settings/SettingsShell.vue"; import { TooltipProvider } from "@/components/ui/tooltip"; import { hiddenPaths } from "@/lib/nav"; @@ -22,6 +28,7 @@ const router = useRouter(); const workflowsPage = computed(() => route.path === "/workflows"); const hidden = computed(() => hiddenPaths(session.sections)); const main = ref(null); +const newTaskOpen = ref(false); // A page the caller may not open is not reachable by URL either: the nav drops // it, so a bookmark or a chat link must not land on a form whose saves the // control plane refuses. @@ -60,33 +67,43 @@ watch(() => accounts.status?.user, (user) => {

{{accounts.error||'Connecting to Archie…'}}

-
+ Skip to main content - -
- - - - - - - - - - -
-
- - + + +
+ + +
+ + + + +
+
+
+ + + + + + + + + + +
+
+ + +
diff --git a/ui/src/components/AppSidebar.vue b/ui/src/components/AppSidebar.vue new file mode 100644 index 000000000..ac1ce58d4 --- /dev/null +++ b/ui/src/components/AppSidebar.vue @@ -0,0 +1,23 @@ + + + diff --git a/ui/src/components/NavMain.vue b/ui/src/components/NavMain.vue new file mode 100644 index 000000000..5de36971c --- /dev/null +++ b/ui/src/components/NavMain.vue @@ -0,0 +1,42 @@ + + + diff --git a/ui/src/components/NavUser.vue b/ui/src/components/NavUser.vue new file mode 100644 index 000000000..f94ebd4bc --- /dev/null +++ b/ui/src/components/NavUser.vue @@ -0,0 +1,54 @@ + + + diff --git a/ui/src/components/TeamSwitcher.vue b/ui/src/components/TeamSwitcher.vue new file mode 100644 index 000000000..cc5cbf5d3 --- /dev/null +++ b/ui/src/components/TeamSwitcher.vue @@ -0,0 +1,74 @@ + + + diff --git a/ui/src/components/topbar/Nav.vue b/ui/src/components/topbar/Nav.vue deleted file mode 100644 index a0f6e8800..000000000 --- a/ui/src/components/topbar/Nav.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - diff --git a/ui/src/components/topbar/NavMenu.vue b/ui/src/components/topbar/NavMenu.vue deleted file mode 100644 index c1b05ca99..000000000 --- a/ui/src/components/topbar/NavMenu.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - diff --git a/ui/src/components/topbar/OrgSwitcher.vue b/ui/src/components/topbar/OrgSwitcher.vue deleted file mode 100644 index 160b257ff..000000000 --- a/ui/src/components/topbar/OrgSwitcher.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - diff --git a/ui/src/components/topbar/ProfileDropdown.vue b/ui/src/components/topbar/ProfileDropdown.vue deleted file mode 100644 index 99b9a10bf..000000000 --- a/ui/src/components/topbar/ProfileDropdown.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - diff --git a/ui/src/components/topbar/Topbar.vue b/ui/src/components/topbar/Topbar.vue deleted file mode 100644 index b3e48db0f..000000000 --- a/ui/src/components/topbar/Topbar.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/ui/src/components/ui/sidebar/Sidebar.vue b/ui/src/components/ui/sidebar/Sidebar.vue new file mode 100644 index 000000000..e5eb99a75 --- /dev/null +++ b/ui/src/components/ui/sidebar/Sidebar.vue @@ -0,0 +1,100 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarContent.vue b/ui/src/components/ui/sidebar/SidebarContent.vue new file mode 100644 index 000000000..18501238c --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarContent.vue @@ -0,0 +1,18 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarFooter.vue b/ui/src/components/ui/sidebar/SidebarFooter.vue new file mode 100644 index 000000000..6d7d7fa35 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarFooter.vue @@ -0,0 +1,18 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarGroup.vue b/ui/src/components/ui/sidebar/SidebarGroup.vue new file mode 100644 index 000000000..312be81ce --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarGroup.vue @@ -0,0 +1,18 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarGroupAction.vue b/ui/src/components/ui/sidebar/SidebarGroupAction.vue new file mode 100644 index 000000000..045a27cd7 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarGroupAction.vue @@ -0,0 +1,25 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarGroupContent.vue b/ui/src/components/ui/sidebar/SidebarGroupContent.vue new file mode 100644 index 000000000..82e651bc8 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarGroupContent.vue @@ -0,0 +1,18 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarGroupLabel.vue b/ui/src/components/ui/sidebar/SidebarGroupLabel.vue new file mode 100644 index 000000000..0bfc6d0f7 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarGroupLabel.vue @@ -0,0 +1,24 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarHeader.vue b/ui/src/components/ui/sidebar/SidebarHeader.vue new file mode 100644 index 000000000..4c2317dd5 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarHeader.vue @@ -0,0 +1,18 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarInput.vue b/ui/src/components/ui/sidebar/SidebarInput.vue new file mode 100644 index 000000000..9d50abbae --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarInput.vue @@ -0,0 +1,19 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarInset.vue b/ui/src/components/ui/sidebar/SidebarInset.vue new file mode 100644 index 000000000..4aec54ca3 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarInset.vue @@ -0,0 +1,20 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenu.vue b/ui/src/components/ui/sidebar/SidebarMenu.vue new file mode 100644 index 000000000..bec9f126b --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenu.vue @@ -0,0 +1,18 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenuAction.vue b/ui/src/components/ui/sidebar/SidebarMenuAction.vue new file mode 100644 index 000000000..706be1a62 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenuAction.vue @@ -0,0 +1,30 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenuBadge.vue b/ui/src/components/ui/sidebar/SidebarMenuBadge.vue new file mode 100644 index 000000000..98d9e6728 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenuBadge.vue @@ -0,0 +1,21 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenuButton.vue b/ui/src/components/ui/sidebar/SidebarMenuButton.vue new file mode 100644 index 000000000..e2ade09f1 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenuButton.vue @@ -0,0 +1,48 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenuButtonChild.vue b/ui/src/components/ui/sidebar/SidebarMenuButtonChild.vue new file mode 100644 index 000000000..ea58fc630 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenuButtonChild.vue @@ -0,0 +1,36 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenuItem.vue b/ui/src/components/ui/sidebar/SidebarMenuItem.vue new file mode 100644 index 000000000..b7b4d3f21 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenuItem.vue @@ -0,0 +1,18 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenuSkeleton.vue b/ui/src/components/ui/sidebar/SidebarMenuSkeleton.vue new file mode 100644 index 000000000..1dfc8ffd3 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenuSkeleton.vue @@ -0,0 +1,35 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenuSub.vue b/ui/src/components/ui/sidebar/SidebarMenuSub.vue new file mode 100644 index 000000000..e9a3024f0 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenuSub.vue @@ -0,0 +1,21 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenuSubButton.vue b/ui/src/components/ui/sidebar/SidebarMenuSubButton.vue new file mode 100644 index 000000000..dba5f2080 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenuSubButton.vue @@ -0,0 +1,32 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarMenuSubItem.vue b/ui/src/components/ui/sidebar/SidebarMenuSubItem.vue new file mode 100644 index 000000000..f0c35bc3d --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarMenuSubItem.vue @@ -0,0 +1,18 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarProvider.vue b/ui/src/components/ui/sidebar/SidebarProvider.vue new file mode 100644 index 000000000..36d19e742 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarProvider.vue @@ -0,0 +1,82 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarRail.vue b/ui/src/components/ui/sidebar/SidebarRail.vue new file mode 100644 index 000000000..65c087b19 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarRail.vue @@ -0,0 +1,33 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarSeparator.vue b/ui/src/components/ui/sidebar/SidebarSeparator.vue new file mode 100644 index 000000000..1803bffb8 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarSeparator.vue @@ -0,0 +1,19 @@ + + + diff --git a/ui/src/components/ui/sidebar/SidebarTrigger.vue b/ui/src/components/ui/sidebar/SidebarTrigger.vue new file mode 100644 index 000000000..031d26bd0 --- /dev/null +++ b/ui/src/components/ui/sidebar/SidebarTrigger.vue @@ -0,0 +1,28 @@ + + + diff --git a/ui/src/components/ui/sidebar/index.ts b/ui/src/components/ui/sidebar/index.ts new file mode 100644 index 000000000..a32846f24 --- /dev/null +++ b/ui/src/components/ui/sidebar/index.ts @@ -0,0 +1,59 @@ +import type { VariantProps } from 'class-variance-authority' +import type { HTMLAttributes } from 'vue' +import { cva } from 'class-variance-authority' + +export interface SidebarProps { + side?: 'left' | 'right' + variant?: 'sidebar' | 'floating' | 'inset' + collapsible?: 'offcanvas' | 'icon' | 'none' + class?: HTMLAttributes['class'] +} + +export { default as Sidebar } from './Sidebar.vue' +export { default as SidebarContent } from './SidebarContent.vue' +export { default as SidebarFooter } from './SidebarFooter.vue' +export { default as SidebarGroup } from './SidebarGroup.vue' +export { default as SidebarGroupAction } from './SidebarGroupAction.vue' +export { default as SidebarGroupContent } from './SidebarGroupContent.vue' +export { default as SidebarGroupLabel } from './SidebarGroupLabel.vue' +export { default as SidebarHeader } from './SidebarHeader.vue' +export { default as SidebarInput } from './SidebarInput.vue' +export { default as SidebarInset } from './SidebarInset.vue' +export { default as SidebarMenu } from './SidebarMenu.vue' +export { default as SidebarMenuAction } from './SidebarMenuAction.vue' +export { default as SidebarMenuBadge } from './SidebarMenuBadge.vue' +export { default as SidebarMenuButton } from './SidebarMenuButton.vue' +export { default as SidebarMenuItem } from './SidebarMenuItem.vue' +export { default as SidebarMenuSkeleton } from './SidebarMenuSkeleton.vue' +export { default as SidebarMenuSub } from './SidebarMenuSub.vue' +export { default as SidebarMenuSubButton } from './SidebarMenuSubButton.vue' +export { default as SidebarMenuSubItem } from './SidebarMenuSubItem.vue' +export { default as SidebarProvider } from './SidebarProvider.vue' +export { default as SidebarRail } from './SidebarRail.vue' +export { default as SidebarSeparator } from './SidebarSeparator.vue' +export { default as SidebarTrigger } from './SidebarTrigger.vue' + +export { useSidebar } from './utils' + +export const sidebarMenuButtonVariants = cva( + 'ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button group/menu-button flex w-full items-center overflow-hidden outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate', + { + variants: { + variant: { + default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground', + outline: 'bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]', + }, + size: { + default: 'h-8 text-sm', + sm: 'h-7 text-xs', + lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!', + }, + }, + defaultVariants: { + variant: 'default', + size: 'default', + }, + }, +) + +export type SidebarMenuButtonVariants = VariantProps diff --git a/ui/src/components/ui/sidebar/utils.ts b/ui/src/components/ui/sidebar/utils.ts new file mode 100644 index 000000000..bf2d8946c --- /dev/null +++ b/ui/src/components/ui/sidebar/utils.ts @@ -0,0 +1,20 @@ +import type { ComputedRef, Ref } from 'vue' +import { createContext } from 'reka-ui' + +export const SIDEBAR_COOKIE_NAME = 'sidebar_state' +export const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7 +export const SIDEBAR_WIDTH = '16rem' +export const SIDEBAR_WIDTH_MOBILE = '18rem' +export const SIDEBAR_WIDTH_ICON = '3rem' +export const SIDEBAR_KEYBOARD_SHORTCUT = 'b' +export const SIDEBAR_MOBILE_BREAKPOINT = 768 + +export const [useSidebar, provideSidebarContext] = createContext<{ + state: ComputedRef<'expanded' | 'collapsed'> + open: Ref + setOpen: (value: boolean) => void + isMobile: Ref + openMobile: Ref + setOpenMobile: (value: boolean) => void + toggleSidebar: () => void +}>('Sidebar') diff --git a/ui/src/style.css b/ui/src/style.css index b450453a2..c4f48c34d 100644 --- a/ui/src/style.css +++ b/ui/src/style.css @@ -95,6 +95,15 @@ --color-ring: var(--ring); --color-hairline: var(--hairline); + --color-sidebar: var(--card); + --color-sidebar-foreground: var(--card-foreground); + --color-sidebar-primary: var(--primary); + --color-sidebar-primary-foreground: var(--primary-foreground); + --color-sidebar-accent: var(--accent); + --color-sidebar-accent-foreground: var(--accent-foreground); + --color-sidebar-border: var(--border); + --color-sidebar-ring: var(--ring); + /* Foreground ramp. --muted-foreground is shadcn's; --fg-subtle is the quieter third step the dashboard's secondary text uses. */ --color-fg-muted: var(--fg-muted);