Skip to content

Commit 3ce3dbb

Browse files
dcramerclaude
andcommitted
fix(sync): Pass store parameter in recursive shouldMarkCompleted calls
The shouldMarkCompleted function recursively calls itself without passing the store parameter, causing 3+ level task hierarchies to fail. Intermediate tasks without commits are incorrectly treated as leaf tasks, preventing parent issues from closing even when all actual leaf tasks have commits. Fixes #110 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a4ea6b8 commit 3ce3dbb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/core/github/sync.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,9 @@ export class GitHubSyncService {
696696
const descendants = collectDescendants(store.tasks, task.id);
697697
if (descendants.length > 0) {
698698
// Parent is "completed" only when ALL descendants have verified commits on remote
699-
return descendants.every((d) => this.shouldMarkCompleted(d.task));
699+
return descendants.every((d) =>
700+
this.shouldMarkCompleted(d.task, store),
701+
);
700702
}
701703
}
702704

src/core/shortcut/sync.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,9 @@ export class ShortcutSyncService {
904904
const descendants = collectDescendants(store.tasks, task.id);
905905
if (descendants.length > 0) {
906906
// Parent is "completed" only when ALL descendants have verified commits on remote
907-
return descendants.every((d) => this.shouldMarkCompleted(d.task));
907+
return descendants.every((d) =>
908+
this.shouldMarkCompleted(d.task, store),
909+
);
908910
}
909911
}
910912

0 commit comments

Comments
 (0)