feat(FN-4527): complete Step 3 — document done-task diffStats contract

Fusion-Task-Id: FN-4527
Fusion-Task-Lineage: de75c453-dc86-43d2-9cc5-50b20ee7014d
This commit is contained in:
Fusion
2026-05-14 17:48:24 -07:00
committed by gsxdsm
parent 73a5fe3c22
commit 5d8b1393be

View File

@@ -70,9 +70,11 @@ export function __test_clearDiffStatsCache(): void {
* Fetches diff stats for a task's Changes tab.
*
* For active worktree-backed tasks, this keeps the TaskCard count aligned with
* the Changes tab. For done tasks, it always uses `/api/tasks/:id/diff`, whose
* server-side aggregation is the canonical source (including multi-commit
* lineage unions), instead of trusting `mergeDetails.filesChanged`.
* the Changes tab. For done tasks, this hook's `stats` is the authoritative
* source from `/api/tasks/:id/diff` (including multi-commit lineage unions).
* Per FN-4527, consumers must not fall back to `task.mergeDetails.filesChanged`
* once `loading` is false and `stats` is null: stored mergeDetails counts can
* be stale after post-merge rebase-and-push flows (see FN-4526).
*
* @param taskId - Task identifier
* @param column - Current task column