diff --git a/apps/web/components/task/changes-panel-data.tsx b/apps/web/components/task/changes-panel-data.tsx index 2a2a2afb98..6d9e08b39b 100644 --- a/apps/web/components/task/changes-panel-data.tsx +++ b/apps/web/components/task/changes-panel-data.tsx @@ -92,7 +92,7 @@ export type ChangesPanelBodyProps = { loadingOperation: string | null; dialogs: DialogsType; onOpenDiffFile: (path: string, options?: OpenDiffOptions) => void; - onEditFile: (path: string) => void; + onEditFile: (path: string, repo?: string) => void; onOpenCommitDetail?: (sha: string, repo?: string) => void; onOpenReview?: () => void; onRevertCommit?: (sha: string, repo?: string) => void; @@ -265,7 +265,7 @@ export function useChangesPanelData() { type ChangesPanelCallbacks = { onOpenDiffFile: (path: string, options?: OpenDiffOptions) => void; - onEditFile: (path: string) => void; + onEditFile: (path: string, repo?: string) => void; onOpenCommitDetail?: (sha: string, repo?: string) => void; onOpenReview?: () => void; }; diff --git a/apps/web/components/task/changes-panel-file-row.test.tsx b/apps/web/components/task/changes-panel-file-row.test.tsx index a3da1200a9..138e6a17f4 100644 --- a/apps/web/components/task/changes-panel-file-row.test.tsx +++ b/apps/web/components/task/changes-panel-file-row.test.tsx @@ -108,14 +108,18 @@ describe("FileRow truncation (regression: path overlaps diff stats in narrow pan }); }); - it("opens image files in the file preview instead of the diff viewer", () => { + it("opens image files in the file preview with repository context", () => { const onOpenDiff = vi.fn(); const onEditFile = vi.fn(); const { container } = render(