feat: let guests publish a CommunityRule and claim it on this browser later

Finalize no longer requires a magic link. Guest rows stay off the catalog until sign-in on the same browser attaches ownership, and the login modal kebab no longer acts as a second close.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-26 11:01:10 -06:00
co-authored by Cursor
parent bf4020005a
commit 950b3224ac
23 changed files with 689 additions and 31 deletions
+25 -4
View File
@@ -191,7 +191,7 @@ function CreateFlowLayoutContent({
useState(false);
const [completedFlowBanner, setCompletedFlowBanner] = useState<{
key: string;
status: "positive" | "danger";
status: "positive" | "danger" | "warning";
title: string;
description?: string;
} | null>(null);
@@ -257,6 +257,25 @@ function CreateFlowLayoutContent({
openLogin,
updateState,
loginReturnPath,
sessionUser,
onGuestPublished: ({ skippedInvites }) => {
const completedCopy = create.reviewAndComplete.completed;
if (skippedInvites) {
setCompletedFlowBanner({
key: "guestInvitesSkipped",
status: "warning",
title: completedCopy.guestInvitesSkippedTitle,
description: completedCopy.guestInvitesSkippedDescription,
});
return;
}
setCompletedFlowBanner({
key: "guestClaimHint",
status: "warning",
title: completedCopy.guestClaimHintTitle,
description: completedCopy.guestClaimHintDescription,
});
},
});
const {
@@ -518,7 +537,7 @@ function CreateFlowLayoutContent({
*/
const topBanners: Array<{
key: string;
status: "danger" | "positive";
status: "danger" | "positive" | "warning";
title: string;
description?: string;
onClose: () => void;
@@ -655,7 +674,7 @@ function CreateFlowLayoutContent({
<CreateFlowTopNav
hasShare={isCompletedStep}
hasExport={isCompletedStep}
hasEdit={isCompletedStep}
hasEdit={isCompletedStep && Boolean(sessionUser)}
hasManageStakeholders={isEditRuleStep}
saveDraftOnExit={saveDraftOnExit}
onShare={
@@ -882,7 +901,9 @@ function CreateFlowLayoutContent({
buttonType="filled"
palette="default"
size="xsmall"
disabled={isPublishing}
disabled={
isPublishing || (isFinalReviewLike && !sessionResolved)
}
className={CREATE_FLOW_FOOTER_BUTTON_CLASS}
onClick={() => {
if (isFinalReviewLike) {