Perf/react query optimization and error handling - #8
Merged
kalayciburak merged 2 commits intoNov 2, 2025
Conversation
Migrate resource fetching from Zustand to React Query for better caching and automatic data synchronization. Add error boundary for improved crash handling and bundle size optimizations. Changes: - Migrate resource fetching to React Query with automatic polling - Add useResources hook with 5s refetch interval - Optimize bundle size with lazy-loaded DevTools - Add ErrorBoundary component for crash recovery - Update useDashboardState to use React Query hooks Benefits: - Automatic background data synchronization - Better caching and reduced API calls - Smaller production bundle (DevTools excluded) - Graceful error handling with user-friendly UI - Reduced polling complexity
Reverted resource fetching back to Zustand store with existing smart polling mechanism. Removed useResources hook with continuous 5-second polling that created unnecessary API traffic. Changes: - Remove useResources hook entirely - Revert useDashboardState to use Zustand store - Keep existing smart polling (only during start/stop/delete) - Polling only active when operations are in progress - Manual refresh on button click Benefits: - No continuous API polling - Only poll during active operations - Reduced API traffic significantly - Existing smart polling logic preserved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.