@burdenoff/microfe-planmagnet 2026.930.7 → 2026.930.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/planmagnet/board/BoardViewBar.d.ts +27 -0
- package/dist/planmagnet/board/BoardViewBar.d.ts.map +1 -0
- package/dist/planmagnet/board/BoardViewBar.js +684 -0
- package/dist/planmagnet/board/BoardViewBar.js.map +1 -0
- package/dist/planmagnet/board/ProjectBoard.d.ts.map +1 -1
- package/dist/planmagnet/board/ProjectBoard.js +440 -345
- package/dist/planmagnet/board/ProjectBoard.js.map +1 -1
- package/dist/planmagnet/board/boardViewConfig.d.ts +144 -0
- package/dist/planmagnet/board/boardViewConfig.d.ts.map +1 -0
- package/dist/planmagnet/board/boardViewConfig.js +265 -0
- package/dist/planmagnet/board/boardViewConfig.js.map +1 -0
- package/dist/planmagnet/controls/ConfirmButton.d.ts +3 -1
- package/dist/planmagnet/controls/ConfirmButton.d.ts.map +1 -1
- package/dist/planmagnet/controls/ConfirmButton.js +2 -1
- package/dist/planmagnet/controls/ConfirmButton.js.map +1 -1
- package/dist/planmagnet/milestones/MilestoneControls.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectBoard.js","names":[],"sources":["../../../src/planmagnet/board/ProjectBoard.tsx"],"sourcesContent":["import { createContext, useContext, useState, type ReactNode } from 'react';\nimport { gql } from '@apollo/client';\nimport { useApolloClient, useMutation, useQuery } from '@apollo/client/react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n Button,\n Card,\n CardContent,\n Input,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogDescription,\n ResponsiveDialogFooter,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { ChevronLeft, ChevronRight, LayoutGrid, Pencil, Plus } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { PersonName } from '../people/People';\nimport { throwOnError } from '../utils/mutationResult';\nimport {\n type ProjectWorkflow,\n allowedTargets,\n useProjectWorkflow,\n workflowLabel,\n} from '../hooks/useProjectWorkflow';\nimport { BulkActionsBar } from './BulkActions';\n\n/**\n * A project's board (P1.2). The server owns placement: each column's `cards`\n * follow the rule in wspace-planmagnet-svc board.service.ts `columnCardsWhere`\n * (placed column, else the first column mapped to the item's status), and\n * `unplacedCount` says how many items are on no column. Moving a card into a\n * column mapped to a status changes that status on the server, and a column's\n * WIP limit is enforced there too. This component only draws and asks.\n */\n\nconst STATUSES = [\n 'BACKLOG',\n 'TODO',\n 'IN_PROGRESS',\n 'IN_REVIEW',\n 'TESTING',\n 'DONE',\n 'CANCELLED',\n] as const;\n/** The project's workflow for everything drawn on its board (BOFF-8043): status names and allowed moves. */\nconst BoardWorkflow = createContext<ProjectWorkflow | null>(null);\nconst useStatusName = () => {\n const workflow = useContext(BoardWorkflow);\n return (status: string) => workflowLabel(workflow, status);\n};\n\nconst statusLabel = (status: string) =>\n status.charAt(0) + status.slice(1).toLowerCase().replace(/_/g, ' ');\n\nconst CARDS_PER_COLUMN = 100;\n\nconst BOARDS = gql`\n query ProjectBoards($workspaceId: ID!, $projectId: String) {\n planmagnetBoards(\n workspaceId: $workspaceId\n filter: { projectId: $projectId }\n pagination: { first: 20 }\n ) {\n items {\n id\n name\n isDefault\n }\n }\n }\n`;\n\n/** The next page of one column (P1.2: a column shows 100 cards and used to say only \"+N more\"). */\nconst COLUMN_PAGE = gql`\n query ProjectBoardColumnPage($boardId: ID!, $columnId: ID!, $after: String) {\n planmagnetBoardColumnCards(\n boardId: $boardId\n columnId: $columnId\n pagination: { first: 100, after: $after }\n ) {\n pageInfo {\n hasNextPage\n endCursor\n }\n items {\n id\n key\n title\n status\n priority\n storyPoints\n assigneeId\n statusSince\n }\n }\n }\n`;\n\nconst BOARD = gql`\n query ProjectBoard($id: ID!) {\n planmagnetBoard(id: $id) {\n id\n name\n unplacedCount\n columns {\n id\n name\n mappedStatus\n wipLimit\n sortOrder\n cards(pagination: { first: 100 }) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n items {\n id\n key\n title\n status\n priority\n storyPoints\n assigneeId\n statusSince\n }\n }\n }\n }\n }\n`;\n\nconst MOVE_CARD = gql`\n mutation ProjectBoardMoveCard($boardId: ID!, $input: PlanmagnetMoveCardInput!) {\n planmagnetMoveCard(boardId: $boardId, input: $input) {\n id\n }\n }\n`;\nconst CREATE_BOARD = gql`\n mutation ProjectBoardCreate($input: PlanmagnetCreateBoardInput!) {\n planmagnetCreateBoard(input: $input) {\n id\n }\n }\n`;\nconst CREATE_COLUMN = gql`\n mutation ProjectBoardCreateColumn($input: PlanmagnetCreateBoardColumnInput!) {\n planmagnetCreateBoardColumn(input: $input) {\n id\n }\n }\n`;\nconst UPDATE_COLUMN = gql`\n mutation ProjectBoardUpdateColumn($id: ID!, $input: PlanmagnetUpdateBoardColumnInput!) {\n planmagnetUpdateBoardColumn(id: $id, input: $input) {\n id\n }\n }\n`;\nconst DELETE_COLUMN = gql`\n mutation ProjectBoardDeleteColumn($id: ID!) {\n planmagnetDeleteBoardColumn(id: $id)\n }\n`;\nconst REORDER_COLUMNS = gql`\n mutation ProjectBoardReorder($boardId: ID!, $input: PlanmagnetReorderColumnsInput!) {\n planmagnetReorderColumns(boardId: $boardId, input: $input) {\n id\n }\n }\n`;\n\n/** Every query whose numbers a board change can move. */\nconst REFETCH = [\n 'ProjectBoard',\n 'ProjectBoards',\n 'GetWorkItems',\n 'GetWorkItemCounts',\n 'GetDashboardData',\n];\n\ninterface BoardCard {\n id: string;\n key: string;\n title: string;\n status: string;\n priority: string;\n storyPoints: number | null;\n assigneeId: string | null;\n /** When it entered its current status; null when unknown (changed by a path that records no history). */\n statusSince: string | null;\n}\n\ninterface PageInfo {\n hasNextPage: boolean;\n endCursor: string | null;\n}\n\ninterface BoardColumn {\n id: string;\n name: string;\n mappedStatus: string | null;\n wipLimit: number | null;\n sortOrder: number;\n cards: { totalCount: number; pageInfo: PageInfo; items: BoardCard[] };\n}\n\ntype LaneBy = 'none' | 'assignee' | 'priority';\nconst PRIORITY_ORDER = ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'NONE'];\nconst DAY_MS = 86_400_000;\n\n/** Whole days in the current status, or null when unknown. */\nexport function daysInStatus(statusSince: string | null, now: number): number | null {\n if (!statusSince) return null;\n return Math.max(0, Math.floor((now - new Date(statusSince).getTime()) / DAY_MS));\n}\n\n/** Card aging: quiet under a week, a warning from 7 days, stronger from 14. Semantic tokens only. */\nfunction ageClass(days: number): string {\n if (days >= 14) return 'text-destructive font-medium';\n if (days >= 7) return 'text-status-warning-text';\n return 'text-muted-foreground';\n}\n\nfunction laneOf(card: BoardCard, by: LaneBy): string {\n if (by === 'assignee') return card.assigneeId ?? '';\n if (by === 'priority') return card.priority || 'NONE';\n return '';\n}\n\ninterface BoardData {\n id: string;\n name: string;\n unplacedCount: number;\n columns: BoardColumn[];\n}\n\nconst messageOf = (e: unknown, fallback: string) => (e instanceof Error ? e.message : fallback);\n\nfunction ErrorLine({ message }: { message: string }) {\n return (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {message}\n </p>\n );\n}\n\nexport function ProjectBoard({\n projectId,\n projectName,\n}: {\n projectId: string;\n projectName: string;\n}) {\n const { workspaceId } = usePlanMagnet();\n const client = useApolloClient();\n const [chosenBoardId, setChosenBoardId] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n // Card age is read against the moment the board opened (Date.now() may not run during render).\n const [now] = useState(() => Date.now());\n const [laneBy, setLaneBy] = useState<LaneBy>('none');\n // Pages loaded past each column's first 100, keyed by the board data they extend: a refetch starts over.\n const [more, setMore] = useState<{\n key: unknown;\n byColumn: Record<string, { items: BoardCard[]; pageInfo: PageInfo }>;\n }>({\n key: null,\n byColumn: {},\n });\n const [loadingMore, setLoadingMore] = useState<string | null>(null);\n // Bulk update (BOFF-8047): ids of the cards currently checked, across every column/lane.\n const [selected, setSelected] = useState<Set<string>>(new Set());\n const toggleSelect = (workItemId: string) =>\n setSelected((prev) => {\n const next = new Set(prev);\n if (next.has(workItemId)) next.delete(workItemId);\n else next.add(workItemId);\n return next;\n });\n const clearSelection = () => setSelected(new Set());\n const workflow = useProjectWorkflow(projectId);\n\n const { data: boardsData, loading: boardsLoading } = useQuery<{\n planmagnetBoards: { items: Array<{ id: string; name: string; isDefault: boolean }> };\n }>(BOARDS, { variables: { workspaceId, projectId }, skip: !workspaceId });\n const boards = boardsData?.planmagnetBoards.items ?? [];\n const boardId =\n (chosenBoardId && boards.some((b) => b.id === chosenBoardId) ? chosenBoardId : null) ??\n boards.find((b) => b.isDefault)?.id ??\n boards[0]?.id ??\n null;\n // A selection only makes sense on the board it was made on: switching boards (or projects, which changes\n // `boardId` too) drops it, the same \"derive during render\" pattern `more` below uses for its own reset.\n const [selectionBoardId, setSelectionBoardId] = useState(boardId);\n if (selectionBoardId !== boardId) {\n setSelectionBoardId(boardId);\n setSelected(new Set());\n }\n\n const { data, loading } = useQuery<{ planmagnetBoard: BoardData | null }>(BOARD, {\n variables: { id: boardId },\n skip: !boardId,\n });\n const board = data?.planmagnetBoard ?? null;\n const extra = more.key === board ? more.byColumn : {};\n /** A column with every page loaded so far. */\n const cardsOf = (column: BoardColumn) => {\n const loaded = extra[column.id];\n return {\n items: loaded ? [...column.cards.items, ...loaded.items] : column.cards.items,\n pageInfo: loaded ? loaded.pageInfo : column.cards.pageInfo,\n totalCount: column.cards.totalCount,\n };\n };\n const loadMore = async (column: BoardColumn) => {\n const cursor = cardsOf(column).pageInfo.endCursor;\n if (!board || !cursor) return;\n setError(null);\n setLoadingMore(column.id);\n try {\n const res = await client.query<{\n planmagnetBoardColumnCards: { pageInfo: PageInfo; items: BoardCard[] };\n }>({\n query: COLUMN_PAGE,\n variables: { boardId: board.id, columnId: column.id, after: cursor },\n fetchPolicy: 'network-only',\n });\n const page = res.data?.planmagnetBoardColumnCards;\n if (!page) throw new Error(res.error?.message ?? 'The next cards could not be loaded.');\n const prior = extra[column.id]?.items ?? [];\n setMore({\n key: board,\n byColumn: {\n ...extra,\n [column.id]: { items: [...prior, ...page.items], pageInfo: page.pageInfo },\n },\n });\n } catch (e) {\n setError(messageOf(e, 'The next cards could not be loaded.'));\n } finally {\n setLoadingMore(null);\n }\n };\n\n const [createBoard, createBoardState] = useMutation<{ planmagnetCreateBoard: { id: string } }>(\n CREATE_BOARD,\n { refetchQueries: REFETCH, awaitRefetchQueries: true }\n );\n const [moveCard, moveState] = useMutation(MOVE_CARD, {\n refetchQueries: REFETCH,\n awaitRefetchQueries: true,\n });\n const [reorder] = useMutation(REORDER_COLUMNS, {\n refetchQueries: REFETCH,\n awaitRefetchQueries: true,\n });\n\n const run = async (action: () => Promise<{ error?: unknown }>, fallback: string) => {\n setError(null);\n try {\n await throwOnError(action());\n } catch (e) {\n setError(messageOf(e, fallback));\n }\n };\n\n const move = (workItemId: string, targetColumnId: string) =>\n run(\n () => moveCard({ variables: { boardId, input: { workItemId, targetColumnId } } }),\n 'The card could not be moved.'\n );\n\n const shiftColumn = (index: number, delta: -1 | 1) => {\n if (!board) return;\n const order = board.columns.map((c) => c.id);\n const target = index + delta;\n if (target < 0 || target >= order.length) return;\n [order[index], order[target]] = [order[target], order[index]];\n return run(\n () => reorder({ variables: { boardId, input: { columnIds: order } } }),\n 'The columns could not be reordered.'\n );\n };\n\n if (boardsLoading && !boardsData) {\n return <p className=\"text-sm text-muted-foreground p-4\">Loading board…</p>;\n }\n\n if (!boardId) {\n return (\n <Card>\n <CardContent className=\"p-8 text-center space-y-3\" data-testid=\"board-empty\">\n <LayoutGrid className=\"h-8 w-8 mx-auto text-muted-foreground\" />\n <p className=\"text-sm text-muted-foreground\">{projectName} has no board yet.</p>\n <Button\n size=\"sm\"\n disabled={createBoardState.loading}\n onClick={() =>\n run(\n () =>\n createBoard({\n variables: {\n input: {\n projectId,\n name: `${projectName} board`,\n type: 'KANBAN',\n isDefault: true,\n withDefaultColumns: true,\n },\n },\n }),\n 'The board could not be created.'\n )\n }\n >\n <Plus className=\"mr-1 h-4 w-4\" />\n {createBoardState.loading ? 'Creating…' : 'Create board'}\n </Button>\n <p className=\"text-xs text-muted-foreground\">\n Starts with one column per status: Backlog, To Do, In Progress, In Review, Testing,\n Done.\n </p>\n {error && <ErrorLine message={error} />}\n </CardContent>\n </Card>\n );\n }\n\n return (\n <BoardWorkflow.Provider value={workflow}>\n <div className=\"space-y-3\" data-testid=\"project-board\">\n <div className=\"flex flex-wrap items-center gap-3\">\n {boards.length > 1 && (\n <select\n aria-label=\"Board\"\n className=\"rounded-md border border-input bg-background px-2 py-1 text-sm\"\n value={boardId}\n onChange={(e) => setChosenBoardId(e.target.value)}\n >\n {boards.map((b) => (\n <option key={b.id} value={b.id}>\n {b.name}\n </option>\n ))}\n </select>\n )}\n {board && (\n <label className=\"flex items-center gap-1 text-sm\">\n <span className=\"text-muted-foreground\">Swimlanes</span>\n <select\n aria-label=\"Swimlanes\"\n data-testid=\"board-lanes\"\n className=\"rounded-md border border-input bg-background px-2 py-1 text-sm\"\n value={laneBy}\n onChange={(e) => setLaneBy(e.target.value as LaneBy)}\n >\n <option value=\"none\">None</option>\n <option value=\"assignee\">By assignee</option>\n <option value=\"priority\">By priority</option>\n </select>\n </label>\n )}\n {board && board.unplacedCount > 0 && (\n <p className=\"text-xs text-muted-foreground\" data-testid=\"board-unplaced\">\n {board.unplacedCount} work item{board.unplacedCount === 1 ? ' is' : 's are'} not on\n this board: {board.unplacedCount === 1 ? 'its status has' : 'their status has'} no\n column.\n </p>\n )}\n {board && (\n <div className=\"ml-auto\">\n <ColumnDialog boardId={board.id} />\n </div>\n )}\n </div>\n {error && <ErrorLine message={error} />}\n {/* Bulk update (BOFF-8047): appears once at least one card is checked, disappears once the selection\n is cleared — it never blanks mid-action since a successful apply leaves the selection in place. */}\n {board && selected.size > 0 && (\n <BulkActionsBar\n projectId={projectId}\n selectedIds={[...selected]}\n workflow={workflow}\n onDone={clearSelection}\n />\n )}\n {loading && !board ? (\n <p className=\"text-sm text-muted-foreground p-4\">Loading board…</p>\n ) : board && laneBy !== 'none' ? (\n <SwimlaneBoard\n board={board}\n laneBy={laneBy}\n cardsOf={cardsOf}\n now={now}\n busy={moveState.loading}\n loadingMore={loadingMore}\n selected={selected}\n onToggleSelect={toggleSelect}\n onLoadMore={(column) => void loadMore(column)}\n onMove={move}\n />\n ) : (\n <div className=\"flex gap-3 overflow-x-auto pb-2\">\n {board?.columns.map((column, index) => (\n <BoardColumnView\n key={column.id}\n boardId={board.id}\n column={column}\n columns={board.columns}\n cards={cardsOf(column)}\n isFirst={index === 0}\n isLast={index === board.columns.length - 1}\n busy={moveState.loading}\n now={now}\n loadingMore={loadingMore === column.id}\n selected={selected}\n onToggleSelect={toggleSelect}\n onLoadMore={() => void loadMore(column)}\n onMove={move}\n onShift={(delta) => shiftColumn(index, delta)}\n />\n ))}\n {board && board.columns.length === 0 && (\n <p className=\"text-sm text-muted-foreground p-4\">\n This board has no columns. Add one to start placing work.\n </p>\n )}\n </div>\n )}\n </div>\n </BoardWorkflow.Provider>\n );\n}\n\ntype ColumnCards = { items: BoardCard[]; pageInfo: PageInfo; totalCount: number };\n\n/** One card: title, key, points, assignee, age in status, and a keyboard \"Move…\" equal to drag-and-drop. */\nfunction CardView({\n card,\n column,\n columns,\n busy,\n now,\n selected,\n onToggleSelect,\n onMove,\n}: {\n card: BoardCard;\n column: BoardColumn;\n columns: BoardColumn[];\n busy: boolean;\n now: number;\n selected: boolean;\n onToggleSelect: (workItemId: string) => void;\n onMove: (workItemId: string, targetColumnId: string) => void;\n}) {\n const navigate = usePlanMagnetNavigate();\n const workflow = useContext(BoardWorkflow);\n const days = daysInStatus(card.statusSince, now);\n // Only columns this card may move into: unmapped ones (no status change) and those whose status the workflow allows.\n const reachable = allowedTargets(workflow, card.status, STATUSES);\n const targets = columns.filter(\n (c) => c.id !== column.id && (!c.mappedStatus || reachable.includes(c.mappedStatus))\n );\n return (\n <li\n draggable\n onDragStart={(e) => {\n e.dataTransfer.setData('text/plain', card.id);\n e.dataTransfer.effectAllowed = 'move';\n }}\n className={`rounded-md border bg-background p-2 space-y-1 cursor-grab ${selected ? 'ring-2 ring-primary' : ''}`}\n data-testid=\"board-card\"\n >\n <div className=\"flex items-start gap-1.5\">\n {/* Bulk update (BOFF-8047): checking a card adds it to the selection the bulk action bar acts on.\n The `<li>` above is `draggable` for card drag-and-drop; a native drag source is resolved by\n walking UP from wherever the mouse/pointer went down, so without this the checkbox's own\n mousedown would still be picked up as \"drag the card\" instead of toggling the box. Stop that\n gesture (and any stray dragstart/click bubbling) at the checkbox itself; every other pointer\n in the card is untouched, so dragging the card from anywhere else still works. */}\n <input\n type=\"checkbox\"\n className=\"mt-0.5 shrink-0\"\n aria-label={`Select ${card.key}`}\n data-testid=\"board-card-select\"\n checked={selected}\n draggable={false}\n onMouseDown={(e) => e.stopPropagation()}\n onPointerDown={(e) => e.stopPropagation()}\n onDragStart={(e) => e.stopPropagation()}\n onClick={(e) => e.stopPropagation()}\n onChange={() => onToggleSelect(card.id)}\n />\n <button\n type=\"button\"\n className=\"text-left text-sm font-medium leading-tight hover:underline\"\n onClick={() => navigate(`/tasks/task-detail-page?taskId=${encodeURIComponent(card.id)}`)}\n >\n {card.title}\n </button>\n </div>\n <div className=\"flex items-center justify-between text-[11px] text-muted-foreground\">\n <span>{card.key}</span>\n {/* Card aging (P1.2): how long it has had this status. Unknown when its status changed off the record. */}\n {days !== null && (\n <span\n data-testid=\"card-age\"\n className={ageClass(days)}\n title={`In ${workflowLabel(workflow, card.status)} since ${new Date(card.statusSince ?? '').toLocaleDateString()}`}\n >\n {days === 0 ? 'today' : `${days}d in status`}\n </span>\n )}\n <span>{card.storyPoints ?? 0} pts</span>\n </div>\n <div className=\"flex items-center justify-between gap-1 text-[11px] text-muted-foreground\">\n <span className=\"truncate\">\n {card.assigneeId ? <PersonName id={card.assigneeId} /> : 'Unassigned'}\n </span>\n {/* The same move as drag-and-drop, for keyboard and assistive tech. */}\n <select\n aria-label={`Move ${card.key} to column`}\n className=\"rounded border border-input bg-background px-1 py-0.5 text-[11px]\"\n value=\"\"\n disabled={busy}\n onChange={(e) => e.target.value && onMove(card.id, e.target.value)}\n >\n <option value=\"\">Move…</option>\n {targets.map((c) => (\n <option key={c.id} value={c.id}>\n {c.name}\n </option>\n ))}\n </select>\n </div>\n </li>\n );\n}\n\n/** A drop target: dropping a card here moves it into `column`. */\nfunction DropZone({\n column,\n onMove,\n className,\n children,\n label,\n}: {\n column: BoardColumn;\n onMove: (workItemId: string, targetColumnId: string) => void;\n className: string;\n children: ReactNode;\n label: string;\n}) {\n const [dragOver, setDragOver] = useState(false);\n return (\n <section\n aria-label={label}\n className={`${className} ${dragOver ? 'ring-2 ring-primary' : ''}`}\n onDragOver={(e) => {\n e.preventDefault();\n setDragOver(true);\n }}\n onDragLeave={() => setDragOver(false)}\n onDrop={(e) => {\n e.preventDefault();\n setDragOver(false);\n const workItemId = e.dataTransfer.getData('text/plain');\n if (workItemId) onMove(workItemId, column.id);\n }}\n >\n {children}\n </section>\n );\n}\n\n/** \"Showing N of M — Show more\" for a column with cards past the ones loaded. */\nfunction MoreCards({\n cards,\n loading,\n onLoadMore,\n}: {\n cards: ColumnCards;\n loading: boolean;\n onLoadMore: () => void;\n}) {\n const hidden = cards.totalCount - cards.items.length;\n if (hidden <= 0 || !cards.pageInfo.hasNextPage) return null;\n return (\n <div className=\"px-2 pb-2 space-y-1\">\n <p className=\"text-xs text-muted-foreground\">\n Showing {cards.items.length} of {cards.totalCount}\n </p>\n <Button\n size=\"sm\"\n variant=\"outline\"\n className=\"w-full\"\n data-testid=\"board-column-more\"\n disabled={loading}\n onClick={onLoadMore}\n >\n {loading ? 'Loading…' : `Show ${Math.min(hidden, CARDS_PER_COLUMN)} more`}\n </Button>\n </div>\n );\n}\n\n/**\n * Swimlanes (P1.2): rows by assignee or priority across the same columns. Moving a card changes its column (and the\n * status that column sets); its lane follows its assignee or priority, which are changed on the card itself.\n */\nfunction SwimlaneBoard({\n board,\n laneBy,\n cardsOf,\n now,\n busy,\n loadingMore,\n selected,\n onToggleSelect,\n onLoadMore,\n onMove,\n}: {\n board: BoardData;\n laneBy: LaneBy;\n cardsOf: (column: BoardColumn) => ColumnCards;\n now: number;\n busy: boolean;\n loadingMore: string | null;\n selected: Set<string>;\n onToggleSelect: (workItemId: string) => void;\n onLoadMore: (column: BoardColumn) => void;\n onMove: (workItemId: string, targetColumnId: string) => void;\n}) {\n const perColumn = board.columns.map((column) => ({ column, cards: cardsOf(column) }));\n const lanes = [\n ...new Set(perColumn.flatMap(({ cards }) => cards.items.map((c) => laneOf(c, laneBy)))),\n ].sort((a, b) =>\n laneBy === 'priority'\n ? PRIORITY_ORDER.indexOf(a) - PRIORITY_ORDER.indexOf(b)\n : a === ''\n ? 1\n : b === ''\n ? -1\n : a.localeCompare(b)\n );\n const laneName = (lane: string) =>\n laneBy === 'priority' ? statusLabel(lane) : lane ? <PersonName id={lane} /> : 'Unassigned';\n return (\n <div className=\"overflow-x-auto pb-2 space-y-3\" data-testid=\"board-swimlanes\">\n <p className=\"text-xs text-muted-foreground\">\n Dragging moves a card between columns. Its lane follows its{' '}\n {laneBy === 'priority' ? 'priority' : 'assignee'}.\n </p>\n <div className=\"flex gap-3\">\n {perColumn.map(({ column, cards }) => (\n <div key={column.id} className=\"min-w-[240px] w-[240px] shrink-0 px-2\">\n <h3 className=\"text-sm font-medium truncate\">\n {column.name}{' '}\n <span className=\"text-xs text-muted-foreground\">\n {column.wipLimit ? `${cards.totalCount} / ${column.wipLimit}` : cards.totalCount}\n </span>\n </h3>\n </div>\n ))}\n </div>\n {lanes.length === 0 && (\n <p className=\"text-sm text-muted-foreground p-4\">No cards on this board yet.</p>\n )}\n {lanes.map((lane) => (\n <div key={lane || 'none'} data-testid=\"board-lane\" className=\"space-y-1\">\n <p className=\"text-xs font-medium\">\n {laneName(lane)}{' '}\n <span className=\"text-muted-foreground\">\n (\n {perColumn.reduce(\n (n, { cards }) => n + cards.items.filter((c) => laneOf(c, laneBy) === lane).length,\n 0\n )}\n )\n </span>\n </p>\n <div className=\"flex gap-3\">\n {perColumn.map(({ column, cards }) => (\n <DropZone\n key={column.id}\n column={column}\n onMove={onMove}\n label={`${column.name} column`}\n className=\"min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30\"\n >\n <ul className=\"p-2 space-y-2 min-h-[48px]\">\n {cards.items\n .filter((c) => laneOf(c, laneBy) === lane)\n .map((card) => (\n <CardView\n key={card.id}\n card={card}\n column={column}\n columns={board.columns}\n busy={busy}\n now={now}\n selected={selected.has(card.id)}\n onToggleSelect={onToggleSelect}\n onMove={onMove}\n />\n ))}\n </ul>\n </DropZone>\n ))}\n </div>\n </div>\n ))}\n <div className=\"flex gap-3\">\n {perColumn.map(({ column, cards }) => (\n <div key={column.id} className=\"min-w-[240px] w-[240px] shrink-0\">\n <MoreCards\n cards={cards}\n loading={loadingMore === column.id}\n onLoadMore={() => onLoadMore(column)}\n />\n </div>\n ))}\n </div>\n </div>\n );\n}\n\nfunction BoardColumnView({\n boardId,\n column,\n columns,\n cards,\n isFirst,\n isLast,\n busy,\n now,\n loadingMore,\n selected,\n onToggleSelect,\n onLoadMore,\n onMove,\n onShift,\n}: {\n boardId: string;\n column: BoardColumn;\n columns: BoardColumn[];\n cards: ColumnCards;\n isFirst: boolean;\n isLast: boolean;\n busy: boolean;\n now: number;\n loadingMore: boolean;\n selected: Set<string>;\n onToggleSelect: (workItemId: string) => void;\n onLoadMore: () => void;\n onMove: (workItemId: string, targetColumnId: string) => void;\n onShift: (delta: -1 | 1) => void;\n}) {\n const count = cards.totalCount;\n const atLimit = column.wipLimit != null && column.wipLimit > 0 && count >= column.wipLimit;\n const statusName = useStatusName();\n\n return (\n <DropZone\n column={column}\n onMove={onMove}\n label={`${column.name} column`}\n className=\"min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30\"\n >\n <div data-testid={`board-column-${column.name}`}>\n <header className=\"p-2 border-b space-y-1\">\n <div className=\"flex items-center justify-between gap-1\">\n <h3 className=\"text-sm font-medium truncate\">{column.name}</h3>\n <span\n data-testid={`board-column-count-${column.name}`}\n className={`text-xs rounded-full px-1.5 ${atLimit ? 'bg-status-warning-subtle text-status-warning' : 'bg-muted'}`}\n title={column.wipLimit ? `WIP limit ${column.wipLimit}` : undefined}\n >\n {column.wipLimit ? `${count} / ${column.wipLimit}` : count}\n </span>\n </div>\n <div className=\"flex items-center justify-between gap-1\">\n <span className=\"text-[11px] text-muted-foreground\">\n {column.mappedStatus\n ? `Sets status: ${statusName(column.mappedStatus)}`\n : 'No status'}\n </span>\n <span className=\"flex\">\n <Button\n size=\"icon\"\n variant=\"ghost\"\n className=\"h-6 w-6\"\n aria-label={`Move ${column.name} column left`}\n disabled={isFirst}\n onClick={() => onShift(-1)}\n >\n <ChevronLeft className=\"h-3.5 w-3.5\" />\n </Button>\n <Button\n size=\"icon\"\n variant=\"ghost\"\n className=\"h-6 w-6\"\n aria-label={`Move ${column.name} column right`}\n disabled={isLast}\n onClick={() => onShift(1)}\n >\n <ChevronRight className=\"h-3.5 w-3.5\" />\n </Button>\n <ColumnDialog boardId={boardId} column={column} />\n </span>\n </div>\n </header>\n <ul className=\"p-2 space-y-2 min-h-[80px]\">\n {cards.items.map((card) => (\n <CardView\n key={card.id}\n card={card}\n column={column}\n columns={columns}\n busy={busy}\n now={now}\n selected={selected.has(card.id)}\n onToggleSelect={onToggleSelect}\n onMove={onMove}\n />\n ))}\n {count === 0 && <li className=\"text-xs text-muted-foreground text-center py-4\">Empty</li>}\n </ul>\n <MoreCards cards={cards} loading={loadingMore} onLoadMore={onLoadMore} />\n </div>\n </DropZone>\n );\n}\n\nfunction ColumnDialog({ boardId, column }: { boardId: string; column?: BoardColumn }) {\n const editing = column !== undefined;\n const statusName = useStatusName();\n const [open, setOpen] = useState(false);\n const [name, setName] = useState(column?.name ?? '');\n const [mappedStatus, setMappedStatus] = useState(column?.mappedStatus ?? '');\n const [wip, setWip] = useState(column?.wipLimit ? String(column.wipLimit) : '');\n const [error, setError] = useState<string | null>(null);\n const options = { refetchQueries: REFETCH, awaitRefetchQueries: true };\n const [create, createState] = useMutation(CREATE_COLUMN, options);\n const [update, updateState] = useMutation(UPDATE_COLUMN, options);\n const [remove, removeState] = useMutation(DELETE_COLUMN, options);\n const busy = createState.loading || updateState.loading || removeState.loading;\n\n const wipValue = wip.trim() === '' ? null : Number(wip);\n const invalidWip = wipValue !== null && (!Number.isInteger(wipValue) || wipValue < 1);\n const canSave = name.trim() !== '' && !invalidWip && !busy;\n\n const reset = () => {\n setName(column?.name ?? '');\n setMappedStatus(column?.mappedStatus ?? '');\n setWip(column?.wipLimit ? String(column.wipLimit) : '');\n setError(null);\n };\n\n const save = async () => {\n setError(null);\n const fields = {\n name: name.trim(),\n mappedStatus: mappedStatus || null,\n wipLimit: wipValue,\n };\n try {\n if (editing) {\n await throwOnError(update({ variables: { id: column.id, input: fields } }));\n } else {\n await throwOnError(\n create({ variables: { input: { boardId, type: 'CUSTOM', ...fields } } })\n );\n }\n setOpen(false);\n } catch (e) {\n setError(messageOf(e, 'The column could not be saved.'));\n }\n };\n\n const idPrefix = editing ? `column-${column.id}` : 'new-column';\n\n return (\n <ResponsiveDialog\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n if (next) reset();\n }}\n >\n <ResponsiveDialogTrigger asChild>\n {editing ? (\n <Button\n size=\"icon\"\n variant=\"ghost\"\n className=\"h-6 w-6\"\n aria-label={`Edit ${column.name} column`}\n >\n <Pencil className=\"h-3.5 w-3.5\" />\n </Button>\n ) : (\n <Button size=\"sm\" variant=\"outline\">\n <Plus className=\"mr-1 h-4 w-4\" />\n Add column\n </Button>\n )}\n </ResponsiveDialogTrigger>\n <ResponsiveDialogContent className=\"max-w-md\">\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>\n {editing ? `Edit ${column.name}` : 'Add column'}\n </ResponsiveDialogTitle>\n <ResponsiveDialogDescription>\n Moving a card into a column that sets a status changes the work item's status.\n </ResponsiveDialogDescription>\n </ResponsiveDialogHeader>\n <div className=\"space-y-3\">\n <div>\n <label htmlFor={`${idPrefix}-name`} className=\"text-sm font-medium\">\n Name\n </label>\n <Input\n id={`${idPrefix}-name`}\n className=\"mt-1\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n />\n </div>\n <div>\n <label htmlFor={`${idPrefix}-status`} className=\"text-sm font-medium\">\n Sets status\n </label>\n <select\n id={`${idPrefix}-status`}\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={mappedStatus}\n onChange={(e) => setMappedStatus(e.target.value)}\n >\n <option value=\"\">No status (cards keep theirs)</option>\n {STATUSES.map((s) => (\n <option key={s} value={s}>\n {statusName(s)}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label htmlFor={`${idPrefix}-wip`} className=\"text-sm font-medium\">\n WIP limit (blank for none)\n </label>\n <Input\n id={`${idPrefix}-wip`}\n type=\"number\"\n min={1}\n className=\"mt-1\"\n value={wip}\n onChange={(e) => setWip(e.target.value)}\n />\n {invalidWip && <ErrorLine message=\"The WIP limit must be a whole number, 1 or more.\" />}\n </div>\n </div>\n {error && <ErrorLine message={error} />}\n <ResponsiveDialogFooter className=\"gap-2\">\n {editing && (\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"outline\" disabled={busy}>\n Delete column\n </Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Delete {column.name}?</AlertDialogTitle>\n <AlertDialogDescription>\n Its cards are not deleted: each goes back to the column for its status, or off\n the board if no column sets that status.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Keep it</AlertDialogCancel>\n <AlertDialogAction\n className=\"bg-destructive text-destructive-foreground hover:bg-destructive/90\"\n onClick={async () => {\n try {\n await throwOnError(remove({ variables: { id: column.id } }));\n setOpen(false);\n } catch (e) {\n setError(messageOf(e, 'The column could not be deleted.'));\n }\n }}\n >\n Delete column\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n )}\n <Button onClick={save} disabled={!canSave} data-testid={`${idPrefix}-save`}>\n {busy ? 'Saving…' : editing ? 'Save' : 'Add column'}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA8CA,IAAM,IAAW;CACf;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAEK,IAAgB,EAAsC,KAAK,EAC3D,UAAsB;CAC1B,IAAM,IAAW,EAAW,EAAc;AAC1C,SAAQ,MAAmB,EAAc,GAAU,EAAO;GAGtD,KAAe,MACnB,EAAO,OAAO,EAAE,GAAG,EAAO,MAAM,EAAE,CAAC,aAAa,CAAC,QAAQ,MAAM,IAAI,EAE/D,IAAmB,KAEnB,KAAS,CAAG;;;;;;;;;;;;;;GAiBZ,IAAc,CAAG;;;;;;;;;;;;;;;;;;;;;;;GAyBjB,IAAQ,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCX,IAAY,CAAG;;;;;;GAOf,IAAe,CAAG;;;;;;GAOlB,IAAgB,CAAG;;;;;;GAOnB,IAAgB,CAAG;;;;;;GAOnB,IAAgB,CAAG;;;;GAKnB,KAAkB,CAAG;;;;;;GASrB,IAAU;CACd;CACA;CACA;CACA;CACA;CACD,EA6BK,IAAiB;CAAC;CAAY;CAAQ;CAAU;CAAO;CAAO,EAC9D,IAAS;AAGf,SAAgB,GAAa,GAA4B,GAA4B;AAEnF,QADK,IACE,KAAK,IAAI,GAAG,KAAK,OAAO,IAAM,IAAI,KAAK,EAAY,CAAC,SAAS,IAAI,EAAO,CAAC,GADvD;;AAK3B,SAA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AK;QACL,WAAU;QACV,OAAO;QACP,WAAW,MAAM,EAAO,EAAE,OAAO,MAAM;QACvC,CAAA;OACD,KAAc,kBAAC,GAAD,EAAW,SAAQ,oDAAqD,CAAA;OACnF,EAAA,CAAA;MACF;;IACL,KAAS,kBAAC,GAAD,EAAW,SAAS,GAAS,CAAA;IACvC,kBAAC,GAAD;KAAwB,WAAU;eAAlC,CACG,KACC,kBAAC,IAAD,EAAA,UAAA,CACE,kBAAC,IAAD;MAAoB,SAAA;gBAClB,kBAAC,GAAD;OAAQ,SAAQ;OAAU,UAAU;iBAAM;OAEjC,CAAA;MACU,CAAA,EACrB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UAAA;MAAkB;MAAQ,EAAO;MAAK;MAAoB,EAAA,CAAA,EAC1D,kBAAC,GAAD,EAAA,UAAwB,2HAGC,CAAA,CACP,EAAA,CAAA,EACpB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,IAAD,EAAA,UAAmB,WAA2B,CAAA,EAC9C,kBAAC,GAAD;MACE,WAAU;MACV,SAAS,YAAY;AACnB,WAAI;AAEF,QADA,MAAM,EAAa,EAAO,EAAE,WAAW,EAAE,IAAI,EAAO,IAAI,EAAE,CAAC,CAAC,EAC5D,EAAQ,GAAM;gBACP,GAAG;AACV,UAAS,EAAU,GAAG,mCAAmC,CAAC;;;gBAG/D;MAEmB,CAAA,CACF,EAAA,CAAA,CACD,EAAA,CAAA,CACT,EAAA,CAAA,EAEhB,kBAAC,GAAD;MAAQ,SAAS;MAAM,UAAU,CAAC;MAAS,eAAa,GAAG,EAAS;gBACjE,IAAO,YAAY,IAAU,SAAS;MAChC,CAAA,CACc;;IACD;KACT"}
|
|
1
|
+
{"version":3,"file":"ProjectBoard.js","names":[],"sources":["../../../src/planmagnet/board/ProjectBoard.tsx"],"sourcesContent":["import { createContext, useContext, useState, type ReactNode } from 'react';\nimport { gql } from '@apollo/client';\nimport { useApolloClient, useMutation, useQuery } from '@apollo/client/react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n Badge,\n Button,\n Card,\n CardContent,\n Input,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogDescription,\n ResponsiveDialogFooter,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { ChevronLeft, ChevronRight, LayoutGrid, Pencil, Plus } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { PersonName } from '../people/People';\nimport { throwOnError } from '../utils/mutationResult';\nimport {\n type ProjectWorkflow,\n allowedTargets,\n useProjectWorkflow,\n workflowLabel,\n} from '../hooks/useProjectWorkflow';\nimport { enumLabel } from '../controls/WorkItemControls';\nimport { useProjectMilestones, type MilestoneOption } from '../milestones/MilestoneControls';\nimport { BulkActionsBar } from './BulkActions';\nimport { BoardViewBar, type AppliedBoardState } from './BoardViewBar';\nimport {\n useProjectSprintOptions,\n type BoardCardField,\n type BoardGroupBy,\n type SprintOption,\n} from './boardViewConfig';\n\n/**\n * A project's board (P1.2). The server owns placement: each column's `cards`\n * follow the rule in wspace-planmagnet-svc board.service.ts `columnCardsWhere`\n * (placed column, else the first column mapped to the item's status), and\n * `unplacedCount` says how many items are on no column. Moving a card into a\n * column mapped to a status changes that status on the server, and a column's\n * WIP limit is enforced there too. This component only draws and asks.\n */\n\nconst STATUSES = [\n 'BACKLOG',\n 'TODO',\n 'IN_PROGRESS',\n 'IN_REVIEW',\n 'TESTING',\n 'DONE',\n 'CANCELLED',\n] as const;\n/** The project's workflow for everything drawn on its board (BOFF-8043): status names and allowed moves. */\nconst BoardWorkflow = createContext<ProjectWorkflow | null>(null);\nconst useStatusName = () => {\n const workflow = useContext(BoardWorkflow);\n return (status: string) => workflowLabel(workflow, status);\n};\n\nconst CARDS_PER_COLUMN = 100;\n\nconst BOARDS = gql`\n query ProjectBoards($workspaceId: ID!, $projectId: String) {\n planmagnetBoards(\n workspaceId: $workspaceId\n filter: { projectId: $projectId }\n pagination: { first: 20 }\n ) {\n items {\n id\n name\n isDefault\n }\n }\n }\n`;\n\n/** Every field a card, its swimlane grouping or its view's visible fields might need — fetched once regardless of\n * which fields a view chooses to show, so toggling \"Fields\" or \"Group by\" never needs a fresh query. */\nconst CARD_FIELDS = `\n id\n key\n title\n status\n type\n priority\n storyPoints\n assigneeId\n statusSince\n dueDate\n labels\n sprintId\n milestoneId\n parentId\n parent {\n id\n title\n }\n`;\n\n/** The next page of one column (P1.2: a column shows 100 cards and used to say only \"+N more\"). `filter`/`sort`\n * are a board view's (PDM-N04): applied server-side, same as the board's own column query below. */\nconst COLUMN_PAGE = gql`\n query ProjectBoardColumnPage(\n $boardId: ID!\n $columnId: ID!\n $after: String\n $filter: PlanmagnetBoardCardFilter\n $sort: PlanmagnetBoardCardSort\n ) {\n planmagnetBoardColumnCards(\n boardId: $boardId\n columnId: $columnId\n pagination: { first: 100, after: $after }\n filter: $filter\n sort: $sort\n ) {\n pageInfo {\n hasNextPage\n endCursor\n }\n items {\n ${CARD_FIELDS}\n }\n }\n }\n`;\n\nconst BOARD = gql`\n query ProjectBoard($id: ID!, $filter: PlanmagnetBoardCardFilter, $sort: PlanmagnetBoardCardSort) {\n planmagnetBoard(id: $id) {\n id\n name\n unplacedCount\n columns {\n id\n name\n mappedStatus\n wipLimit\n sortOrder\n itemCount\n cards(pagination: { first: 100 }, filter: $filter, sort: $sort) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n items {\n ${CARD_FIELDS}\n }\n }\n }\n }\n }\n`;\n\nconst MOVE_CARD = gql`\n mutation ProjectBoardMoveCard($boardId: ID!, $input: PlanmagnetMoveCardInput!) {\n planmagnetMoveCard(boardId: $boardId, input: $input) {\n id\n }\n }\n`;\nconst CREATE_BOARD = gql`\n mutation ProjectBoardCreate($input: PlanmagnetCreateBoardInput!) {\n planmagnetCreateBoard(input: $input) {\n id\n }\n }\n`;\nconst CREATE_COLUMN = gql`\n mutation ProjectBoardCreateColumn($input: PlanmagnetCreateBoardColumnInput!) {\n planmagnetCreateBoardColumn(input: $input) {\n id\n }\n }\n`;\nconst UPDATE_COLUMN = gql`\n mutation ProjectBoardUpdateColumn($id: ID!, $input: PlanmagnetUpdateBoardColumnInput!) {\n planmagnetUpdateBoardColumn(id: $id, input: $input) {\n id\n }\n }\n`;\nconst DELETE_COLUMN = gql`\n mutation ProjectBoardDeleteColumn($id: ID!) {\n planmagnetDeleteBoardColumn(id: $id)\n }\n`;\nconst REORDER_COLUMNS = gql`\n mutation ProjectBoardReorder($boardId: ID!, $input: PlanmagnetReorderColumnsInput!) {\n planmagnetReorderColumns(boardId: $boardId, input: $input) {\n id\n }\n }\n`;\n\n/** Every query whose numbers a board change can move. */\nconst REFETCH = [\n 'ProjectBoard',\n 'ProjectBoards',\n 'GetWorkItems',\n 'GetWorkItemCounts',\n 'GetDashboardData',\n];\n\ninterface BoardCard {\n id: string;\n key: string;\n title: string;\n status: string;\n type: string;\n priority: string;\n storyPoints: number | null;\n assigneeId: string | null;\n /** When it entered its current status; null when unknown (changed by a path that records no history). */\n statusSince: string | null;\n dueDate: string | null;\n labels: string[];\n sprintId: string | null;\n milestoneId: string | null;\n parentId: string | null;\n /** The epic (or other parent) this card belongs to, when it has one — null when its parent was deleted too. */\n parent: { id: string; title: string } | null;\n}\n\ninterface PageInfo {\n hasNextPage: boolean;\n endCursor: string | null;\n}\n\ninterface BoardColumn {\n id: string;\n name: string;\n mappedStatus: string | null;\n wipLimit: number | null;\n sortOrder: number;\n /** Every item in this column, ignoring any view filter — what the WIP limit is measured against. */\n itemCount: number;\n cards: { totalCount: number; pageInfo: PageInfo; items: BoardCard[] };\n}\n\nconst PRIORITY_ORDER = ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'NONE'];\nconst DAY_MS = 86_400_000;\n\n/** Whole days in the current status, or null when unknown. */\nexport function daysInStatus(statusSince: string | null, now: number): number | null {\n if (!statusSince) return null;\n return Math.max(0, Math.floor((now - new Date(statusSince).getTime()) / DAY_MS));\n}\n\n/** Card aging: quiet under a week, a warning from 7 days, stronger from 14. Semantic tokens only. */\nfunction ageClass(days: number): string {\n if (days >= 14) return 'text-destructive font-medium';\n if (days >= 7) return 'text-status-warning-text';\n return 'text-muted-foreground';\n}\n\n/** The swimlane a card falls into for the given group-by — an empty string is the \"(none)\" lane. */\nfunction laneOf(card: BoardCard, groupBy: BoardGroupBy): string {\n switch (groupBy) {\n case 'ASSIGNEE':\n return card.assigneeId ?? '';\n case 'PRIORITY':\n return card.priority || 'NONE';\n case 'TYPE':\n return card.type || '';\n case 'EPIC':\n return card.parentId ?? '';\n case 'SPRINT':\n return card.sprintId ?? '';\n case 'MILESTONE':\n return card.milestoneId ?? '';\n default:\n return '';\n }\n}\n\n/** A friendly name for a lane's own key — resolved from whatever the cards in it already carry, or from the\n * project lookups (sprints, milestones) BoardViewBar already fetches for its filter pickers. */\nfunction laneLabel(\n lane: string,\n groupBy: BoardGroupBy,\n cards: BoardCard[],\n sprintOptions: SprintOption[],\n milestoneOptions: MilestoneOption[]\n): ReactNode {\n if (!lane) {\n return groupBy === 'ASSIGNEE' ? 'Unassigned' : `(No ${GROUP_BY_NOUN[groupBy] ?? 'value'})`;\n }\n switch (groupBy) {\n case 'ASSIGNEE':\n return <PersonName id={lane} />;\n case 'PRIORITY':\n case 'TYPE':\n return enumLabel(lane);\n case 'EPIC': {\n const epic = cards.find((c) => c.parentId === lane)?.parent;\n return epic ? epic.title : lane;\n }\n case 'SPRINT': {\n const sprint = sprintOptions.find((s) => s.id === lane);\n return sprint ? sprint.name : lane;\n }\n case 'MILESTONE': {\n const milestone = milestoneOptions.find((m) => m.id === lane);\n return milestone ? milestone.name : lane;\n }\n default:\n return lane;\n }\n}\n\nconst GROUP_BY_NOUN: Partial<Record<BoardGroupBy, string>> = {\n PRIORITY: 'priority',\n TYPE: 'type',\n EPIC: 'epic',\n SPRINT: 'sprint',\n MILESTONE: 'milestone',\n};\n\ninterface BoardData {\n id: string;\n name: string;\n unplacedCount: number;\n columns: BoardColumn[];\n}\n\nconst messageOf = (e: unknown, fallback: string) => (e instanceof Error ? e.message : fallback);\n\nfunction ErrorLine({ message }: { message: string }) {\n return (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {message}\n </p>\n );\n}\n\nexport function ProjectBoard({\n projectId,\n projectName,\n}: {\n projectId: string;\n projectName: string;\n}) {\n const { workspaceId } = usePlanMagnet();\n const client = useApolloClient();\n const [chosenBoardId, setChosenBoardId] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n // Card age is read against the moment the board opened (Date.now() may not run during render).\n const [now] = useState(() => Date.now());\n // Board views (PDM-N04): filter/sort/group-by/fields, driven by BoardViewBar — \"All cards\" until it reports its\n // own resolved state. `filter`/`sort` are sent straight to the board's card queries (server-side); `groupBy` and\n // `visibleFields` are read by this component when drawing swimlanes and cards.\n const [boardViewState, setBoardViewState] = useState<AppliedBoardState>({\n filter: undefined,\n sort: { field: 'RANK', direction: 'ASC' },\n groupBy: 'NONE',\n visibleFields: ['KEY', 'ASSIGNEE', 'STORY_POINTS'],\n filterActive: false,\n });\n const sprints = useProjectSprintOptions(workspaceId, projectId);\n const milestones = useProjectMilestones(projectId);\n // Pages loaded past each column's first 100, keyed by the board data they extend: a refetch starts over.\n const [more, setMore] = useState<{\n key: unknown;\n byColumn: Record<string, { items: BoardCard[]; pageInfo: PageInfo }>;\n }>({\n key: null,\n byColumn: {},\n });\n const [loadingMore, setLoadingMore] = useState<string | null>(null);\n // Bulk update (BOFF-8047): ids of the cards currently checked, across every column/lane.\n const [selected, setSelected] = useState<Set<string>>(new Set());\n const toggleSelect = (workItemId: string) =>\n setSelected((prev) => {\n const next = new Set(prev);\n if (next.has(workItemId)) next.delete(workItemId);\n else next.add(workItemId);\n return next;\n });\n const clearSelection = () => setSelected(new Set());\n const workflow = useProjectWorkflow(projectId);\n\n const { data: boardsData, loading: boardsLoading } = useQuery<{\n planmagnetBoards: { items: Array<{ id: string; name: string; isDefault: boolean }> };\n }>(BOARDS, { variables: { workspaceId, projectId }, skip: !workspaceId });\n const boards = boardsData?.planmagnetBoards.items ?? [];\n const boardId =\n (chosenBoardId && boards.some((b) => b.id === chosenBoardId) ? chosenBoardId : null) ??\n boards.find((b) => b.isDefault)?.id ??\n boards[0]?.id ??\n null;\n // A selection only makes sense on the board it was made on: switching boards (or projects, which changes\n // `boardId` too) drops it, the same \"derive during render\" pattern `more` below uses for its own reset.\n const [selectionBoardId, setSelectionBoardId] = useState(boardId);\n if (selectionBoardId !== boardId) {\n setSelectionBoardId(boardId);\n setSelected(new Set());\n }\n\n // A filter/sort change from BoardViewBar is a NEW combination of query variables, which Apollo (cache-and-network,\n // the client default) resolves with `data: undefined, loading: true` until the network answers — even though the\n // board was already showing something. Falling back to `previousData` keeps the last-known board (and its\n // columns/cards) on screen through that gap, so only a genuine first load or a board switch ever shows the\n // \"Loading board…\" text below; a filter/sort tweak never blanks the board out from under the view bar that\n // drives it (see `scripts/check-refetch-blanking.ts` — the same class of bug it guards `pages/` against).\n const { data, previousData, loading } = useQuery<{ planmagnetBoard: BoardData | null }>(BOARD, {\n variables: { id: boardId, filter: boardViewState.filter, sort: boardViewState.sort },\n skip: !boardId,\n });\n const board = data?.planmagnetBoard ?? previousData?.planmagnetBoard ?? null;\n const extra = more.key === board ? more.byColumn : {};\n /** A column with every page loaded so far. */\n const cardsOf = (column: BoardColumn) => {\n const loaded = extra[column.id];\n return {\n items: loaded ? [...column.cards.items, ...loaded.items] : column.cards.items,\n pageInfo: loaded ? loaded.pageInfo : column.cards.pageInfo,\n totalCount: column.cards.totalCount,\n };\n };\n const loadMore = async (column: BoardColumn) => {\n const cursor = cardsOf(column).pageInfo.endCursor;\n if (!board || !cursor) return;\n setError(null);\n setLoadingMore(column.id);\n try {\n const res = await client.query<{\n planmagnetBoardColumnCards: { pageInfo: PageInfo; items: BoardCard[] };\n }>({\n query: COLUMN_PAGE,\n variables: {\n boardId: board.id,\n columnId: column.id,\n after: cursor,\n filter: boardViewState.filter,\n sort: boardViewState.sort,\n },\n fetchPolicy: 'network-only',\n });\n const page = res.data?.planmagnetBoardColumnCards;\n if (!page) throw new Error(res.error?.message ?? 'The next cards could not be loaded.');\n const prior = extra[column.id]?.items ?? [];\n setMore({\n key: board,\n byColumn: {\n ...extra,\n [column.id]: { items: [...prior, ...page.items], pageInfo: page.pageInfo },\n },\n });\n } catch (e) {\n setError(messageOf(e, 'The next cards could not be loaded.'));\n } finally {\n setLoadingMore(null);\n }\n };\n\n const [createBoard, createBoardState] = useMutation<{ planmagnetCreateBoard: { id: string } }>(\n CREATE_BOARD,\n { refetchQueries: REFETCH, awaitRefetchQueries: true }\n );\n const [moveCard, moveState] = useMutation(MOVE_CARD, {\n refetchQueries: REFETCH,\n awaitRefetchQueries: true,\n });\n const [reorder] = useMutation(REORDER_COLUMNS, {\n refetchQueries: REFETCH,\n awaitRefetchQueries: true,\n });\n\n const run = async (action: () => Promise<{ error?: unknown }>, fallback: string) => {\n setError(null);\n try {\n await throwOnError(action());\n } catch (e) {\n setError(messageOf(e, fallback));\n }\n };\n\n const move = (workItemId: string, targetColumnId: string) =>\n run(\n () => moveCard({ variables: { boardId, input: { workItemId, targetColumnId } } }),\n 'The card could not be moved.'\n );\n\n const shiftColumn = (index: number, delta: -1 | 1) => {\n if (!board) return;\n const order = board.columns.map((c) => c.id);\n const target = index + delta;\n if (target < 0 || target >= order.length) return;\n [order[index], order[target]] = [order[target], order[index]];\n return run(\n () => reorder({ variables: { boardId, input: { columnIds: order } } }),\n 'The columns could not be reordered.'\n );\n };\n\n if (boardsLoading && !boardsData) {\n return <p className=\"text-sm text-muted-foreground p-4\">Loading board…</p>;\n }\n\n if (!boardId) {\n return (\n <Card>\n <CardContent className=\"p-8 text-center space-y-3\" data-testid=\"board-empty\">\n <LayoutGrid className=\"h-8 w-8 mx-auto text-muted-foreground\" />\n <p className=\"text-sm text-muted-foreground\">{projectName} has no board yet.</p>\n <Button\n size=\"sm\"\n disabled={createBoardState.loading}\n onClick={() =>\n run(\n () =>\n createBoard({\n variables: {\n input: {\n projectId,\n name: `${projectName} board`,\n type: 'KANBAN',\n isDefault: true,\n withDefaultColumns: true,\n },\n },\n }),\n 'The board could not be created.'\n )\n }\n >\n <Plus className=\"mr-1 h-4 w-4\" />\n {createBoardState.loading ? 'Creating…' : 'Create board'}\n </Button>\n <p className=\"text-xs text-muted-foreground\">\n Starts with one column per status: Backlog, To Do, In Progress, In Review, Testing,\n Done.\n </p>\n {error && <ErrorLine message={error} />}\n </CardContent>\n </Card>\n );\n }\n\n return (\n <BoardWorkflow.Provider value={workflow}>\n <div className=\"space-y-3\" data-testid=\"project-board\">\n <div className=\"flex flex-wrap items-center gap-3\">\n {boards.length > 1 && (\n <select\n aria-label=\"Board\"\n className=\"rounded-md border border-input bg-background px-2 py-1 text-sm\"\n value={boardId}\n onChange={(e) => setChosenBoardId(e.target.value)}\n >\n {boards.map((b) => (\n <option key={b.id} value={b.id}>\n {b.name}\n </option>\n ))}\n </select>\n )}\n {board && board.unplacedCount > 0 && (\n <p className=\"text-xs text-muted-foreground\" data-testid=\"board-unplaced\">\n {board.unplacedCount} work item{board.unplacedCount === 1 ? ' is' : 's are'} not on\n this board: {board.unplacedCount === 1 ? 'its status has' : 'their status has'} no\n column.\n </p>\n )}\n {board && (\n <div className=\"ml-auto\">\n <ColumnDialog boardId={board.id} />\n </div>\n )}\n </div>\n {/* Board views (PDM-N04): gated on `boardId` (resolved from the boards list, above), never on `board`\n (the BOARD query's own data) — `board` resets to null while a filter/sort change it is driving is\n in flight, and BoardViewBar owns that filter/sort/group-by/fields state itself, so unmounting it here\n would drop whatever the user just picked mid-interaction. */}\n <BoardViewBar\n projectId={projectId}\n boardId={boardId}\n onSelectBoard={setChosenBoardId}\n sprintOptions={sprints.options}\n milestoneOptions={milestones.options}\n onStateChange={setBoardViewState}\n />\n {error && <ErrorLine message={error} />}\n {/* Bulk update (BOFF-8047): appears once at least one card is checked, disappears once the selection\n is cleared — it never blanks mid-action since a successful apply leaves the selection in place. */}\n {board && selected.size > 0 && (\n <BulkActionsBar\n projectId={projectId}\n selectedIds={[...selected]}\n workflow={workflow}\n onDone={clearSelection}\n />\n )}\n {loading && !board ? (\n <p className=\"text-sm text-muted-foreground p-4\">Loading board…</p>\n ) : board && boardViewState.groupBy !== 'NONE' ? (\n <SwimlaneBoard\n board={board}\n groupBy={boardViewState.groupBy}\n visibleFields={boardViewState.visibleFields}\n filterActive={boardViewState.filterActive}\n sprintOptions={sprints.options}\n milestoneOptions={milestones.options}\n cardsOf={cardsOf}\n now={now}\n busy={moveState.loading}\n loadingMore={loadingMore}\n selected={selected}\n onToggleSelect={toggleSelect}\n onLoadMore={(column) => void loadMore(column)}\n onMove={move}\n />\n ) : (\n <div className=\"flex gap-3 overflow-x-auto pb-2\">\n {board?.columns.map((column, index) => (\n <BoardColumnView\n key={column.id}\n boardId={board.id}\n column={column}\n columns={board.columns}\n cards={cardsOf(column)}\n visibleFields={boardViewState.visibleFields}\n filterActive={boardViewState.filterActive}\n sprintOptions={sprints.options}\n milestoneOptions={milestones.options}\n isFirst={index === 0}\n isLast={index === board.columns.length - 1}\n busy={moveState.loading}\n now={now}\n loadingMore={loadingMore === column.id}\n selected={selected}\n onToggleSelect={toggleSelect}\n onLoadMore={() => void loadMore(column)}\n onMove={move}\n onShift={(delta) => shiftColumn(index, delta)}\n />\n ))}\n {board && board.columns.length === 0 && (\n <p className=\"text-sm text-muted-foreground p-4\">\n This board has no columns. Add one to start placing work.\n </p>\n )}\n </div>\n )}\n </div>\n </BoardWorkflow.Provider>\n );\n}\n\ntype ColumnCards = { items: BoardCard[]; pageInfo: PageInfo; totalCount: number };\n\n/** One card: whatever fields the applied view chose (title is always shown), age in status, and a keyboard\n * \"Move…\" equal to drag-and-drop. */\nfunction CardView({\n card,\n column,\n columns,\n visibleFields,\n sprintOptions,\n milestoneOptions,\n busy,\n now,\n selected,\n onToggleSelect,\n onMove,\n}: {\n card: BoardCard;\n column: BoardColumn;\n columns: BoardColumn[];\n visibleFields: readonly BoardCardField[];\n sprintOptions: SprintOption[];\n milestoneOptions: MilestoneOption[];\n busy: boolean;\n now: number;\n selected: boolean;\n onToggleSelect: (workItemId: string) => void;\n onMove: (workItemId: string, targetColumnId: string) => void;\n}) {\n const navigate = usePlanMagnetNavigate();\n const workflow = useContext(BoardWorkflow);\n const days = daysInStatus(card.statusSince, now);\n // Only columns this card may move into: unmapped ones (no status change) and those whose status the workflow allows.\n const reachable = allowedTargets(workflow, card.status, STATUSES);\n const targets = columns.filter(\n (c) => c.id !== column.id && (!c.mappedStatus || reachable.includes(c.mappedStatus))\n );\n const show = (field: BoardCardField) => visibleFields.includes(field);\n const sprintName = card.sprintId ? sprintOptions.find((s) => s.id === card.sprintId)?.name : null;\n const milestoneName = card.milestoneId\n ? milestoneOptions.find((m) => m.id === card.milestoneId)?.name\n : null;\n // TYPE/PRIORITY/DUE_DATE/SPRINT/MILESTONE/EPIC render as one wrapping meta line — only when the view chose at\n // least one of them, so a card with none of these fields shows exactly what it always did.\n const extra: { key: string; text: string }[] = [];\n if (show('TYPE')) extra.push({ key: 'type', text: enumLabel(card.type) });\n if (show('PRIORITY')) extra.push({ key: 'priority', text: enumLabel(card.priority) });\n if (show('DUE_DATE') && card.dueDate) {\n extra.push({ key: 'due', text: `Due ${new Date(card.dueDate).toLocaleDateString()}` });\n }\n if (show('SPRINT') && sprintName) extra.push({ key: 'sprint', text: sprintName });\n if (show('MILESTONE') && milestoneName) extra.push({ key: 'milestone', text: milestoneName });\n if (show('EPIC') && card.parent) extra.push({ key: 'epic', text: card.parent.title });\n return (\n <li\n draggable\n onDragStart={(e) => {\n e.dataTransfer.setData('text/plain', card.id);\n e.dataTransfer.effectAllowed = 'move';\n }}\n className={`rounded-md border bg-background p-2 space-y-1 cursor-grab ${selected ? 'ring-2 ring-primary' : ''}`}\n data-testid=\"board-card\"\n >\n <div className=\"flex items-start gap-1.5\">\n {/* Bulk update (BOFF-8047): checking a card adds it to the selection the bulk action bar acts on.\n The `<li>` above is `draggable` for card drag-and-drop; a native drag source is resolved by\n walking UP from wherever the mouse/pointer went down, so without this the checkbox's own\n mousedown would still be picked up as \"drag the card\" instead of toggling the box. Stop that\n gesture (and any stray dragstart/click bubbling) at the checkbox itself; every other pointer\n in the card is untouched, so dragging the card from anywhere else still works. */}\n <input\n type=\"checkbox\"\n className=\"mt-0.5 shrink-0\"\n aria-label={`Select ${card.key}`}\n data-testid=\"board-card-select\"\n checked={selected}\n draggable={false}\n onMouseDown={(e) => e.stopPropagation()}\n onPointerDown={(e) => e.stopPropagation()}\n onDragStart={(e) => e.stopPropagation()}\n onClick={(e) => e.stopPropagation()}\n onChange={() => onToggleSelect(card.id)}\n />\n <button\n type=\"button\"\n className=\"text-left text-sm font-medium leading-tight hover:underline\"\n onClick={() => navigate(`/tasks/task-detail-page?taskId=${encodeURIComponent(card.id)}`)}\n >\n {card.title}\n </button>\n </div>\n <div className=\"flex items-center justify-between text-[11px] text-muted-foreground\">\n {show('KEY') && <span>{card.key}</span>}\n {/* Card aging (P1.2): how long it has had this status. Unknown when its status changed off the record. */}\n {days !== null && (\n <span\n data-testid=\"card-age\"\n className={ageClass(days)}\n title={`In ${workflowLabel(workflow, card.status)} since ${new Date(card.statusSince ?? '').toLocaleDateString()}`}\n >\n {days === 0 ? 'today' : `${days}d in status`}\n </span>\n )}\n {show('STORY_POINTS') && <span>{card.storyPoints ?? 0} pts</span>}\n </div>\n {extra.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-[11px] text-muted-foreground\">\n {extra.map((e, i) => (\n <span key={e.key} className=\"flex items-center gap-1.5\">\n {i > 0 && <span aria-hidden=\"true\">·</span>}\n {e.text}\n </span>\n ))}\n </div>\n )}\n {show('LABELS') && card.labels.length > 0 && (\n <div className=\"flex flex-wrap gap-1\">\n {card.labels.map((l) => (\n <Badge key={l} variant=\"secondary\" className=\"px-1.5 py-0 text-[10px]\">\n {l}\n </Badge>\n ))}\n </div>\n )}\n <div className=\"flex items-center justify-between gap-1 text-[11px] text-muted-foreground\">\n <span className=\"truncate\">\n {show('ASSIGNEE') &&\n (card.assigneeId ? <PersonName id={card.assigneeId} /> : 'Unassigned')}\n </span>\n {/* The same move as drag-and-drop, for keyboard and assistive tech. */}\n <select\n aria-label={`Move ${card.key} to column`}\n className=\"rounded border border-input bg-background px-1 py-0.5 text-[11px]\"\n value=\"\"\n disabled={busy}\n onChange={(e) => e.target.value && onMove(card.id, e.target.value)}\n >\n <option value=\"\">Move…</option>\n {targets.map((c) => (\n <option key={c.id} value={c.id}>\n {c.name}\n </option>\n ))}\n </select>\n </div>\n </li>\n );\n}\n\n/** A drop target: dropping a card here moves it into `column`. */\nfunction DropZone({\n column,\n onMove,\n className,\n children,\n label,\n}: {\n column: BoardColumn;\n onMove: (workItemId: string, targetColumnId: string) => void;\n className: string;\n children: ReactNode;\n label: string;\n}) {\n const [dragOver, setDragOver] = useState(false);\n return (\n <section\n aria-label={label}\n className={`${className} ${dragOver ? 'ring-2 ring-primary' : ''}`}\n onDragOver={(e) => {\n e.preventDefault();\n setDragOver(true);\n }}\n onDragLeave={() => setDragOver(false)}\n onDrop={(e) => {\n e.preventDefault();\n setDragOver(false);\n const workItemId = e.dataTransfer.getData('text/plain');\n if (workItemId) onMove(workItemId, column.id);\n }}\n >\n {children}\n </section>\n );\n}\n\n/** \"Showing N of M — Show more\" for a column with cards past the ones loaded. */\nfunction MoreCards({\n cards,\n loading,\n onLoadMore,\n}: {\n cards: ColumnCards;\n loading: boolean;\n onLoadMore: () => void;\n}) {\n const hidden = cards.totalCount - cards.items.length;\n if (hidden <= 0 || !cards.pageInfo.hasNextPage) return null;\n return (\n <div className=\"px-2 pb-2 space-y-1\">\n <p className=\"text-xs text-muted-foreground\">\n Showing {cards.items.length} of {cards.totalCount}\n </p>\n <Button\n size=\"sm\"\n variant=\"outline\"\n className=\"w-full\"\n data-testid=\"board-column-more\"\n disabled={loading}\n onClick={onLoadMore}\n >\n {loading ? 'Loading…' : `Show ${Math.min(hidden, CARDS_PER_COLUMN)} more`}\n </Button>\n </div>\n );\n}\n\n/**\n * Swimlanes (P1.2, extended by PDM-N04): rows by a board view's group-by, across the same columns. Moving a card\n * changes its column (and the status that column sets); its lane follows the grouped field itself (assignee,\n * priority, type, epic, sprint or milestone), changed elsewhere, never here.\n */\nfunction SwimlaneBoard({\n board,\n groupBy,\n visibleFields,\n filterActive,\n sprintOptions,\n milestoneOptions,\n cardsOf,\n now,\n busy,\n loadingMore,\n selected,\n onToggleSelect,\n onLoadMore,\n onMove,\n}: {\n board: BoardData;\n groupBy: BoardGroupBy;\n visibleFields: readonly BoardCardField[];\n filterActive: boolean;\n sprintOptions: SprintOption[];\n milestoneOptions: MilestoneOption[];\n cardsOf: (column: BoardColumn) => ColumnCards;\n now: number;\n busy: boolean;\n loadingMore: string | null;\n selected: Set<string>;\n onToggleSelect: (workItemId: string) => void;\n onLoadMore: (column: BoardColumn) => void;\n onMove: (workItemId: string, targetColumnId: string) => void;\n}) {\n const perColumn = board.columns.map((column) => ({ column, cards: cardsOf(column) }));\n const allLoadedCards = perColumn.flatMap(({ cards }) => cards.items);\n const lanes = [...new Set(allLoadedCards.map((c) => laneOf(c, groupBy)))].sort((a, b) =>\n groupBy === 'PRIORITY'\n ? PRIORITY_ORDER.indexOf(a) - PRIORITY_ORDER.indexOf(b)\n : a === ''\n ? 1\n : b === ''\n ? -1\n : a.localeCompare(b)\n );\n return (\n <div className=\"overflow-x-auto pb-2 space-y-3\" data-testid=\"board-swimlanes\">\n <p className=\"text-xs text-muted-foreground\">\n Dragging moves a card between columns. Its lane follows its{' '}\n {(GROUP_BY_NOUN[groupBy] ?? groupBy.toLowerCase()).toLowerCase()}.\n </p>\n <div className=\"flex gap-3\">\n {perColumn.map(({ column, cards }) => (\n <div key={column.id} className=\"min-w-[240px] w-[240px] shrink-0 px-2\">\n <ColumnCount\n column={column}\n filteredCount={cards.totalCount}\n filterActive={filterActive}\n />\n </div>\n ))}\n </div>\n {lanes.length === 0 && (\n <p className=\"text-sm text-muted-foreground p-4\">No cards on this board yet.</p>\n )}\n {lanes.map((lane) => (\n <div key={lane || 'none'} data-testid=\"board-swimlane\" className=\"space-y-1\">\n <p className=\"text-xs font-medium\">\n {laneLabel(lane, groupBy, allLoadedCards, sprintOptions, milestoneOptions)}{' '}\n <span className=\"text-muted-foreground\">\n ({allLoadedCards.filter((c) => laneOf(c, groupBy) === lane).length})\n </span>\n </p>\n <div className=\"flex gap-3\">\n {perColumn.map(({ column, cards }) => (\n <DropZone\n key={column.id}\n column={column}\n onMove={onMove}\n label={`${column.name} column`}\n className=\"min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30\"\n >\n <ul className=\"p-2 space-y-2 min-h-[48px]\">\n {cards.items\n .filter((c) => laneOf(c, groupBy) === lane)\n .map((card) => (\n <CardView\n key={card.id}\n card={card}\n column={column}\n columns={board.columns}\n visibleFields={visibleFields}\n sprintOptions={sprintOptions}\n milestoneOptions={milestoneOptions}\n busy={busy}\n now={now}\n selected={selected.has(card.id)}\n onToggleSelect={onToggleSelect}\n onMove={onMove}\n />\n ))}\n </ul>\n </DropZone>\n ))}\n </div>\n </div>\n ))}\n <div className=\"flex gap-3\">\n {perColumn.map(({ column, cards }) => (\n <div key={column.id} className=\"min-w-[240px] w-[240px] shrink-0\">\n <MoreCards\n cards={cards}\n loading={loadingMore === column.id}\n onLoadMore={() => onLoadMore(column)}\n />\n </div>\n ))}\n </div>\n </div>\n );\n}\n\n/** A column's header count: the unfiltered `itemCount` against its WIP limit, plus — when a view filter narrows\n * the board — how many of those match it. */\nfunction ColumnCount({\n column,\n filteredCount,\n filterActive,\n testId,\n}: {\n column: BoardColumn;\n filteredCount: number;\n filterActive: boolean;\n testId?: string;\n}) {\n const atLimit =\n column.wipLimit != null && column.wipLimit > 0 && column.itemCount >= column.wipLimit;\n return (\n <h3 className=\"text-sm font-medium truncate\" data-testid={testId}>\n {column.name}{' '}\n <span\n className={`text-xs rounded-full px-1.5 ${atLimit ? 'bg-status-warning-subtle text-status-warning' : 'bg-muted'}`}\n title={column.wipLimit ? `WIP limit ${column.wipLimit}` : undefined}\n >\n {column.wipLimit ? `${column.itemCount} / ${column.wipLimit}` : column.itemCount}\n </span>\n {filterActive && (\n <span className=\"ml-1 text-xs text-muted-foreground\">showing {filteredCount}</span>\n )}\n </h3>\n );\n}\n\nfunction BoardColumnView({\n boardId,\n column,\n columns,\n cards,\n visibleFields,\n filterActive,\n sprintOptions,\n milestoneOptions,\n isFirst,\n isLast,\n busy,\n now,\n loadingMore,\n selected,\n onToggleSelect,\n onLoadMore,\n onMove,\n onShift,\n}: {\n boardId: string;\n column: BoardColumn;\n columns: BoardColumn[];\n cards: ColumnCards;\n visibleFields: readonly BoardCardField[];\n filterActive: boolean;\n sprintOptions: SprintOption[];\n milestoneOptions: MilestoneOption[];\n isFirst: boolean;\n isLast: boolean;\n busy: boolean;\n now: number;\n loadingMore: boolean;\n selected: Set<string>;\n onToggleSelect: (workItemId: string) => void;\n onLoadMore: () => void;\n onMove: (workItemId: string, targetColumnId: string) => void;\n onShift: (delta: -1 | 1) => void;\n}) {\n const statusName = useStatusName();\n\n return (\n <DropZone\n column={column}\n onMove={onMove}\n label={`${column.name} column`}\n className=\"min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30\"\n >\n <div data-testid={`board-column-${column.name}`}>\n <header className=\"p-2 border-b space-y-1\">\n <div className=\"flex items-center justify-between gap-1\">\n <ColumnCount\n column={column}\n filteredCount={cards.totalCount}\n filterActive={filterActive}\n testId={`board-column-count-${column.name}`}\n />\n </div>\n <div className=\"flex items-center justify-between gap-1\">\n <span className=\"text-[11px] text-muted-foreground\">\n {column.mappedStatus\n ? `Sets status: ${statusName(column.mappedStatus)}`\n : 'No status'}\n </span>\n <span className=\"flex\">\n <Button\n size=\"icon\"\n variant=\"ghost\"\n className=\"h-6 w-6\"\n aria-label={`Move ${column.name} column left`}\n disabled={isFirst}\n onClick={() => onShift(-1)}\n >\n <ChevronLeft className=\"h-3.5 w-3.5\" />\n </Button>\n <Button\n size=\"icon\"\n variant=\"ghost\"\n className=\"h-6 w-6\"\n aria-label={`Move ${column.name} column right`}\n disabled={isLast}\n onClick={() => onShift(1)}\n >\n <ChevronRight className=\"h-3.5 w-3.5\" />\n </Button>\n <ColumnDialog boardId={boardId} column={column} />\n </span>\n </div>\n </header>\n <ul className=\"p-2 space-y-2 min-h-[80px]\">\n {cards.items.map((card) => (\n <CardView\n key={card.id}\n card={card}\n column={column}\n columns={columns}\n visibleFields={visibleFields}\n sprintOptions={sprintOptions}\n milestoneOptions={milestoneOptions}\n busy={busy}\n now={now}\n selected={selected.has(card.id)}\n onToggleSelect={onToggleSelect}\n onMove={onMove}\n />\n ))}\n {cards.totalCount === 0 && (\n <li className=\"text-xs text-muted-foreground text-center py-4\">Empty</li>\n )}\n </ul>\n <MoreCards cards={cards} loading={loadingMore} onLoadMore={onLoadMore} />\n </div>\n </DropZone>\n );\n}\n\nfunction ColumnDialog({ boardId, column }: { boardId: string; column?: BoardColumn }) {\n const editing = column !== undefined;\n const statusName = useStatusName();\n const [open, setOpen] = useState(false);\n const [name, setName] = useState(column?.name ?? '');\n const [mappedStatus, setMappedStatus] = useState(column?.mappedStatus ?? '');\n const [wip, setWip] = useState(column?.wipLimit ? String(column.wipLimit) : '');\n const [error, setError] = useState<string | null>(null);\n const options = { refetchQueries: REFETCH, awaitRefetchQueries: true };\n const [create, createState] = useMutation(CREATE_COLUMN, options);\n const [update, updateState] = useMutation(UPDATE_COLUMN, options);\n const [remove, removeState] = useMutation(DELETE_COLUMN, options);\n const busy = createState.loading || updateState.loading || removeState.loading;\n\n const wipValue = wip.trim() === '' ? null : Number(wip);\n const invalidWip = wipValue !== null && (!Number.isInteger(wipValue) || wipValue < 1);\n const canSave = name.trim() !== '' && !invalidWip && !busy;\n\n const reset = () => {\n setName(column?.name ?? '');\n setMappedStatus(column?.mappedStatus ?? '');\n setWip(column?.wipLimit ? String(column.wipLimit) : '');\n setError(null);\n };\n\n const save = async () => {\n setError(null);\n const fields = {\n name: name.trim(),\n mappedStatus: mappedStatus || null,\n wipLimit: wipValue,\n };\n try {\n if (editing) {\n await throwOnError(update({ variables: { id: column.id, input: fields } }));\n } else {\n await throwOnError(\n create({ variables: { input: { boardId, type: 'CUSTOM', ...fields } } })\n );\n }\n setOpen(false);\n } catch (e) {\n setError(messageOf(e, 'The column could not be saved.'));\n }\n };\n\n const idPrefix = editing ? `column-${column.id}` : 'new-column';\n\n return (\n <ResponsiveDialog\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n if (next) reset();\n }}\n >\n <ResponsiveDialogTrigger asChild>\n {editing ? (\n <Button\n size=\"icon\"\n variant=\"ghost\"\n className=\"h-6 w-6\"\n aria-label={`Edit ${column.name} column`}\n >\n <Pencil className=\"h-3.5 w-3.5\" />\n </Button>\n ) : (\n <Button size=\"sm\" variant=\"outline\">\n <Plus className=\"mr-1 h-4 w-4\" />\n Add column\n </Button>\n )}\n </ResponsiveDialogTrigger>\n <ResponsiveDialogContent className=\"max-w-md\">\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>\n {editing ? `Edit ${column.name}` : 'Add column'}\n </ResponsiveDialogTitle>\n <ResponsiveDialogDescription>\n Moving a card into a column that sets a status changes the work item's status.\n </ResponsiveDialogDescription>\n </ResponsiveDialogHeader>\n <div className=\"space-y-3\">\n <div>\n <label htmlFor={`${idPrefix}-name`} className=\"text-sm font-medium\">\n Name\n </label>\n <Input\n id={`${idPrefix}-name`}\n className=\"mt-1\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n />\n </div>\n <div>\n <label htmlFor={`${idPrefix}-status`} className=\"text-sm font-medium\">\n Sets status\n </label>\n <select\n id={`${idPrefix}-status`}\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={mappedStatus}\n onChange={(e) => setMappedStatus(e.target.value)}\n >\n <option value=\"\">No status (cards keep theirs)</option>\n {STATUSES.map((s) => (\n <option key={s} value={s}>\n {statusName(s)}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label htmlFor={`${idPrefix}-wip`} className=\"text-sm font-medium\">\n WIP limit (blank for none)\n </label>\n <Input\n id={`${idPrefix}-wip`}\n type=\"number\"\n min={1}\n className=\"mt-1\"\n value={wip}\n onChange={(e) => setWip(e.target.value)}\n />\n {invalidWip && <ErrorLine message=\"The WIP limit must be a whole number, 1 or more.\" />}\n </div>\n </div>\n {error && <ErrorLine message={error} />}\n <ResponsiveDialogFooter className=\"gap-2\">\n {editing && (\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"outline\" disabled={busy}>\n Delete column\n </Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Delete {column.name}?</AlertDialogTitle>\n <AlertDialogDescription>\n Its cards are not deleted: each goes back to the column for its status, or off\n the board if no column sets that status.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Keep it</AlertDialogCancel>\n <AlertDialogAction\n className=\"bg-destructive text-destructive-foreground hover:bg-destructive/90\"\n onClick={async () => {\n try {\n await throwOnError(remove({ variables: { id: column.id } }));\n setOpen(false);\n } catch (e) {\n setError(messageOf(e, 'The column could not be deleted.'));\n }\n }}\n >\n Delete column\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n )}\n <Button onClick={save} disabled={!canSave} data-testid={`${idPrefix}-save`}>\n {busy ? 'Saving…' : editing ? 'Save' : 'Add column'}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwDA,IAAM,IAAW;CACf;CAC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ACpB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UAAmB,WAA2B,CAAA,EAC9C,kBAAC,GAAD;MACE,WAAU;MACV,SAAS,YAAY;AACnB,WAAI;AAEF,QADA,MAAM,EAAa,EAAO,EAAE,WAAW,EAAE,IAAI,EAAO,IAAI,EAAE,CAAC,CAAC,EAC5D,EAAQ,GAAM;gBACP,GAAG;AACV,UAAS,EAAU,GAAG,mCAAmC,CAAC;;;gBAG/D;MAEmB,CAAA,CACF,EAAA,CAAA,CACD,EAAA,CAAA,CACT,EAAA,CAAA,EAEhB,kBAAC,GAAD;MAAQ,SAAS;MAAM,UAAU,CAAC;MAAS,eAAa,GAAG,EAAS;gBACjE,IAAO,YAAY,IAAU,SAAS;MAChC,CAAA,CACc;;IACD;KACT"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { usePlanMagnet } from '../providers/PlanMagnetProvider';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Board views (PDM-N04): a saved, named presentation over a project's board — filter, group-by, sort, visible
|
|
5
|
+
* fields, owner, sharing. A view holds no items and never creates a board (owner decision, 2026-09-29). Shapes,
|
|
6
|
+
* conversions and the shared queries/mutations live here; `BoardViewBar.tsx` is the UI that uses them.
|
|
7
|
+
*/
|
|
8
|
+
export type BoardGroupBy = 'NONE' | 'ASSIGNEE' | 'PRIORITY' | 'TYPE' | 'EPIC' | 'SPRINT' | 'MILESTONE';
|
|
9
|
+
export type BoardSortField = 'RANK' | 'PRIORITY' | 'DUE_DATE' | 'STORY_POINTS' | 'CREATED_AT' | 'UPDATED_AT';
|
|
10
|
+
export type SortDirection = 'ASC' | 'DESC';
|
|
11
|
+
export type BoardCardField = 'KEY' | 'TYPE' | 'PRIORITY' | 'ASSIGNEE' | 'STORY_POINTS' | 'DUE_DATE' | 'LABELS' | 'SPRINT' | 'MILESTONE' | 'EPIC';
|
|
12
|
+
export type BoardViewVisibility = 'PRIVATE' | 'SHARED';
|
|
13
|
+
/** The project's work item types (WorkItemType), for the type filter. */
|
|
14
|
+
export declare const WORK_ITEM_TYPES: readonly ["BUG", "EPIC", "STORY", "SUB_TASK", "TASK"];
|
|
15
|
+
export declare const GROUP_BY_OPTIONS: ReadonlyArray<{
|
|
16
|
+
value: BoardGroupBy;
|
|
17
|
+
label: string;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const SORT_FIELD_OPTIONS: ReadonlyArray<{
|
|
20
|
+
value: BoardSortField;
|
|
21
|
+
label: string;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const VISIBLE_FIELD_OPTIONS: ReadonlyArray<{
|
|
24
|
+
value: BoardCardField;
|
|
25
|
+
label: string;
|
|
26
|
+
}>;
|
|
27
|
+
/** The board's own card before any view narrows what shows — matches what the board rendered before PDM-N04. */
|
|
28
|
+
export declare const DEFAULT_VISIBLE_FIELDS: BoardCardField[];
|
|
29
|
+
/** Fields shown on a card: the view's own choice, or the board's default card when it named none. */
|
|
30
|
+
export declare function effectiveVisibleFields(fields: readonly BoardCardField[]): readonly BoardCardField[];
|
|
31
|
+
export interface BoardFilterState {
|
|
32
|
+
assigneeIds: string[];
|
|
33
|
+
unassigned: boolean;
|
|
34
|
+
types: string[];
|
|
35
|
+
priorities: string[];
|
|
36
|
+
labels: string[];
|
|
37
|
+
search: string;
|
|
38
|
+
sprintId: string;
|
|
39
|
+
milestoneId: string;
|
|
40
|
+
/** yyyy-mm-dd, or '' for no bound. */
|
|
41
|
+
dueFrom: string;
|
|
42
|
+
dueTo: string;
|
|
43
|
+
}
|
|
44
|
+
export interface BoardSortState {
|
|
45
|
+
field: BoardSortField;
|
|
46
|
+
direction: SortDirection;
|
|
47
|
+
}
|
|
48
|
+
export interface BoardViewConfigState {
|
|
49
|
+
filter: BoardFilterState;
|
|
50
|
+
sort: BoardSortState;
|
|
51
|
+
groupBy: BoardGroupBy;
|
|
52
|
+
visibleFields: BoardCardField[];
|
|
53
|
+
}
|
|
54
|
+
export declare function emptyFilter(): BoardFilterState;
|
|
55
|
+
export declare function defaultSort(): BoardSortState;
|
|
56
|
+
/** "All cards": no view applied. */
|
|
57
|
+
export declare function defaultConfig(): BoardViewConfigState;
|
|
58
|
+
/** The server's `PlanmagnetBoardCardFilter` input — `undefined` (omit the variable) when nothing is set. */
|
|
59
|
+
export declare function filterToGraphQLInput(filter: BoardFilterState): Record<string, unknown> | undefined;
|
|
60
|
+
/** Whether any filter is actually narrowing the board (for the "showing N" hint and the Clear button). */
|
|
61
|
+
export declare function isFilterActive(filter: BoardFilterState): boolean;
|
|
62
|
+
/** The server's `PlanmagnetBoardViewConfigInput` — a full replacement of a view's stored configuration. */
|
|
63
|
+
export declare function configToInput(config: BoardViewConfigState): {
|
|
64
|
+
filter: Record<string, unknown> | null;
|
|
65
|
+
groupBy: BoardGroupBy;
|
|
66
|
+
sort: {
|
|
67
|
+
field: BoardSortField;
|
|
68
|
+
direction: SortDirection;
|
|
69
|
+
};
|
|
70
|
+
visibleFields: BoardCardField[];
|
|
71
|
+
};
|
|
72
|
+
export interface BoardViewFilterValue {
|
|
73
|
+
assigneeIds: string[];
|
|
74
|
+
unassigned: boolean;
|
|
75
|
+
types: string[];
|
|
76
|
+
priorities: string[];
|
|
77
|
+
labels: string[];
|
|
78
|
+
search: string | null;
|
|
79
|
+
sprintId: string | null;
|
|
80
|
+
milestoneId: string | null;
|
|
81
|
+
dueFrom: string | null;
|
|
82
|
+
dueTo: string | null;
|
|
83
|
+
}
|
|
84
|
+
export interface BoardView {
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
description: string | null;
|
|
88
|
+
projectId: string;
|
|
89
|
+
boardId: string | null;
|
|
90
|
+
ownerId: string;
|
|
91
|
+
visibility: BoardViewVisibility;
|
|
92
|
+
isMine: boolean;
|
|
93
|
+
filter: BoardViewFilterValue;
|
|
94
|
+
groupBy: BoardGroupBy;
|
|
95
|
+
sort: {
|
|
96
|
+
field: BoardSortField;
|
|
97
|
+
direction: SortDirection;
|
|
98
|
+
};
|
|
99
|
+
visibleFields: BoardCardField[];
|
|
100
|
+
createdAt: string;
|
|
101
|
+
updatedAt: string;
|
|
102
|
+
}
|
|
103
|
+
/** A saved view's stored configuration, converted into the same shape the editable controls use. */
|
|
104
|
+
export declare function configFromView(view: BoardView): BoardViewConfigState;
|
|
105
|
+
/** Whether two configurations would save as the same thing — drives the "unsaved changes" hint. */
|
|
106
|
+
export declare function configsEqual(a: BoardViewConfigState, b: BoardViewConfigState): boolean;
|
|
107
|
+
/** The `?view=` URL parameter that keeps an applied view linkable — read via `window.location.search`, the same
|
|
108
|
+
* convention this codebase already uses for `?taskId=` and `?objectiveId=`. */
|
|
109
|
+
export declare function readViewIdFromUrl(): string | null;
|
|
110
|
+
/** Keeps the applied view linkable without adding a history entry or touching the host shell's own router. */
|
|
111
|
+
export declare function writeViewIdToUrl(viewId: string | null): void;
|
|
112
|
+
/** Own views plus every SHARED one of the project (server rule — `mine` is left unset on purpose). */
|
|
113
|
+
export declare const BOARD_VIEWS: import('graphql').DocumentNode;
|
|
114
|
+
export declare const CREATE_BOARD_VIEW: import('graphql').DocumentNode;
|
|
115
|
+
export declare const UPDATE_BOARD_VIEW: import('graphql').DocumentNode;
|
|
116
|
+
export declare const DELETE_BOARD_VIEW: import('graphql').DocumentNode;
|
|
117
|
+
/** The only query a board-view write can move: the bar's own list. Board data reacts to `filter`/`sort`/`groupBy`
|
|
118
|
+
* changing on ProjectBoard's own state, which re-runs its query on its own — no refetch entry needed for it. */
|
|
119
|
+
export declare const VIEW_REFETCH: string[];
|
|
120
|
+
export declare function useBoardViews(workspaceId: string | undefined, projectId: string): {
|
|
121
|
+
views: BoardView[];
|
|
122
|
+
loading: boolean;
|
|
123
|
+
error: string | null;
|
|
124
|
+
refetch: (variables?: Partial<import('@apollo/client').OperationVariables> | undefined) => Promise<import("@apollo/client").ApolloClient.QueryResult<{
|
|
125
|
+
planmagnetBoardViews: {
|
|
126
|
+
items: BoardView[];
|
|
127
|
+
totalCount: number;
|
|
128
|
+
};
|
|
129
|
+
}>>;
|
|
130
|
+
};
|
|
131
|
+
export interface SprintOption {
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
status: string;
|
|
135
|
+
}
|
|
136
|
+
/** A project's sprints, for the sprint filter and for naming SPRINT swimlanes. */
|
|
137
|
+
export declare function useProjectSprintOptions(workspaceId: string | undefined, projectId: string | null | undefined): {
|
|
138
|
+
options: SprintOption[];
|
|
139
|
+
loading: boolean;
|
|
140
|
+
error: string | null;
|
|
141
|
+
};
|
|
142
|
+
/** Convenience re-export so `BoardViewBar` does not need a second import of the provider hook. */
|
|
143
|
+
export { usePlanMagnet };
|
|
144
|
+
//# sourceMappingURL=boardViewConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boardViewConfig.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/board/boardViewConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE;;;;GAIG;AAEH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,UAAU,GACV,UAAU,GACV,MAAM,GACN,MAAM,GACN,QAAQ,GACR,WAAW,CAAC;AAChB,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,UAAU,GACV,UAAU,GACV,cAAc,GACd,YAAY,GACZ,YAAY,CAAC;AACjB,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAC3C,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,MAAM,GACN,UAAU,GACV,UAAU,GACV,cAAc,GACd,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,MAAM,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEvD,yEAAyE;AACzE,eAAO,MAAM,eAAe,uDAAwD,CAAC;AAErF,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC;IAAE,KAAK,EAAE,YAAY,CAAC;IAA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