fix(workbench): avoid duplicate Flow after create - #84
Conversation
Reuse the idempotent catalog insert path when a create notification reloads before the request completes. Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. Summary by CodeRabbit
Walkthrough
Merge Risk: ⚪ Minimal · up to Flow creation now avoids duplicate catalog entries when a refresh races the create response, with regression coverage for the final item count and total. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches✨ Simplify code
Comment |
Summary
Motivation
The Server publishes
flows.changedbefore returning the create response. If the Workbench reloads the catalog beforeFlowCatalog.create()resumes, the previous implementation appended the same Flow again and incrementedtotaltwice.Verification
bun run --cwd packages/open-flow checkbun run testbun run build