From 556f18c9c91238769675f1e13868d4bc0a4c54a7 Mon Sep 17 00:00:00 2001 From: Venkatesh <75518037+Venkateshvenki404224@users.noreply.github.com> Date: Sun, 4 Oct 2026 08:30:10 -0400 Subject: [PATCH] fix: stop the task board silently dropping a busy project's open tasks A project with 119 open tasks rendered as a completely empty board: Someday, Backlog, To Do and In Progress all showed zero while Done showed hundreds. TasksPage ran one unscoped query -- every non-archived task, `due_date asc`, limit 500 -- and `filtered` then narrowed those rows client-side. A filter cannot recover a row the server never sent, so the project chip could only ever reveal what happened to land in those 500 rows. With 1,013 tasks on the site and 918 of them in one project, the window filled with that project's completed work. Of the 500 rows reaching the browser, 427 were Moltbook and every one was Done; the 513 rows cut at the boundary included 118 To Do, 1 In Progress and 4 Blocked. No UI action could bring them back. `due_date asc` made it worse by being an arbitrary order here: no task on the site has a due date, so the tie-break decided which rows survived truncation. Changes: - TasksPage sends `project` to the server when a project is selected, so the row budget is spent on rows that can actually be shown. Status, priority and assignee stay client-side, keeping those toggles instant. - Order by `due_date asc, modified desc` in both list views, so a truncated window keeps recently-touched work instead of an arbitrary slice. - Raise the limits 500 -> 2000. ProjectDetailPage was already project-scoped but still truncated a 918-task project. - ProjectsTab (dashboard) derives per-project counts from its rows, so the short window was not just hiding tasks, it was reporting wrong totals on every card. Same limit raise plus an explicit stable order. Verified against the live site through the same /api/v2/document endpoint useList calls, old shape vs new: old (unscoped, 500, due_date asc): 500 rows, 427 Moltbook, 0 open visible new (scoped, 2000, +modified desc): 918 rows, 117 To Do + 2 In Progress = 119 Per-project open counts now resolve correctly (Moltbook 119, GemZy 1, AI-Native PM 5, Control Plane 1, BenchPress 1), and the no-project view returns all 1,013 non-archived tasks. yarn typecheck and yarn lint both clean. --- frontend/src/components/dashboard/ProjectsTab.vue | 3 ++- frontend/src/pages/ProjectDetailPage.vue | 4 ++-- frontend/src/pages/TasksPage.vue | 10 +++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/dashboard/ProjectsTab.vue b/frontend/src/components/dashboard/ProjectsTab.vue index 810b32f..c9a2110 100644 --- a/frontend/src/components/dashboard/ProjectsTab.vue +++ b/frontend/src/components/dashboard/ProjectsTab.vue @@ -39,7 +39,7 @@ import type { HiveProject, HiveTask } from '@/types' /** Enough projects and tasks for an overview; the Projects page paginates. */ const PROJECT_LIMIT = 100 -const TASK_LIMIT = 500 +const TASK_LIMIT = 2000 interface TaskCounts { total: number @@ -75,6 +75,7 @@ const tasks = useList({ doctype: 'Hive Task', fields: ['name', 'project', 'status', 'is_internal'], filters: { is_archived: 0 }, + orderBy: 'modified desc', limit: TASK_LIMIT, cacheKey: 'dashboard-project-tasks', }) diff --git a/frontend/src/pages/ProjectDetailPage.vue b/frontend/src/pages/ProjectDetailPage.vue index 23385f8..5651fa2 100644 --- a/frontend/src/pages/ProjectDetailPage.vue +++ b/frontend/src/pages/ProjectDetailPage.vue @@ -273,8 +273,8 @@ const tasks = useList({ 'modified', ], filters: () => ({ project: projectName.value, is_archived: 0 }), - orderBy: 'due_date asc', - limit: 500, + orderBy: 'due_date asc, modified desc', + limit: 2000, immediate: false, }) diff --git a/frontend/src/pages/TasksPage.vue b/frontend/src/pages/TasksPage.vue index 533dad7..6a38228 100644 --- a/frontend/src/pages/TasksPage.vue +++ b/frontend/src/pages/TasksPage.vue @@ -230,6 +230,10 @@ const hideProject = computed(() => Boolean(projectFilter.value) || groupBy.value // -- data ---------------------------------------------------------------- +const taskFilters = computed(() => + projectFilter.value ? { is_archived: 0, project: projectFilter.value } : { is_archived: 0 }, +) + const tasks = useList({ doctype: 'Hive Task', fields: [ @@ -251,9 +255,9 @@ const tasks = useList({ 'creation', 'modified', ], - filters: { is_archived: 0 }, - orderBy: 'due_date asc', - limit: 500, + filters: taskFilters, + orderBy: 'due_date asc, modified desc', + limit: 2000, cacheKey: 'tasks-page', })