From baec42810ca412e70f0be80ff9820083eecc2710 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Mon, 2 Feb 2026 07:00:39 +0200 Subject: [PATCH] fix(CF-635): Fix task_list returning empty for non-completed tasks - Remove invalid 'pending' status from task_list and task_update enums - Default to excluding completed tasks when no status filter provided - Previously, task_list(status=open) missed in_progress/blocked/testing tasks Co-Authored-By: Claude Opus 4.5 --- src/tools/crud.ts | 3 +++ src/tools/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/crud.ts b/src/tools/crud.ts index c014f77..809892c 100644 --- a/src/tools/crud.ts +++ b/src/tools/crud.ts @@ -282,6 +282,9 @@ export async function taskList(args: TaskListArgs): Promise { if (status) { whereClause += ` AND status = $${paramIndex++}`; params.push(status); + } else { + // Default: exclude completed tasks when no status filter provided + whereClause += ` AND status != 'completed'`; } if (type) { whereClause += ` AND type = $${paramIndex++}`; diff --git a/src/tools/index.ts b/src/tools/index.ts index 8510982..7edc02d 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -24,7 +24,7 @@ export const toolDefinitions = [ type: 'object', properties: { project: { type: 'string', description: 'Filter by project key' }, - status: { type: 'string', enum: ['pending', 'open', 'in_progress', 'testing', 'blocked', 'completed'], description: 'Filter by status' }, + status: { type: 'string', enum: ['open', 'in_progress', 'testing', 'blocked', 'completed'], description: 'Filter by status. Omit to show all non-completed tasks.' }, type: { type: 'string', enum: ['task', 'bug', 'feature', 'debt', 'investigation'], description: 'Filter by type' }, priority: { type: 'string', enum: ['P0', 'P1', 'P2', 'P3'], description: 'Filter by priority' }, limit: { type: 'number', description: 'Max results (default: 20)' }, @@ -60,7 +60,7 @@ export const toolDefinitions = [ type: 'object', properties: { id: { type: 'string', description: 'Task ID to update' }, - status: { type: 'string', enum: ['pending', 'open', 'in_progress', 'testing', 'blocked', 'completed'], description: 'New status' }, + status: { type: 'string', enum: ['open', 'in_progress', 'testing', 'blocked', 'completed'], description: 'New status' }, priority: { type: 'string', enum: ['P0', 'P1', 'P2', 'P3'], description: 'New priority' }, type: { type: 'string', enum: ['task', 'bug', 'feature', 'debt', 'investigation'], description: 'New type' }, title: { type: 'string', description: 'New title' },