diff --git a/src/renderer/src/components/editor/ImageDiffViewer.tsx b/src/renderer/src/components/editor/ImageDiffViewer.tsx index 0c0303a50..2d2622702 100644 --- a/src/renderer/src/components/editor/ImageDiffViewer.tsx +++ b/src/renderer/src/components/editor/ImageDiffViewer.tsx @@ -48,8 +48,22 @@ export default function ImageDiffViewer({ mimeType, sideBySide }: ImageDiffViewerProps): JSX.Element { + // Why: in inline (single-column) mode the grid defaults to equal row + // heights, which squishes each preview into half the panel. Using + // minmax(32rem, 1fr) ensures content panes are tall enough to show a + // full page, and overflow-y-auto lets the user scroll between them. + // Empty "No preview" panes collapse to auto height. + const gridRowStyle = !sideBySide + ? { + gridTemplateRows: `${originalContent ? 'minmax(32rem, 1fr)' : 'auto'} ${modifiedContent ? 'minmax(32rem, 1fr)' : 'auto'}` + } + : undefined + return ( -
+
+
{/* Why: Electron's Chromium PDF viewer can fail to initialize inside a sandboxed iframe even when the Blob URL is valid. Using keeps the preview isolated to the browser's native PDF surface without @@ -104,7 +104,7 @@ export default function ImageViewer({
) : (