Skip to content

Commit a8ca352

Browse files
author
Yuma Ichikawa
committed
fix(app): restore Home navigation as labelled "Problem" page link
Hiding the auto-generated "streamlit app" entry-page link in the sidebar nav (commit b519ba2) removed the only way back to the problem-selection page from sub-pages: users could no longer pick a problem after navigating to Solve / Visualize / Compare. Add an explicitly labelled `st.page_link("streamlit_app.py", label="Problem", icon="🧩")` inside `sidebar_brand()` so every page gets a discoverable, clickable link back to Home with a clear name. The CSS that hides the auto-generated link stays in place so the navigator now shows "🧩 Problem · Solve · Visualize · Compare" instead of the jargon "streamlit app".
1 parent b519ba2 commit a8ca352

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

app/_common.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,16 @@ def sidebar_brand() -> None:
759759
""",
760760
unsafe_allow_html=True,
761761
)
762+
# The auto-generated entry-page link in Streamlit's multipage
763+
# navigator gets its label from the file basename ("streamlit
764+
# app"), which is jargony and confused users into thinking the
765+
# page wasn't clickable. We hide that auto link in CSS and
766+
# instead emit our own properly labelled link here so the user
767+
# always has a discoverable way back to the problem-selection
768+
# page.
769+
if hasattr(st, "page_link"):
770+
with contextlib.suppress(Exception):
771+
st.page_link("streamlit_app.py", label="Problem", icon="🧩")
762772

763773

764774
def empty_state_card(

0 commit comments

Comments
 (0)