Final review edit modals created

This commit is contained in:
adilallo
2026-04-20 17:57:17 -06:00
parent c08cd62872
commit a22d53e860
27 changed files with 2410 additions and 620 deletions
@@ -114,7 +114,11 @@ describe("buildFinalReviewCategoriesFromState", () => {
]);
});
it("does not duplicate Values when sections already includes one", () => {
it("prefers the chip snapshot over a duplicated Values section in sections", () => {
// The use-without-changes handler now strips Values from `sections` and
// seeds the snapshot, but legacy drafts persisted before that fix can
// still arrive here with both sources present. The snapshot wins so the
// final-review chip modal can attach edits via the per-chip id.
const state: CreateFlowState = {
sections: [
{
@@ -129,7 +133,7 @@ describe("buildFinalReviewCategoriesFromState", () => {
};
const rows = buildFinalReviewCategoriesFromState(state, NAMES);
expect(rows).toEqual([
{ name: "Values", chips: ["Consciousness"] },
{ name: "Values", chips: ["Accessibility"] },
]);
});
});