Compare commits

...

1 commit

Author SHA1 Message Date
le king fu
054efd14ed Sort completed subtasks to bottom of list
Fixes #12: completed subtasks now sort after uncompleted ones,
keeping actionable items at the top. Applied to both task detail
view and home screen widget.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:52:47 -05:00
2 changed files with 2 additions and 2 deletions

View file

@ -105,7 +105,7 @@ export async function getSubtasks(parentId: string) {
.select()
.from(tasks)
.where(eq(tasks.parentId, parentId))
.orderBy(asc(tasks.position));
.orderBy(asc(tasks.completed), asc(tasks.position));
}
export async function getTaskById(id: string) {

View file

@ -117,7 +117,7 @@ export async function syncWidgetData(): Promise<void> {
.select({ id: tasks.id, title: tasks.title, completed: tasks.completed })
.from(tasks)
.where(eq(tasks.parentId, task.id))
.orderBy(asc(tasks.position));
.orderBy(asc(tasks.completed), asc(tasks.position));
task.subtasks = subs;
}
}