Skip setup questions on the template path and collect name, photo, and description without recommendations.

Customize opens a dialog then walks the template decks; Use without changes lands on final review with Has Name Field. Template cards stay first, the engine is not called, and the catalog no longer shows a recommended tag.
This commit is contained in:
adilallo committed 2026-11-09 17:34:33 -07:00
1 parent 53d236d0d5
commit 6498d52541
37 files changed
+1450 -733

No files matched your search

@@ -35,6 +35,11 @@ import {
} from "../../../../../lib/create/methodCardWizardPrefill";
import type { CustomMethodCardFieldBlock } from "../../../../../lib/create/customMethodCardFieldBlocks";
import { uploadCreateFlowFile } from "../../../../../lib/create/uploadToServer";
import {
orderIdsFirst,
templatePathFromState,
templateValueIdsForSlug,
} from "../../../../../lib/create/templatePath";
const MAX_CORE_VALUES = MAX_SELECTED_CORE_VALUES;
@@ -114,13 +119,16 @@ export function CoreValuesSelectScreen() {
const initialDraftRef = useRef<CoreValueDetailEntry | null>(null);
const pendingEphemeralCoreDuplicateRef = useRef<string | null>(null);
const [coreValueOptions, setCoreValueOptions] = useState<ChipOption[]>(() =>
buildCoreValueChipOptionsFromDraft(
const [coreValueOptions, setCoreValueOptions] = useState<ChipOption[]>(() => {
const base = buildCoreValueChipOptionsFromDraft(
presets,
state.coreValuesChipsSnapshot,
state.selectedCoreValueIds,
),
);
);
const path = templatePathFromState(state);
if (!path) return base;
return orderIdsFirst(base, templateValueIdsForSlug(path.slug));
});
const [activeModalChipId, setActiveModalChipId] = useState<string | null>(
null,
@@ -137,18 +145,23 @@ export function CoreValuesSelectScreen() {
CustomMethodCardFieldBlock[] | null
>(null);
const templatePathSlug = templatePathFromState(state)?.slug;
useEffect(() => {
const base = buildCoreValueChipOptionsFromDraft(
presets,
state.coreValuesChipsSnapshot,
state.selectedCoreValueIds,
);
setCoreValueOptions(
buildCoreValueChipOptionsFromDraft(
presets,
state.coreValuesChipsSnapshot,
state.selectedCoreValueIds,
),
templatePathSlug
? orderIdsFirst(base, templateValueIdsForSlug(templatePathSlug))
: base,
);
}, [
presets,
state.coreValuesChipsSnapshot,
state.selectedCoreValueIds,
templatePathSlug,
]);
/** Sync chips to create-flow draft. Never call `updateState` from inside a `setCoreValueOptions` updater — defer with `queueMicrotask`. */