diff --git a/src/app/dashboard/maintainer/PipelineBoard.test.tsx b/src/app/dashboard/maintainer/PipelineBoard.test.tsx index b053b8e..881885a 100644 --- a/src/app/dashboard/maintainer/PipelineBoard.test.tsx +++ b/src/app/dashboard/maintainer/PipelineBoard.test.tsx @@ -30,6 +30,38 @@ function makeBounty(overrides: Partial = {}): Bounty { }; } +describe("PipelineBoard — 'View all N' link carries the column's status (#693)", () => { + function manyBounties(status: BountyStatus, count: number): Bounty[] { + return Array.from({ length: count }, (_, i) => + makeBounty({ id: `${status}-${i}`, status }), + ); + } + + it("links to /issues?status= when a column overflows", () => { + render(); + + const link = screen.getByRole("link", { name: /View all 10/ }); + expect(link).toHaveAttribute("href", "/issues?status=funded"); + }); + + it("carries the status for every pipeline column, not just the default facet values", () => { + const bounties = [ + ...manyBounties("claimed", 9), + ...manyBounties("merged", 9), + ]; + render(); + + const claimedLink = screen + .getAllByRole("link", { name: /View all 9/ }) + .find((link) => link.getAttribute("href") === "/issues?status=claimed"); + const mergedLink = screen + .getAllByRole("link", { name: /View all 9/ }) + .find((link) => link.getAttribute("href") === "/issues?status=merged"); + expect(claimedLink).toBeDefined(); + expect(mergedLink).toBeDefined(); + }); +}); + describe("PipelineBoard — merged column (#88)", () => { it("renders a bounty with status 'merged' in a visible pipeline column", () => { const merged = makeBounty({ id: "merged-1", title: "Merged, awaiting payout", status: "merged" }); diff --git a/src/app/dashboard/maintainer/PipelineBoard.tsx b/src/app/dashboard/maintainer/PipelineBoard.tsx index 331b44b..29a6eda 100644 --- a/src/app/dashboard/maintainer/PipelineBoard.tsx +++ b/src/app/dashboard/maintainer/PipelineBoard.tsx @@ -48,9 +48,11 @@ export const ESCROW_LOCKED_EXCLUDED_STATUSES: BountyStatus[] = [ const MAX_VISIBLE_PER_COLUMN = 8; function PipelineColumn({ + status, label, bounties, }: { + status: BountyStatus; label: string; bounties: Bounty[]; }) { @@ -94,7 +96,7 @@ function PipelineColumn({ )} {hiddenCount > 0 && ( View all {bounties.length} in Bounty pipeline @@ -128,6 +130,7 @@ export function PipelineBoard({ bounties }: { bounties: Bounty[] }) { {pipelineStages.map((stage) => ( diff --git a/src/lib/bounty-query.ts b/src/lib/bounty-query.ts index 8551bb7..55feb64 100644 --- a/src/lib/bounty-query.ts +++ b/src/lib/bounty-query.ts @@ -17,7 +17,17 @@ import type { Bounty } from "@/types"; export const PAGE_SIZE = 10; -export const STATUS_VALUES = ["all", "open", "in_review"] as const; +// Includes every status PipelineBoard renders a column for (#693) — a +// maintainer following a column's "View all N" link needs the facet to +// actually filter to that status, not silently fall back to "all". +export const STATUS_VALUES = [ + "all", + "open", + "in_review", + "funded", + "claimed", + "merged", +] as const; export type StatusFilter = (typeof STATUS_VALUES)[number]; export const DIFFICULTY_VALUES = [