Skip to content

Fix flow builder stale state#10404

Open
VIHANGAGIT wants to merge 2 commits into
wso2:masterfrom
VIHANGAGIT:fix-flow-builder-stale-state
Open

Fix flow builder stale state#10404
VIHANGAGIT wants to merge 2 commits into
wso2:masterfrom
VIHANGAGIT:fix-flow-builder-stale-state

Conversation

@VIHANGAGIT

Copy link
Copy Markdown
Contributor

Purpose

  • Fixes a stale-state bug in the visual Flow Builder where, after publishing a flow, navigating away and returning showed the previous (pre-change) state rather than the just-saved flow. The change only became visible on a second return to the builder.

Related Issue

Approach

  • After a successful publish, trigger the existing setRefetchFlow(true) flag, which revalidates the cached flow GET so the builder always reflects the latest saved state on the next mount.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 5f41e18b-f5ff-4fd7-9358-2441fae7f43c

📥 Commits

Reviewing files that changed from the base of the PR and between 28dceb2 and bf4e2ad.

📒 Files selected for processing (1)
  • .changeset/honest-lines-raise.md
✅ Files skipped from review due to trivial changes (1)
  • .changeset/honest-lines-raise.md

📝 Walkthrough

Walkthrough

Three flow builder providers (ask-password, password-recovery, registration) each now destructure setRefetchFlow from useAuthenticationFlowBuilderCore and call setRefetchFlow(true) immediately after dispatching the publish success alert. A changeset records patch bumps for the four affected packages.

Changes

Post-publish flow cache revalidation

Layer / File(s) Summary
setRefetchFlow on publish success in all three providers
features/admin.ask-password-flow-builder.v1/providers/ask-password-flow-builder-provider.tsx, features/admin.password-recovery-flow-builder.v1/providers/password-recovery-flow-builder-provider.tsx, features/admin.registration-flow-builder.v1/providers/registration-flow-builder-provider.tsx, .changeset/honest-lines-raise.md
Each FlowContextWrapper adds setRefetchFlow to its useAuthenticationFlowBuilderCore destructuring and invokes setRefetchFlow(true) after the publish success alert is dispatched. The changeset applies patch bumps to @wso2is/console and all three flow-builder packages.

Possibly related issues

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description covers the purpose and approach, but is missing several required checklist items and the mandatory Developer Checklist section from the template. Complete the required checklist items (testing, security checks, documentation) and add the mandatory Developer Checklist section referencing the product-is issue.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix flow builder stale state' is concise and clearly conveys the main change—fixing a stale state bug in the flow builder.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Changeset Required ✅ Passed Pull request includes .changeset/honest-lines-raise.md with all required packages (@wso2is/console and three flow-builder packages) at appropriate patch versions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ create changeset

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.62%. Comparing base (e8a1a85) to head (bf4e2ad).
⚠️ Report is 31 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #10404    +/-   ##
========================================
  Coverage   72.62%   72.62%            
========================================
  Files         469      469            
  Lines       70633    70633            
  Branches      240      448   +208     
========================================
  Hits        51300    51300            
+ Misses      19222    19040   -182     
- Partials      111      293   +182     

see 182 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@VIHANGAGIT VIHANGAGIT force-pushed the fix-flow-builder-stale-state branch from 29c3bcb to 28dceb2 Compare June 14, 2026 08:59
Comment thread .changeset/honest-lines-raise.md
@VIHANGAGIT VIHANGAGIT marked this pull request as draft June 15, 2026 03:46
@VIHANGAGIT VIHANGAGIT marked this pull request as ready for review June 15, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants