mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-19 10:43:08 +00:00
Fixes critical React crash on the Kanban board view (#830)
* Changes from fix/board-react-crash * fix: Prevent cascading re-renders and crashes from high-frequency WS events
This commit is contained in:
19
apps/ui/src/lib/feature-transition-state.ts
Normal file
19
apps/ui/src/lib/feature-transition-state.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Lightweight module-level state tracking which features are mid-transition
|
||||
* (e.g., being cancelled). Used by useAutoModeQueryInvalidation to skip
|
||||
* redundant cache invalidations while persistFeatureUpdate is in flight.
|
||||
*/
|
||||
|
||||
const transitioningFeatures = new Set<string>();
|
||||
|
||||
export function markFeatureTransitioning(featureId: string): void {
|
||||
transitioningFeatures.add(featureId);
|
||||
}
|
||||
|
||||
export function unmarkFeatureTransitioning(featureId: string): void {
|
||||
transitioningFeatures.delete(featureId);
|
||||
}
|
||||
|
||||
export function isAnyFeatureTransitioning(): boolean {
|
||||
return transitioningFeatures.size > 0;
|
||||
}
|
||||
Reference in New Issue
Block a user