fix: use merge-base for diffStat in merger and show files changed on done task cards

The merger was using `git diff HEAD..branch --stat` which includes
artifacts from other tasks when branches fork from older main commits.
Switch to `git diff $(merge-base)..branch --stat` so commit messages
only describe the branch's own changes.

Also surface the "files changed" button on done task cards using
mergeDetails, opening the same ChangedFilesModal with commit-backed
diffs (matching the Changes tab in the task modal).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-04 08:33:53 -07:00
parent f882c5aed9
commit d3a3cc71d6
9 changed files with 74 additions and 17 deletions

View File

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