fix: unify diff endpoints and show changed files on done task cards

- Server /tasks/:id/diff and /tasks/:id/file-diffs now both use
  resolveDiffBase() for consistent file lists across card and modal
- Both endpoints handle done tasks via mergeDetails.commitSha,
  returning structured { files, stats } from the merge commit
- TaskChangesTab uses fetchTaskDiff for all columns (no more
  fetchCommitDiff/parsePatch client-side path for done tasks)
- useChangedFiles hook simplified — server handles done tasks
- Done task cards show "N files changed" button using mergeDetails
- Updated tests for new unified data flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-04 08:55:46 -07:00
parent 4542d580c1
commit 9900c2d115
11 changed files with 212 additions and 208 deletions

View File

@@ -19,7 +19,6 @@ interface ChangedFilesModalProps {
worktree: string | undefined;
column: string;
projectId?: string;
commitSha?: string;
isOpen: boolean;
onClose: () => void;
}
@@ -67,7 +66,6 @@ export function ChangedFilesModal({
worktree,
column,
projectId,
commitSha,
isOpen,
onClose,
}: ChangedFilesModalProps) {
@@ -76,7 +74,6 @@ export function ChangedFilesModal({
worktree,
column,
projectId,
commitSha,
);
const [isMobile, setIsMobile] = useState(false);