Route kebab Customize through the prefilled policy wizard so existing methods and values can be renamed, reordered, and kept in that field order on the card after Finalize.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-21 13:51:37 -06:00
co-authored by Cursor
parent e9951f260b
commit 4006fe5c6c
31 changed files with 3062 additions and 1530 deletions
@@ -214,4 +214,39 @@ describe("applyFinalReviewChipEditPatch", () => {
"1": { meaning: "m2", signals: "s2" },
});
});
it("merges customMethodCardFieldBlocksById for a core values patch", () => {
const state: CreateFlowState = {
customMethodCardFieldBlocksById: {
other: [
{
kind: "text",
id: "x",
blockTitle: "T",
placeholderText: "keep",
},
],
},
};
const patch: FinalReviewChipEditPatch = {
groupKey: "coreValues",
overrideKey: "1",
value: { meaning: "m", signals: "s" },
customMethodCardFieldBlocks: [
{
kind: "text",
id: "facet-meaning",
blockTitle: "Meaning",
placeholderText: "m",
},
],
};
const result = applyFinalReviewChipEditPatch(state, patch);
expect(result.customMethodCardFieldBlocksById).toEqual({
other: state.customMethodCardFieldBlocksById?.other,
"1": patch.customMethodCardFieldBlocks,
});
});
});