Close method-card Save like first add, keep key-resource chips on the approach they were chosen for, and leave expanded See-all stacks in catalog order.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-25 09:21:07 -06:00
co-authored by Cursor
parent b1ca1a748e
commit 963fa03c5c
12 changed files with 437 additions and 167 deletions
@@ -35,10 +35,6 @@ import {
decisionApproachPresetFor,
membershipPresetFor,
} from "../../../../lib/create/finalReviewChipPresets";
import {
applyDecisionApproachKeyResources,
selectedKeyResourceLabelsFromCheckedIds,
} from "../../../../lib/create/decisionApproachKeyResources";
import { isCustomMethodCardId } from "../../../../lib/create/isCustomMethodCardId";
import { usesWizardFieldBlocksModalBody } from "../../../../lib/create/usesWizardFieldBlocksModalBody";
import type { CustomMethodCardFieldBlock } from "../../../../lib/create/customMethodCardFieldBlocks";
@@ -1270,7 +1266,6 @@ function facetSeedSignature(
return JSON.stringify({
meta: state.customMethodCardMetaById?.[id] ?? null,
details: state.decisionApproachDetailsById?.[id] ?? null,
keyResources: state.selectedDecisionKeyResourceIds ?? null,
blocks: state.customMethodCardFieldBlocksById?.[id] ?? null,
});
case "conflictManagement":
@@ -1335,18 +1330,12 @@ function seedDraftForTarget(
const saved =
state.decisionApproachDetailsById?.[target.overrideKey] ??
decisionApproachPresetFor(target.overrideKey);
const withKeys = applyDecisionApproachKeyResources(
saved,
selectedKeyResourceLabelsFromCheckedIds(
state.selectedDecisionKeyResourceIds ?? [],
),
);
return {
groupKey: "decisionApproaches",
value: {
...withKeys,
applicableScope: [...withKeys.applicableScope],
selectedApplicableScope: [...withKeys.selectedApplicableScope],
...saved,
applicableScope: [...saved.applicableScope],
selectedApplicableScope: [...saved.selectedApplicableScope],
},
};
}