fix(canvas): default render compares to preview mode

This commit is contained in:
2026-04-04 08:06:35 +02:00
parent 8f2c3192d8
commit 12202ad337
3 changed files with 164 additions and 1 deletions

View File

@@ -148,7 +148,9 @@ export default function CompareNode({ id, data, selected, width }: NodeProps) {
[incomingEdges, nodesById],
);
const shouldDefaultToPreview =
resolvedSides.left.isStaleRenderOutput || resolvedSides.right.isStaleRenderOutput;
hasConnectedRenderInput ||
resolvedSides.left.isStaleRenderOutput ||
resolvedSides.right.isStaleRenderOutput;
const effectiveDisplayMode =
manualDisplayMode ?? (shouldDefaultToPreview ? "preview" : "render");
const previewNodeWidth = Math.max(240, Math.min(640, Math.round(width ?? 500)));