This minimal fix addresses the issue where project collapse/expand functionality
becomes unresponsive when multiple sessions are simultaneously loading git status.
Changes include:
- Backend: Throttle git status events to 100ms intervals
- Backend: Limit concurrent git operations to 3
- Backend: Batch multiple git status updates
- Backend: Add cancellation support for git operations
- Frontend: Batch store updates with 50ms window
- Frontend: Add React.memo to prevent unnecessary re-renders
- Frontend: Skip non-essential updates during heavy loading
- Frontend: Cancel git status when collapsing projects
- Frontend: Implement performance safeguards
The optimizations ensure the UI remains responsive even when many sessions
are actively fetching git status information. Collapsing a project now
cancels any pending git status operations for its sessions.