fix(gui): move Quit button to sidebar so it shows on every page

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) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 13:33:32 +00:00
parent 0c25d80146
commit 30e257cc44
2 changed files with 13 additions and 10 deletions

View File

@@ -24,7 +24,6 @@ if str(_project_root) not in sys.path:
from src.gui.components import ( from src.gui.components import (
findings_count_for_tool, findings_count_for_tool,
hide_streamlit_chrome, hide_streamlit_chrome,
quit_button,
upload_and_analyze_section, upload_and_analyze_section,
) )
@@ -88,11 +87,7 @@ for row_start in range(0, len(TOOLS), 3):
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
st.divider() st.divider()
footer_left, footer_right = st.columns([4, 1])
with footer_left:
st.caption( st.caption(
"Runs locally. Your data never leaves this computer. " "Runs locally. Your data never leaves this computer. "
"| DataTools v3.0" "| DataTools v3.0"
) )
with footer_right:
quit_button()

View File

@@ -71,8 +71,16 @@ footer {
def hide_streamlit_chrome() -> None: 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) st.markdown(_HIDE_CHROME_CSS, unsafe_allow_html=True)
with st.sidebar:
st.markdown("---")
quit_button(key="quit_app_button_sidebar")
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------