Let Use without changes from a template collect identity instead of the full questionnaire.

Direct catalog picks walk name, description, and photo, then stakeholders; leftover drafts no longer skip that path. In-flow template picks keep community identity. Exit on a direct template preview leaves immediately because nothing has been collected yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-09-02 17:00:17 -06:00
co-authored by Cursor
parent f91ac7a893
commit b6afdb6e32
14 changed files with 457 additions and 100 deletions
+16 -2
View File
@@ -25,6 +25,7 @@ import {
getNextStep,
parseReviewReturnSearchParam,
shouldOfferCreateFlowSaveAndExit,
isDirectTemplateReviewEntry,
createFlowStepUsesSelectSplitScroll,
TEMPLATES_FACET_RECOMMEND_QUERY,
TEMPLATES_FACET_RECOMMEND_VALUE,
@@ -155,9 +156,9 @@ function CreateFlowLayoutContent({
const {
currentStep,
nextStep,
previousStep,
goToNextStep,
goToPreviousStep,
canGoBack,
templateReviewFooterBackToCreateReview,
} = useCreateFlowNavigation(
skipCommunitySave ? { skipCommunitySave: true } : undefined,
@@ -281,6 +282,9 @@ function CreateFlowLayoutContent({
},
});
const fromCreateWizard =
searchParams.get(TEMPLATE_REVIEW_FROM_CREATE_FLOW_QUERY) ===
TEMPLATE_REVIEW_FROM_CREATE_FLOW_VALUE;
const {
isTemplateReviewRoute,
templateReviewSlug,
@@ -295,6 +299,8 @@ function CreateFlowLayoutContent({
updateState,
replaceState,
router,
fromCreateWizard,
markCreateFlowInteraction,
});
const runAuthenticatedExit = useCreateFlowExit({
@@ -308,6 +314,14 @@ function CreateFlowLayoutContent({
});
const handleExit = async (opts?: { saveDraft?: boolean }) => {
// Direct template preview: browsing a catalog card, nothing collected yet.
// In-flow (`?fromFlow=1`) still has community progress — keep save / confirm.
if (isDirectTemplateReviewEntry(pathname, searchParams)) {
clearState();
router.push(CREATE_ROUTES.root);
return;
}
if (!sessionResolved) return;
// Completed is post-publish. Guests still need Save & Exit → keep-this-rule
@@ -979,7 +993,7 @@ function CreateFlowLayoutContent({
),
);
}
: previousStep
: canGoBack()
? goToPreviousStep
: undefined
}