From 2b51f965501cf6137d04571beeee539f6d3fc684 Mon Sep 17 00:00:00 2001 From: bkellam Date: Sat, 25 Oct 2025 14:25:44 -0400 Subject: [PATCH] fix build --- .../web/src/app/[domain]/repos/columns.tsx | 208 ------------------ 1 file changed, 208 deletions(-) delete mode 100644 packages/web/src/app/[domain]/repos/columns.tsx diff --git a/packages/web/src/app/[domain]/repos/columns.tsx b/packages/web/src/app/[domain]/repos/columns.tsx deleted file mode 100644 index 7d617cda..00000000 --- a/packages/web/src/app/[domain]/repos/columns.tsx +++ /dev/null @@ -1,208 +0,0 @@ -"use client" - -import { Button } from "@/components/ui/button" -import type { ColumnDef } from "@tanstack/react-table" -import { ArrowUpDown, Clock, Loader2, CheckCircle2, Check, ListFilter } from "lucide-react" -import Image from "next/image" -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" -import { cn, getRepoImageSrc } from "@/lib/utils" -import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu" -import Link from "next/link" -import { getBrowsePath } from "../browse/hooks/utils" - -export type RepoStatus = 'syncing' | 'indexed' | 'not-indexed'; - -export type RepositoryColumnInfo = { - repoId: number - repoName: string; - repoDisplayName: string - imageUrl?: string - status: RepoStatus - lastIndexed: string -} - -const statusLabels: Record = { - 'syncing': "Syncing", - 'indexed': "Indexed", - 'not-indexed': "Pending", -}; - -const StatusIndicator = ({ status }: { status: RepoStatus }) => { - let icon = null - let description = "" - let className = "" - - switch (status) { - case 'syncing': - icon = - description = "Repository is currently syncing" - className = "text-blue-600 bg-blue-50 dark:bg-blue-900/20 dark:text-blue-400" - break - case 'indexed': - icon = - description = "Repository has been successfully indexed and is up to date" - className = "text-green-600 bg-green-50 dark:bg-green-900/20 dark:text-green-400" - break - case 'not-indexed': - icon = - description = "Repository is pending initial sync" - className = "text-yellow-600 bg-yellow-50 dark:bg-yellow-900/20 dark:text-yellow-400" - break - } - - return ( - - - -
- {icon} - {statusLabels[status]} -
-
- -

{description}

-
-
-
- ) -} - -export const columns = (domain: string): ColumnDef[] => [ - { - accessorKey: "repoDisplayName", - header: 'Repository', - size: 500, - cell: ({ row: { original: { repoId, repoName, repoDisplayName, imageUrl } } }) => { - return ( -
-
- {imageUrl ? ( - {`${repoDisplayName} - ) : ( -
- {repoDisplayName.charAt(0)} -
- )} -
-
- - {repoDisplayName.length > 40 ? `${repoDisplayName.slice(0, 40)}...` : repoDisplayName} - -
-
- ) - }, - }, - { - accessorKey: "status", - size: 150, - header: ({ column }) => { - const uniqueLabels = Object.values(statusLabels); - const currentFilter = column.getFilterValue() as string | undefined; - - return ( -
- - - - - - column.setFilterValue(undefined)}> - - All - - {uniqueLabels.map((label) => ( - column.setFilterValue(label)}> - - {label} - - ))} - - -
- ) - }, - cell: ({ row }) => { - return - }, - filterFn: (row, id, value) => { - if (value === undefined) return true; - - const status = row.getValue(id) as RepoStatus; - return statusLabels[status] === value; - }, - }, - { - accessorKey: "lastIndexed", - size: 150, - header: ({ column }) => ( -
- -
- ), - cell: ({ row }) => { - if (!row.original.lastIndexed) { - return
Never
; - } - const date = new Date(row.original.lastIndexed) - return ( -
-
- {date.toLocaleDateString("en-US", { - month: "short", - day: "numeric", - year: "numeric", - })} -
-
- {date - .toLocaleTimeString("en-US", { - hour: "2-digit", - minute: "2-digit", - hour12: false, - }) - .toLowerCase()} -
-
- ) - }, - }, -]