mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-25 00:33: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:
@@ -281,6 +281,10 @@ function VirtualizedList<Item extends VirtualListItem>({
|
||||
);
|
||||
}
|
||||
|
||||
// Stable empty Set to use as default prop value. Using `new Set()` inline in
|
||||
// the destructuring creates a new reference on every render, defeating memo.
|
||||
const EMPTY_FEATURE_IDS = new Set<string>();
|
||||
|
||||
export const KanbanBoard = memo(function KanbanBoard({
|
||||
activeFeature,
|
||||
getColumnFeatures,
|
||||
@@ -317,7 +321,7 @@ export const KanbanBoard = memo(function KanbanBoard({
|
||||
onOpenPipelineSettings,
|
||||
isSelectionMode = false,
|
||||
selectionTarget = null,
|
||||
selectedFeatureIds = new Set(),
|
||||
selectedFeatureIds = EMPTY_FEATURE_IDS,
|
||||
onToggleFeatureSelection,
|
||||
onToggleSelectionMode,
|
||||
onAiSuggest,
|
||||
|
||||
Reference in New Issue
Block a user