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:
gsxdsm
2026-03-03 19:23:44 -08:00
committed by GitHub
parent ae48065820
commit dd7108a7a0
9 changed files with 212 additions and 153 deletions

View File

@@ -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,