Treat review-page value modals as unchanged when field blocks match the open snapshot so close does not ask to discard a view-only visit.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-21 16:41:03 -06:00
co-authored by Cursor
parent 440b6a9657
commit e416f37940
2 changed files with 87 additions and 4 deletions
@@ -422,7 +422,7 @@ export function FinalReviewChipEditModal({
true,
coreCustomizeSnapshotRef.current,
draft?.groupKey === "coreValues" ? draft.value : null,
null,
draftFieldBlocks,
customizeHeaderDraft,
))
) {
@@ -605,7 +605,7 @@ export function FinalReviewChipEditModal({
true,
coreCustomizeSnapshotRef.current,
draft?.groupKey === "coreValues" ? draft.value : null,
null,
draftFieldBlocks,
customizeHeaderDraft,
))
) {
@@ -622,6 +622,7 @@ export function FinalReviewChipEditModal({
confirmDiscard,
customizeHeaderDraft,
draft,
draftFieldBlocks,
finalizeModalClose,
onInteract,
replaceState,
@@ -647,7 +648,7 @@ export function FinalReviewChipEditModal({
true,
coreCustomizeSnapshotRef.current,
draft.value,
null,
draftFieldBlocks,
customizeHeaderDraft,
))
) {
@@ -696,6 +697,7 @@ export function FinalReviewChipEditModal({
confirmDiscard,
customizeHeaderDraft,
draft,
draftFieldBlocks,
modalKebabMenu.duplicateTitleSuffix,
onEditTargetChange,
onInteract,
@@ -790,7 +792,7 @@ export function FinalReviewChipEditModal({
});
coreCustomizeSnapshotRef.current = captureMethodCardCustomizeSnapshot(
draft.value,
null,
draftFieldBlocks,
customizeHeaderDraft ?? {
title: target.chipLabel,
description: "",
@@ -802,6 +804,7 @@ export function FinalReviewChipEditModal({
coreCustomizeSaveDisabled,
customizeHeaderDraft,
draft,
draftFieldBlocks,
onInteract,
onSave,
state.customMethodCardFieldBlocksById,