From ee91bbbd2ed8d13e9fbf2b13b95770cc58bb78ec Mon Sep 17 00:00:00 2001 From: Dotta Date: Fri, 1 May 2026 17:03:57 -0500 Subject: [PATCH] [PAP-3180] Move workspace switcher into sidebar Co-Authored-By: Paperclip --- .../CompanySettingsSidebar.test.tsx | 4 + ui/src/components/CompanySettingsSidebar.tsx | 6 +- ui/src/components/InstanceSidebar.tsx | 12 ++- ui/src/components/Layout.tsx | 3 - ui/src/components/SidebarCompanyMenu.test.tsx | 86 ++++++++++++++++- ui/src/components/SidebarCompanyMenu.tsx | 96 +++++++++++++++---- 6 files changed, 180 insertions(+), 27 deletions(-) diff --git a/ui/src/components/CompanySettingsSidebar.test.tsx b/ui/src/components/CompanySettingsSidebar.test.tsx index 452219b38a6..f2f6174be82 100644 --- a/ui/src/components/CompanySettingsSidebar.test.tsx +++ b/ui/src/components/CompanySettingsSidebar.test.tsx @@ -53,6 +53,10 @@ vi.mock("./SidebarNavItem", () => ({ }, })); +vi.mock("./SidebarCompanyMenu", () => ({ + SidebarCompanyMenu: () =>
Workspace switcher
, +})); + vi.mock("@/api/sidebarBadges", () => ({ sidebarBadgesApi: mockSidebarBadgesApi, })); diff --git a/ui/src/components/CompanySettingsSidebar.tsx b/ui/src/components/CompanySettingsSidebar.tsx index f0a2b378119..4acebfec3a9 100644 --- a/ui/src/components/CompanySettingsSidebar.tsx +++ b/ui/src/components/CompanySettingsSidebar.tsx @@ -7,6 +7,7 @@ import { queryKeys } from "@/lib/queryKeys"; import { useCompany } from "@/context/CompanyContext"; import { useSidebar } from "@/context/SidebarContext"; import { SidebarNavItem } from "./SidebarNavItem"; +import { SidebarCompanyMenu } from "./SidebarCompanyMenu"; export function CompanySettingsSidebar() { const { selectedCompany, selectedCompanyId } = useCompany(); @@ -32,7 +33,10 @@ export function CompanySettingsSidebar() { return (