Keep catalog method section editors after a Customize title override so Core Principle and related copy are not replaced by an empty custom-policy body.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-21 14:11:21 -06:00
co-authored by Cursor
parent 4006fe5c6c
commit 75ba0a214f
7 changed files with 152 additions and 7 deletions
+11
View File
@@ -213,6 +213,17 @@ export function readMethodPresetsForFacetGroup(
return readMethodsArray(METHOD_MESSAGES[groupKey]);
}
const CATALOG_METHOD_CARD_IDS: ReadonlySet<string> = new Set(
METHOD_FACET_API_SECTION_IDS.flatMap((group) =>
readMethodPresetsForFacetGroup(group).map((row) => row.id),
),
);
/** True when `methodId` is a shipped catalog slug, not a user-authored UUID. */
export function isCatalogMethodCardId(methodId: string): boolean {
return CATALOG_METHOD_CARD_IDS.has(methodId);
}
export function assignTemplateMethodSlugsToPrefill(
prefill: Partial<CreateFlowState>,
normalizedCategoryKey: string,