mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-04 19:41:02 +08:00
## Problem When creating/editing/deleting traders, AI models, or exchanges, the UI takes 3-4 seconds to show results, causing users to think the system is frozen. ## Root Cause Although mutateTraders() was called after operations, it was not awaited, causing the function to continue immediately without waiting for data refresh. The UI relied on the refreshInterval: 5000 automatic refresh, resulting in up to 5 seconds of delay. ## Solution Added await before all mutateTraders() calls to ensure data is refreshed before closing modals or showing success messages. Changes: - handleCreateTrader: Added await before mutateTraders() - handleSaveEditTrader: Added await before mutateTraders() - handleDeleteTrader: Added await before mutateTraders() - handleToggleTrader: Added await before mutateTraders() Impact: - From 3-4s delay to immediate display (< 500ms) - Significantly improved UX - Consistent with AI model and exchange config behavior Testing: - Frontend build successful - No TypeScript errors - Ready for manual UI testing Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>