feat(nav): ← Back to Home link on every tool page

Multi-file workflow: a user uploads several files on Home, clicks
"Open <Tool>" on one file's findings, lands on a tool page. The
sidebar lets them get back to Home, but a top-of-page back affordance
is more discoverable and keeps the hand in the same screen region as
the upload list they're working through.

- New ``back_to_home_link()`` helper in components/_legacy.py renders
  a secondary button that calls ``st.switch_page("app.py")`` — under
  ``st.navigation`` that routes to the default (Home) page.
- Wired into every tool page (1-9) directly after
  ``hide_streamlit_chrome()`` and BEFORE the license gate so a Lite
  user who lands on a locked tool can navigate away without paying.
- New i18n key ``nav.back_to_home`` ("← Back to Home" /
  "← Volver al inicio") in en/es packs.

2008 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-16 20:38:01 +00:00
parent 604debb9a9
commit 502a72cd46
13 changed files with 42 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ from src.core.dedup import deduplicate, DeduplicationResult
from src.core.io import read_file, list_sheets, detect_encoding, detect_delimiter
from src.gui.components import (
apply_review_decisions,
back_to_home_link,
config_panel,
hide_streamlit_chrome,
match_group_card,
@@ -28,6 +29,7 @@ from src.gui.components import (
from src.license import FeatureFlag
hide_streamlit_chrome()
back_to_home_link()
require_feature_or_render_upgrade(FeatureFlag.DEDUPLICATOR)
# ---------------------------------------------------------------------------