From 5d772ef672a660bde44c7c0e88e817e32fc6b561 Mon Sep 17 00:00:00 2001 From: Dave Date: Sat, 19 Sep 2026 10:34:25 +0200 Subject: [PATCH] feat(metrics): recompute reads manual entries, methodology states them Co-Authored-By: Claude Haiku 4.5 --- src/components/dashboard/methodology.tsx | 9 +++++++++ src/lib/metrics/store.ts | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/dashboard/methodology.tsx b/src/components/dashboard/methodology.tsx index 0a9d046..a24f627 100644 --- a/src/components/dashboard/methodology.tsx +++ b/src/components/dashboard/methodology.tsx @@ -38,6 +38,15 @@ export function Methodology({ metrics }: { metrics: ProjectMetrics }) { )}

+ {metrics.manualMinutes > 0 && ( +

+ {Math.round(metrics.manualMinutes / 60)}{" "} + {Math.round(metrics.manualMinutes / 60) === 1 ? "hour was" : "hours were"}{" "} + logged directly by the developer rather than estimated from commit + timing. +

+ )} +

Active days are counted against{" "} workdays — weekdays diff --git a/src/lib/metrics/store.ts b/src/lib/metrics/store.ts index abb5227..e978068 100644 --- a/src/lib/metrics/store.ts +++ b/src/lib/metrics/store.ts @@ -42,7 +42,7 @@ export async function recomputeMetrics(projectId: string): Promise({ filter: `project = "${projectId}"`, - fields: "type,scope,authored_at,is_merge", + fields: "type,scope,authored_at,is_merge,source,manual_minutes", }); const metrics = computeProjectMetrics( @@ -51,6 +51,7 @@ export async function recomputeMetrics(projectId: string): Promise