fix(todo-continuation): exclude blocked todos from incomplete count to prevent infinite loops

Closes #2025
This commit is contained in:
YeonGyu-Kim
2026-02-26 20:58:23 +09:00
parent c505989ad4
commit 0516f2febc
2 changed files with 32 additions and 2 deletions
+7 -1
View File
@@ -1,5 +1,11 @@
import type { Todo } from "./types"
export function getIncompleteCount(todos: Todo[]): number {
return todos.filter((todo) => todo.status !== "completed" && todo.status !== "cancelled").length
return todos.filter(
(todo) =>
todo.status !== "completed"
&& todo.status !== "cancelled"
&& todo.status !== "blocked"
&& todo.status !== "deleted",
).length
}