From 9a8fd3558dcf4d77ae142f4a485219159586b978 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Mon, 9 Feb 2026 00:10:35 +0530 Subject: [PATCH] feat: replace DashboardShell and SignedOut/SignedIn components with DashboardPageLayout for improved structure and state handling --- frontend/src/app/board-groups/page.tsx | 207 +++++++++++------------ frontend/src/app/boards/page.tsx | 217 +++++++++++-------------- 2 files changed, 187 insertions(+), 237 deletions(-) diff --git a/frontend/src/app/board-groups/page.tsx b/frontend/src/app/board-groups/page.tsx index 80e7135c..6959acb9 100644 --- a/frontend/src/app/board-groups/page.tsx +++ b/frontend/src/app/board-groups/page.tsx @@ -5,7 +5,7 @@ export const dynamic = "force-dynamic"; import { useMemo, useState } from "react"; import Link from "next/link"; -import { SignedIn, SignedOut, useAuth } from "@/auth/clerk"; +import { useAuth } from "@/auth/clerk"; import { type ColumnDef, flexRender, @@ -22,8 +22,7 @@ import { useListBoardGroupsApiV1BoardGroupsGet, } from "@/api/generated/board-groups/board-groups"; import type { BoardGroupRead } from "@/api/generated/model"; -import { DashboardSidebar } from "@/components/organisms/DashboardSidebar"; -import { DashboardShell } from "@/components/templates/DashboardShell"; +import { DashboardPageLayout } from "@/components/templates/DashboardPageLayout"; import { Button, buttonVariants } from "@/components/ui/button"; import { Dialog, @@ -33,7 +32,6 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; -import { SignedOutPanel } from "@/components/auth/SignedOutPanel"; import { formatTimestamp } from "@/lib/formatters"; import { TableEmptyStateRow, TableLoadingRow } from "@/components/ui/table-state"; @@ -179,120 +177,97 @@ export default function BoardGroupsPage() { }); return ( - - - - - - -
-
-
-
-
-

- Board groups -

-

- Group boards so agents can see related work. {groups.length}{" "} - group{groups.length === 1 ? "" : "s"} total. -

-
- - Create group - -
-
-
- -
-
-
- - - {table.getHeaderGroups().map((headerGroup) => ( - - {headerGroup.headers.map((header) => ( - - ))} - + <> + + Create group + + } + stickyHeader + > +
+
+
- {header.isPlaceholder - ? null - : flexRender( - header.column.columnDef.header, - header.getContext(), - )} -
+ + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => ( + ))} - - - {groupsQuery.isLoading ? ( - - ) : table.getRowModel().rows.length ? ( - table.getRowModel().rows.map((row) => ( - - {row.getVisibleCells().map((cell) => ( - - ))} - - )) - ) : ( - - - - - - - - } - title="No groups yet" - description="Create a board group to increase cross-board visibility for agents." - actionHref="/board-groups/new" - actionLabel="Create your first group" - /> - )} - -
+ {header.isPlaceholder + ? null + : flexRender( + header.column.columnDef.header, + header.getContext(), + )} +
- {flexRender( - cell.column.columnDef.cell, - cell.getContext(), - )} -
-
-
- - {groupsQuery.error ? ( -

- {groupsQuery.error.message} -

- ) : null} + + ))} + + + {groupsQuery.isLoading ? ( + + ) : table.getRowModel().rows.length ? ( + table.getRowModel().rows.map((row) => ( + + {row.getVisibleCells().map((cell) => ( + + {flexRender( + cell.column.columnDef.cell, + cell.getContext(), + )} + + ))} + + )) + ) : ( + + + + + + + + } + title="No groups yet" + description="Create a board group to increase cross-board visibility for agents." + actionHref="/board-groups/new" + actionLabel="Create your first group" + /> + )} + +
-
-
+ + {groupsQuery.error ? ( +

{groupsQuery.error.message}

+ ) : null} + { @@ -324,6 +299,6 @@ export default function BoardGroupsPage() { -
+ ); } diff --git a/frontend/src/app/boards/page.tsx b/frontend/src/app/boards/page.tsx index b6e67721..0e30bf23 100644 --- a/frontend/src/app/boards/page.tsx +++ b/frontend/src/app/boards/page.tsx @@ -5,7 +5,7 @@ export const dynamic = "force-dynamic"; import { useMemo, useState } from "react"; import Link from "next/link"; -import { SignedIn, SignedOut, useAuth } from "@/auth/clerk"; +import { useAuth } from "@/auth/clerk"; import { type ColumnDef, flexRender, @@ -28,8 +28,7 @@ import { import { formatTimestamp } from "@/lib/formatters"; import { useOrganizationMembership } from "@/lib/use-organization-membership"; import type { BoardGroupRead, BoardRead } from "@/api/generated/model"; -import { DashboardSidebar } from "@/components/organisms/DashboardSidebar"; -import { DashboardShell } from "@/components/templates/DashboardShell"; +import { DashboardPageLayout } from "@/components/templates/DashboardPageLayout"; import { Button, buttonVariants } from "@/components/ui/button"; import { Dialog, @@ -39,7 +38,6 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; -import { SignedOutPanel } from "@/components/auth/SignedOutPanel"; import { TableEmptyStateRow, TableLoadingRow } from "@/components/ui/table-state"; const compactId = (value: string) => @@ -228,125 +226,102 @@ export default function BoardsPage() { }); return ( - - - - - - -
-
-
-
-
-

- Boards -

-

- Manage boards and task workflows. {boards.length} board - {boards.length === 1 ? "" : "s"} total. -

-
- {boards.length > 0 && isAdmin ? ( - - Create board - - ) : null} -
-
-
- -
-
-
- - - {table.getHeaderGroups().map((headerGroup) => ( - - {headerGroup.headers.map((header) => ( - - ))} - + <> + 0 && isAdmin ? ( + + Create board + + ) : null + } + stickyHeader + > +
+
+
- {header.isPlaceholder - ? null - : flexRender( - header.column.columnDef.header, - header.getContext(), - )} -
+ + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => ( + ))} - - - {boardsQuery.isLoading ? ( - - ) : table.getRowModel().rows.length ? ( - table.getRowModel().rows.map((row) => ( - - {row.getVisibleCells().map((cell) => ( - - ))} - - )) - ) : ( - - - - - - - } - title="No boards yet" - description="Create your first board to start routing tasks and monitoring work across agents." - actionHref="/boards/new" - actionLabel="Create your first board" - /> - )} - -
+ {header.isPlaceholder + ? null + : flexRender( + header.column.columnDef.header, + header.getContext(), + )} +
- {flexRender( - cell.column.columnDef.cell, - cell.getContext(), - )} -
-
-
- - {boardsQuery.error ? ( -

- {boardsQuery.error.message} -

- ) : null} + + ))} + + + {boardsQuery.isLoading ? ( + + ) : table.getRowModel().rows.length ? ( + table.getRowModel().rows.map((row) => ( + + {row.getVisibleCells().map((cell) => ( + + {flexRender( + cell.column.columnDef.cell, + cell.getContext(), + )} + + ))} + + )) + ) : ( + + + + + + + } + title="No boards yet" + description="Create your first board to start routing tasks and monitoring work across agents." + actionHref="/boards/new" + actionLabel="Create your first board" + /> + )} + +
-
-
+ + {boardsQuery.error ? ( +

{boardsQuery.error.message}

+ ) : null} + { @@ -378,6 +353,6 @@ export default function BoardsPage() { -
+ ); }