fix: Show completed phase diffs in review tab
Completed phases showed "No phases pending review" because: 1. Frontend filtered only pending_review phases 2. Server rejected non-pending_review phases 3. After merge, three-dot diff returned empty (merge base moved) Fix: store pre-merge merge base hash on phase, use it to reconstruct diffs for completed phases. Frontend now shows both pending_review and completed phases with read-only mode (Merged badge) for completed ones.
This commit is contained in:
@@ -141,6 +141,12 @@ export class SimpleGitBranchManager implements BranchManager {
|
||||
return git.diff([`${commitHash}~1`, commitHash]);
|
||||
}
|
||||
|
||||
async getMergeBase(repoPath: string, branch1: string, branch2: string): Promise<string> {
|
||||
const git = simpleGit(repoPath);
|
||||
const result = await git.raw(['merge-base', branch1, branch2]);
|
||||
return result.trim();
|
||||
}
|
||||
|
||||
async pushBranch(repoPath: string, branch: string, remote = 'origin'): Promise<void> {
|
||||
const git = simpleGit(repoPath);
|
||||
await git.push(remote, branch);
|
||||
|
||||
Reference in New Issue
Block a user