From ab58a51819d856be2061393480230892abd6ea65 Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Tue, 18 Aug 2026 13:48:39 +0000 Subject: [PATCH] test(desktop): scroll sidebar drag source into view Signed-off-by: loganj --- .../src/features/sidebar/ui/AppSidebar.tsx | 1 + .../sidebar/ui/AppSidebarPinnedHeader.tsx | 19 +++++++++++++++++-- desktop/tests/e2e/virtualization.spec.ts | 4 ++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/desktop/src/features/sidebar/ui/AppSidebar.tsx b/desktop/src/features/sidebar/ui/AppSidebar.tsx index 6e2443dcc3..a4b6805fc0 100644 --- a/desktop/src/features/sidebar/ui/AppSidebar.tsx +++ b/desktop/src/features/sidebar/ui/AppSidebar.tsx @@ -111,6 +111,7 @@ export function AppSidebar({ onSelectProjects, onSelectPulse, onSelectWorkflows, + onSelectWorkstreamBoard, onSelectHome, onSelectChannel, onOpenSearchResult, diff --git a/desktop/src/features/sidebar/ui/AppSidebarPinnedHeader.tsx b/desktop/src/features/sidebar/ui/AppSidebarPinnedHeader.tsx index f0f25614ea..d9a909fa5c 100644 --- a/desktop/src/features/sidebar/ui/AppSidebarPinnedHeader.tsx +++ b/desktop/src/features/sidebar/ui/AppSidebarPinnedHeader.tsx @@ -1,4 +1,4 @@ -import { Activity, Bot, Folders, Inbox, Zap } from "lucide-react"; +import { Activity, Bot, Folders, Inbox, Kanban, Zap } from "lucide-react"; import { TopbarSearch } from "@/features/search/ui/TopbarSearch"; import { SidebarProjectsSection } from "@/features/sidebar/ui/SidebarProjectsSection"; @@ -20,7 +20,8 @@ type SidebarSelectedView = | "agents" | "workflows" | "pulse" - | "projects"; + | "projects" + | "workstreamBoard"; type AppSidebarPinnedHeaderProps = { channelLabels: Record; @@ -183,6 +184,20 @@ export function AppSidebarPrimaryMenu({ + + + + + Workstream Board + + + diff --git a/desktop/tests/e2e/virtualization.spec.ts b/desktop/tests/e2e/virtualization.spec.ts index f7a44f05c7..3419a86119 100644 --- a/desktop/tests/e2e/virtualization.spec.ts +++ b/desktop/tests/e2e/virtualization.spec.ts @@ -31,6 +31,9 @@ async function seedChannelSections(page: Page) { // pointer down, past the activation threshold, onto the target, then releases — // the sequence dnd-kit needs to fire onDragEnd and commit the reorder. async function dragOver(page: Page, source: Locator, target: Locator) { + await source.evaluate((element) => + element.scrollIntoView({ block: "center" }), + ); const from = await source.boundingBox(); if (!from) throw new Error("drag source not laid out"); const pointer = { @@ -95,6 +98,7 @@ async function dragOver(page: Page, source: Locator, target: Locator) { }), ); }, destination); + await expect(page.getByTestId("sidebar-section-drag-overlay")).toBeHidden(); } test.describe("list virtualization", () => {