From 30e257cc44ee34d8df7b9c62e48f3ff3ae0d0bc2 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 5 May 2026 13:33:32 +0000 Subject: [PATCH] fix(gui): move Quit button to sidebar so it shows on every page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The footer placement was easy to miss (below all tool cards) and only rendered on the home page. Hook the button into hide_streamlit_chrome() so every page that hides default chrome — home + all 9 tool pages — gets the Quit button at the bottom of the sidebar without per-page edits. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/gui/app.py | 13 ++++--------- src/gui/components/_legacy.py | 10 +++++++++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/gui/app.py b/src/gui/app.py index 53693be..2ace7bf 100644 --- a/src/gui/app.py +++ b/src/gui/app.py @@ -24,7 +24,6 @@ if str(_project_root) not in sys.path: from src.gui.components import ( findings_count_for_tool, hide_streamlit_chrome, - quit_button, upload_and_analyze_section, ) @@ -88,11 +87,7 @@ for row_start in range(0, len(TOOLS), 3): # --------------------------------------------------------------------------- st.divider() -footer_left, footer_right = st.columns([4, 1]) -with footer_left: - st.caption( - "Runs locally. Your data never leaves this computer. " - "| DataTools v3.0" - ) -with footer_right: - quit_button() +st.caption( + "Runs locally. Your data never leaves this computer. " + "| DataTools v3.0" +) diff --git a/src/gui/components/_legacy.py b/src/gui/components/_legacy.py index b38de87..fc8ecf9 100644 --- a/src/gui/components/_legacy.py +++ b/src/gui/components/_legacy.py @@ -71,8 +71,16 @@ footer { def hide_streamlit_chrome() -> None: - """Inject CSS to hide Streamlit's default header, menu, and footer.""" + """Inject CSS to hide Streamlit's default header, menu, and footer. + + Also renders a Quit button at the bottom of the sidebar so every page + that hides the default chrome still has a clean way to shut the + server down. + """ st.markdown(_HIDE_CHROME_CSS, unsafe_allow_html=True) + with st.sidebar: + st.markdown("---") + quit_button(key="quit_app_button_sidebar") # ---------------------------------------------------------------------------