diff --git a/apps/desktop/src/lib/todos.test.ts b/apps/desktop/src/lib/todos.test.ts index 90779a63a6..dbb5c9e97e 100644 --- a/apps/desktop/src/lib/todos.test.ts +++ b/apps/desktop/src/lib/todos.test.ts @@ -1,6 +1,14 @@ import { describe, expect, it } from 'vitest' -import { latestSessionTodos, mergeTodoItems, nextTodosFromToolEvent, parseTodoPatch, parseTodoRevision, parseTodos, todoTree } from './todos' +import { + latestSessionTodos, + mergeTodoItems, + nextTodosFromToolEvent, + parseTodoPatch, + parseTodoRevision, + parseTodos, + todoTree +} from './todos' describe('todoTree', () => { it('orders parents before children with depths', () => { diff --git a/apps/desktop/src/lib/todos.ts b/apps/desktop/src/lib/todos.ts index ceae854352..97aa7308d4 100644 --- a/apps/desktop/src/lib/todos.ts +++ b/apps/desktop/src/lib/todos.ts @@ -166,6 +166,7 @@ export function mergeTodoItems(current: readonly TodoItem[], patch: readonly Tod if (index === undefined) { next.push({ content: item.content?.trim() || '(no description)', id: item.id, status: item.status }) indexById.set(item.id, next.length - 1) + continue }