mirror of https://github.com/vee1e/mitmproxy - An interactive TLS-capable intercepting HTTP proxy for penet
Find a file
Ariel a4518ab9eb
fix(web): avoid infinite componentDidUpdate loop in FlowTable (#8233)
* fix(web): avoid infinite componentDidUpdate loop in FlowTable

`FlowTable.componentDidUpdate` calls `this.onViewportUpdate()` on every
update, even when the inputs to `calcVScroll` (the flow list and the row
height) did not change. `onViewportUpdate` reads the current
`viewport.scrollTop`, recomputes `vScroll`, and `setState`s when
`state.viewportTop !== scrollTop` or `vScroll` shape changed. The new
`state.viewportTop` is `Math.min(scrollTop, vScroll.end * rowHeight)`,
so when `vScroll.end * rowHeight < scrollTop` the new state stays
strictly below `scrollTop`, the inequality holds on the next iteration,
and the cycle spins until the browser kills the JS thread.

Gated the call on `prevProps.flowView !== this.props.flowView ||
prevProps.rowHeight !== this.props.rowHeight`. The other
`onViewportUpdate` call sites — `componentDidMount`, the window resize
listener, the viewport `onScroll` handler, and the post-scroll-into-view
call — are unchanged, so user scrolling and resizing still drive the
virtual-scroll window normally.

Added a `FlowTableSpec.tsx` regression test that spies on
`PureFlowTable.prototype.onViewportUpdate` and asserts it is NOT called
after a `select` dispatch (which changes connect-mapped props but leaves
`flowView` and `rowHeight` alone). The test fails without the fix.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2026-05-15 10:13:38 +02:00
.github Bump the github-actions group with 8 updates (#8209) 2026-05-11 15:43:00 +02:00
docs docs: document addon live-reload + testing pattern (#8210) 2026-05-11 14:18:51 +00:00
examples Fix IP blocking and merge additional DoH blocklists (#8197) 2026-04-28 20:25:50 +02:00
mitmproxy reopen main for development 2026-05-12 13:02:14 +00:00
release
test Reduce generated certificate validity (#8203) 2026-05-11 14:08:05 +00:00
web fix(web): avoid infinite componentDidUpdate loop in FlowTable (#8233) 2026-05-15 10:13:38 +02:00
.gitattributes
.gitignore
.python-version
AGENTS.md
CHANGELOG.md fix(web): avoid infinite componentDidUpdate loop in FlowTable (#8233) 2026-05-15 10:13:38 +02:00
codecov.yml
CONTRIBUTING.md
LICENSE
MANIFEST.in
pyproject.toml Bump the tox group across 1 directory with 2 updates (#8226) 2026-05-12 17:43:58 +02:00
README.md remove codacy badge 2026-04-12 23:27:13 +02:00
SECURITY.md
uv.lock Bump the tox group across 1 directory with 2 updates (#8226) 2026-05-12 17:43:58 +02:00

mitmproxy

Continuous Integration Status autofix.ci: enabled Coverage Status Latest Version Supported Python versions

mitmproxy is an interactive, SSL/TLS-capable intercepting proxy with a console interface for HTTP/1, HTTP/2, and WebSockets.

mitmdump is the command-line version of mitmproxy. Think tcpdump for HTTP.

mitmweb is a web-based interface for mitmproxy.

Installation

The installation instructions are here. If you want to install from source, see CONTRIBUTING.md.

Documentation & Help

General information, tutorials, and precompiled binaries can be found on the mitmproxy website.

mitmproxy.org

The documentation for mitmproxy is available on our website:

mitmproxy documentation stable mitmproxy documentation dev

If you have questions on how to use mitmproxy, please use GitHub Discussions!

mitmproxy discussions

Contributing

As an open source project, mitmproxy welcomes contributions of all forms.

Dev Guide