From aa19735bdb807984c5ff606402d94e6b5d21a033 Mon Sep 17 00:00:00 2001 From: smartcalsystems-sketch Date: Tue, 13 Oct 2026 23:53:32 +0530 Subject: [PATCH] fix: 'View all N' pipeline links now filter to that column's status (closes #693) Columns capped at 8 cards linked to a bare /issues regardless of which column overflowed, and the status facet only supported all/open/ in_review -- so there was no way to view all claimed, funded, or awaiting-payout (merged) bounties a column was summarising even if the link had carried the status. Expanded STATUS_VALUES to cover every status PipelineBoard renders a column for (open, funded, claimed, in_review, merged), and threaded each column's status into its 'View all' link as ?status=. filterBounties already compares by raw status value generically, so no change was needed there. The three status pills on /issues itself are unchanged (still all/open/in_review) -- visiting with one of the new status values filters correctly, it just won't highlight a pill, same as the existing reward-range filters have no corresponding pill either. --- .../maintainer/PipelineBoard.test.tsx | 32 +++++++++++++++++++ .../dashboard/maintainer/PipelineBoard.tsx | 5 ++- src/lib/bounty-query.ts | 12 ++++++- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/app/dashboard/maintainer/PipelineBoard.test.tsx b/src/app/dashboard/maintainer/PipelineBoard.test.tsx index b053b8ef..881885a8 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 331b44bd..29a6edaf 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 8551bb79..55feb643 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 = [