Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/dull-moose-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@wso2is/admin.ask-password-flow-builder.v1": patch
"@wso2is/admin.password-recovery-flow-builder.v1": patch
"@wso2is/admin.registration-flow-builder.v1": patch
---

Fix flow builder showing stale flow state after publishing. Publishing now revalidates the cached flow, so returning to the builder reflects the latest saved changes.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const FlowContextWrapper: FC<AskPasswordFlowBuilderProviderProps> = ({
const { t } = useTranslation();
const { toObject } = useReactFlow();
const { data: supportedAttributes } = useGetSupportedProfileAttributes();
const { flowCompletionConfigs } = useAuthenticationFlowBuilderCore();
const { flowCompletionConfigs, setRefetchFlow } = useAuthenticationFlowBuilderCore();
const {
data: isNewAskPasswordPortalEnabled,
mutate: mutateNewAskPasswordPortalEnabledRequest
Expand Down Expand Up @@ -313,6 +313,8 @@ const FlowContextWrapper: FC<AskPasswordFlowBuilderProviderProps> = ({
})
);

setRefetchFlow(true);

return true;
} catch (error) {
dispatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const FlowContextWrapper: FC<PasswordRecoveryFlowBuilderProviderProps> = ({
const dispatch: Dispatch = useDispatch();
const { t } = useTranslation();
const { toObject } = useReactFlow();
const { flowCompletionConfigs } = useAuthenticationFlowBuilderCore();
const { flowCompletionConfigs, setRefetchFlow } = useAuthenticationFlowBuilderCore();
const { metadata } = useAuthenticationFlowBuilderCore();
const {
data: isNewPasswordRecoveryPortalEnabled,
Expand Down Expand Up @@ -198,6 +198,8 @@ const FlowContextWrapper: FC<PasswordRecoveryFlowBuilderProviderProps> = ({
})
);

setRefetchFlow(true);

return true;
} catch (error) {
dispatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const FlowContextWrapper: FC<RegistrationFlowBuilderProviderProps> = ({

const { toObject } = useReactFlow();
const { data: supportedAttributes } = useGetSupportedProfileAttributes();
const { flowCompletionConfigs } = useAuthenticationFlowBuilderCore();
const { flowCompletionConfigs, setRefetchFlow } = useAuthenticationFlowBuilderCore();

const [ selectedAttributes, setSelectedAttributes ] = useState<{ [key: string]: Attribute[] }>({});
const [ isPublishing, setIsPublishing ] = useState<boolean>(false);
Expand Down Expand Up @@ -135,6 +135,8 @@ const FlowContextWrapper: FC<RegistrationFlowBuilderProviderProps> = ({
})
);

setRefetchFlow(true);

return true;
} catch (error) {
dispatch(
Expand Down
Loading