FN-5751: fix dashboard auto-merge toggle race
Prevent rapid auto-merge toggles from desynchronizing dashboard settings state. - Track auto-merge state in a ref so each toggle reads and writes the latest value - Apply optimistic updates from the ref and roll back correctly on failed setting updates - Add regression coverage for rapid double-toggle behavior in useAppSettings - Add a patch changeset for @runfusion/fusion describing the dashboard blank-state fix Files changed: .changeset/fn-5751-auto-merge-toggle.md | 5 ++++ .../app/hooks/__tests__/useAppSettings.test.ts | 27 ++++++++++++++++++++++ packages/dashboard/app/hooks/useAppSettings.ts | 20 +++++++++++----- 3 files changed, 46 insertions(+), 6 deletions(-) Fusion-Task-Id: FN-5751 Fusion-Task-Lineage: 1a0090ff-4015-46b8-a974-3accbbdce919
This commit is contained in:
5
.changeset/fn-5751-auto-merge-toggle.md
Normal file
5
.changeset/fn-5751-auto-merge-toggle.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
Fixes a dashboard regression where toggling the in-review Auto-merge switch could leave the UI in a broken/blank state until refresh. Auto-merge toggle state updates now remain consistent during rapid toggles, and regression coverage was added for the settings hook path.
|
||||
Reference in New Issue
Block a user