Refactor state handling in DiagramEditor:
- Replace multiple refs with a unified `stateRef` for improved synchronization and stable callback operations. - Update `httpClient` to prepend `/api` to all requests for consistent API pathing. - Enhance step rendering with subtle scaling and transitions for improved user interaction feedback. - Optimize `handleSave` and mouse handling logic with streamlined access to the latest state.