fix(session): accept legacy summary diffs (#26579)

Co-authored-by: Developer <temp@example.com>
This commit is contained in:
Kit Langton
2026-05-09 16:44:24 -04:00
committed by GitHub
co-authored by Developer
parent 5fa5d876fc
commit d373c562f2
12 changed files with 88 additions and 15 deletions
@@ -62,7 +62,12 @@ export type SessionReviewCommentActions = {
export type SessionReviewFocus = { file: string; id: string }
type ReviewDiff = (SnapshotFileDiff | VcsFileDiff) & { preloaded?: PreloadMultiFileDiffResult<any> }
type RawReviewDiff = (SnapshotFileDiff | VcsFileDiff) & {
preloaded?: PreloadMultiFileDiffResult<any>
}
type ReviewDiff = ((SnapshotFileDiff & { file: string }) | VcsFileDiff) & {
preloaded?: PreloadMultiFileDiffResult<any>
}
type Item = ViewDiff & { preloaded?: PreloadMultiFileDiffResult<any> }
function diff(value: unknown): value is ReviewDiff {
@@ -108,7 +113,7 @@ export interface SessionReviewProps {
classList?: Record<string, boolean | undefined>
classes?: { root?: string; header?: string; container?: string }
actions?: JSX.Element
diffs: ReviewDiff[]
diffs: RawReviewDiff[]
onViewFile?: (file: string) => void
readFile?: (path: string) => Promise<FileContent | undefined>
lineCommentMention?: LineCommentEditorProps["mention"]