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:
@@ -278,6 +278,18 @@ export class ExecutionOrchestrator {
|
||||
|
||||
const projects = await this.projectRepository.findProjectsByInitiativeId(phase.initiativeId);
|
||||
|
||||
// Store merge base before merging so we can reconstruct diffs for completed phases
|
||||
for (const project of projects) {
|
||||
const clonePath = await ensureProjectClone(project, this.workspaceRoot);
|
||||
try {
|
||||
const mergeBase = await this.branchManager.getMergeBase(clonePath, initBranch, phBranch);
|
||||
await this.phaseRepository.update(phaseId, { mergeBase });
|
||||
break; // Only need one merge base (first project)
|
||||
} catch {
|
||||
// Phase branch may not exist in this project clone
|
||||
}
|
||||
}
|
||||
|
||||
for (const project of projects) {
|
||||
const clonePath = await ensureProjectClone(project, this.workspaceRoot);
|
||||
const result = await this.branchManager.mergeBranch(clonePath, phBranch, initBranch);
|
||||
|
||||
Reference in New Issue
Block a user