Bug Description
The entire flowchart state (blocks array) is stored only in React useState. Page refresh or accidental tab close permanently loses all work.
Steps to Reproduce
- Create a complex flowchart with 10+ blocks
- Press F5 or refresh the browser
- All blocks are gone - demo flowchart is shown instead
Expected Behavior
- Auto-save blocks to localStorage on every change
- Restore saved flowchart on page load
- Show a New Flowchart button to explicitly start fresh
Suggested Fix
Add useEffect to save blocks to localStorage on change, and initialize state from localStorage.
Bug Description
The entire flowchart state (blocks array) is stored only in React useState. Page refresh or accidental tab close permanently loses all work.
Steps to Reproduce
Expected Behavior
Suggested Fix
Add useEffect to save blocks to localStorage on change, and initialize state from localStorage.