feat(gui): inline Help popover next to every tool's title

Adds a contextual Help button on each detail page, right of the title.
Clicking it opens a Streamlit popover with a one-shot how-to: when to
use, numbered steps, before→after examples, and an optional one-line
tip. Designed to be scannable — no paragraph prose.

Implementation:
- New ``render_tool_header(tool_id)`` helper in components replaces the
  bare ``st.title(...) + st.caption(...)`` block on each of the 11 tool
  pages. Title in the wide column, popover in a narrow right column;
  caption sits on its own line beneath.
- Help content is one markdown blob per tool stored in i18n under
  ``tools.<id>.help_md`` (en + es). Editors can tweak copy without
  touching Python.
- ``help.button_label`` and ``help.missing_body`` keys added to both
  packs for the popover trigger and the empty-tool fallback.

All 11 tool pages now use the same header pattern — including the
PDF Extractor and Reconciler which previously had hardcoded title/
caption pairs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-02 17:21:47 +00:00
parent 7203a81af7
commit 904356f4e8
15 changed files with 119 additions and 49 deletions

View File

@@ -25,6 +25,7 @@ from src.gui.components import (
hide_streamlit_chrome,
html_download_button,
render_sticky_footer,
render_tool_header,
)
from src.pdf_extract import (
PdfDependencyMissing,
@@ -103,13 +104,7 @@ def _format_size(n_bytes: int) -> str:
# Header + dep guard
# ---------------------------------------------------------------------------
st.markdown("# PDF to CSV")
st.caption(
"Scan bank-statement PDFs for transaction rows "
"(``[date] [description] [amount]``). Review the table, uncheck "
"rows you don't want, edit any cell that needs fixing, then "
"download as CSV. No per-bank setup."
)
render_tool_header("10_pdf_extractor")
_pdf_ok, _pdf_missing = _pdf_deps_status()
if not _pdf_ok: