From 7885edff982a4819e92354295986d88e6ddfeddc Mon Sep 17 00:00:00 2001 From: Ayush Date: Sun, 10 May 2026 15:56:22 +0530 Subject: [PATCH] fix: hide work items with Removed state from Kanban board (#277) Removed-category states were being bucketed into the Closed column on the Kanban board. Skip them when building the state lists for the standup query so they're never fetched, and drop the corresponding fallback mapping in the standup route. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/app/api/devops/standup/route.ts | 5 +++-- src/lib/devops.ts | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/api/devops/standup/route.ts b/src/app/api/devops/standup/route.ts index 4a560ba..0199e1a 100644 --- a/src/app/api/devops/standup/route.ts +++ b/src/app/api/devops/standup/route.ts @@ -238,13 +238,14 @@ export async function GET(request: NextRequest) { const displayColumnNames = new Set(displayColumns.map((c) => c.name)); - // Map non-display states to the fallback column for their category + // Map non-display states to the fallback column for their category. + // 'Removed' is omitted because getStandupData filters those out before + // we get here (issue #277). const categoryFallback: Record = { Proposed: 'New', InProgress: 'Active', Resolved: 'Resolved', Completed: 'Closed', - Removed: 'Closed', }; // Resolve any DevOps state to one of the 6 display columns diff --git a/src/lib/devops.ts b/src/lib/devops.ts index 1074c89..50f55f4 100644 --- a/src/lib/devops.ts +++ b/src/lib/devops.ts @@ -2426,11 +2426,14 @@ export class AzureDevOpsService { nextDay.setDate(nextDay.getDate() + 1); const nextDayStr = nextDay.toISOString().split('T')[0]; - // Build state lists dynamically from categories + // Build state lists dynamically from categories. + // 'Removed' states are intentionally excluded — removed work items are + // hidden from the Kanban board (issue #277). const doneStates: string[] = []; const activeStates: string[] = []; for (const [state, category] of Object.entries(stateCategories)) { - if (category === 'Resolved' || category === 'Completed' || category === 'Removed') { + if (category === 'Removed') continue; + if (category === 'Resolved' || category === 'Completed') { doneStates.push(state); } else { activeStates.push(state);