web: Reduce FlowTable Redux subscriptions from O(rows) to O(1) by ariel42 · Pull Request #8104 · mitmproxy/mitmproxy
and others added 3 commits
February 27, 2026 15:35Lift shared state (displayColumnNames, flowIndex) from per-row/per-cell useAppSelector calls to the FlowTable parent component. This eliminates N identical Redux subscriptions across all visible rows. Changes: - FlowTable.tsx: Fetch displayColumnNames from state.options.web_columns in mapStateToProps; pass as prop to FlowRow along with flowIndex. - FlowRow.tsx: Accept displayColumnNames and flowIndex as props instead of useAppSelector. Remove unused useAppSelector import. - FlowColumns.tsx: Accept optional flowIndex prop in index column; use it instead of per-cell useAppSelector(_listIndex). - FlowTableHead.tsx: Add null guard on displayColumnNames for edge-case during initial state hydration. - FlowRowSpec.tsx: Update test to pass new required props.
ariel42
marked this pull request as ready for review
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