feat(metrics): recompute reads manual entries, methodology states them
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
47d19f9f38
commit
5d772ef672
2 changed files with 11 additions and 1 deletions
|
|
@ -38,6 +38,15 @@ export function Methodology({ metrics }: { metrics: ProjectMetrics }) {
|
|||
)}
|
||||
</p>
|
||||
|
||||
{metrics.manualMinutes > 0 && (
|
||||
<p>
|
||||
<span className="tabular">{Math.round(metrics.manualMinutes / 60)}</span>{" "}
|
||||
{Math.round(metrics.manualMinutes / 60) === 1 ? "hour was" : "hours were"}{" "}
|
||||
logged directly by the developer rather than estimated from commit
|
||||
timing.
|
||||
</p>
|
||||
)}
|
||||
|
||||
<p>
|
||||
Active days are counted against{" "}
|
||||
<strong className="text-text-primary">workdays</strong> — weekdays
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export async function recomputeMetrics(projectId: string): Promise<ProjectMetric
|
|||
|
||||
const commits = await pb.collection("commits").getFullList<CommitRecord>({
|
||||
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<ProjectMetric
|
|||
scope: c.scope ?? "",
|
||||
authoredAt: c.authored_at,
|
||||
isMerge: Boolean(c.is_merge),
|
||||
manualMinutes: c.source === "manual" ? (c.manual_minutes ?? 0) : undefined,
|
||||
})),
|
||||
constantsFor(project)
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue