Console: Prevent showing the quit message when no flows are available in specific configurations (#7833)

* prevent showing the quit message when no filtered flows are available

* update changelog
This commit is contained in:
Matteo Luppi 2025-08-19 20:22:53 +02:00 committed by GitHub
parent 5c0aa2f4bc
commit c635d4396c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -21,6 +21,8 @@
([#7749](https://github.com/mitmproxy/mitmproxy/pull/7749), @mhils)
- Display local timezone in the Timing tab of mitmweb.
([#7804](https://github.com/mitmproxy/mitmproxy/pull/7804), @lups2000)
- Prevent showing the quit message in the console when no flows are available under specific configurations.
([#7833](https://github.com/mitmproxy/mitmproxy/pull/7833), @lups2000)
## 25 May 2025: mitmproxy 12.1.1

View file

@ -104,7 +104,12 @@ class FlowDetails(tabs.Tabs):
]
self.show()
else:
self.master.window.pop()
# Get the top window from the focus stack (the currently active view).
# If it's NOT the "flowlist", it's safe to pop back to the previous view.
if self.master.window.focus_stack().stack[-1] != "flowlist":
self.master.window.pop()
# If it is the "flowlist", were already at the main view with no flows to show.
# Popping now would close the last window and prompt app exit, so we remain on the empty flow list screen instead.
def tab_http_request(self):
flow = self.flow