fix: preserve staged and unstaged changes per file (#3104)

This commit is contained in:
José Almeida
2026-08-30 13:26:18 +00:00
committed by GitHub
parent c946140812
commit cc2ee0b43d
48 changed files with 2075 additions and 112 deletions
@@ -10,7 +10,7 @@ import type { FileInfo } from "@/lib/state/store";
import type { PRDiffFile } from "@/lib/types/github";
import { normalizeFileChangeStatus, type FileChangeStatus } from "@/lib/utils/file-change-status";
import type { PRChangedFile } from "./changes-panel-timeline";
import type { CommitDetailTarget } from "./changes-diff-target";
import type { ChangeLayer, CommitDetailTarget } from "./changes-diff-target";
import type { CommitPresentation } from "./commit-row";
export type ChangedFile = {
@@ -22,6 +22,7 @@ export type ChangedFile = {
oldPath: string | undefined;
/** Repository this file belongs to in multi-repo workspaces; empty for single-repo. */
repositoryName?: string;
changeLayer?: ChangeLayer;
};
/**
@@ -62,6 +63,7 @@ export function mapToChangedFiles(files: FileInfo[]): ChangedFile[] {
minus: file.deletions,
oldPath: file.old_path,
repositoryName: file.repository_name,
changeLayer: file.change_layer,
}));
}