From 3b8d40fea3d10414597d252952914fee11021006 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 10 Apr 2026 08:38:02 -0400 Subject: [PATCH] feat: overall completion bar on project cards; auto-collapse done milestones ProjectListView: add an overall task completion bar above the per-milestone bars showing the percentage of all project tasks that are done. ProjectView: milestones where every task is complete now start collapsed by default, keeping the view clean for projects with many finished stages. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/views/ProjectListView.vue | 48 ++++++++++++++++++++++++++ frontend/src/views/ProjectView.vue | 10 ++++++ 2 files changed, 58 insertions(+) diff --git a/frontend/src/views/ProjectListView.vue b/frontend/src/views/ProjectListView.vue index f0e7079..e45e68a 100644 --- a/frontend/src/views/ProjectListView.vue +++ b/frontend/src/views/ProjectListView.vue @@ -113,6 +113,14 @@ function truncate(text: string | null, max = 120): string { if (!text) return ""; return text.length > max ? text.slice(0, max) + "..." : text; } + +function overallPct(project: Project): { total: number; pct: number } { + const counts = project.summary?.task_counts; + if (!counts) return { total: 0, pct: 0 }; + const total = (counts.todo ?? 0) + (counts.in_progress ?? 0) + (counts.done ?? 0); + const pct = total > 0 ? Math.round((counts.done ?? 0) / total * 100) : 0; + return { total, pct }; +}