Owner request (2026-08-28): the two admin-only nav items read like the same thing, so they are relabeled — the document-catalog link (#nav-sources, /sources.html) becomes "RAG" and the source-manager link (#nav-git-sources, /git-sources.html) becomes "Sources". Phase 48 (48_nav_rename_sources), label-only per the locked decision: - all six pages (index, sources, git-sources, tuning, document, login): the two <a> texts swap; ids, hrefs, hidden defaults, is-active / aria-current placement, and nav order (Chat, RAG, Sources, Tuning) are byte-unchanged otherwise. - header.js: comment/docstring label mentions only — the reveal-by-id logic is untouched (ship-hidden/reveal contract intact). - test_git_sources_admin.py / test_mobile_hamburger_nav.py: the two suites that asserted the old label text are updated; comment-only label fixes in test_shared_header.py / test_nav_consistency.py. - tests/e2e/test_nav_rename_sources.py: the story E2E (green in isolation) — renamed labels + unchanged hrefs/order/markers on all six pages, click navigation with the active marker, the anonymous ship-hidden contract, and regression guards for the untouched controls (#sync-label "Sync sources", viewer #doc-back "Sources"). - All eight surrounding header/nav suites stay green in isolation; unit+integration green, app/ coverage 99% (frontend-only change), ruff + pyright clean. Note: per this phase file-level staging, the six page files and header.js also carry the same-day in-flight owner rework that was already in the working tree when phase 48 ran (mobile sign-in dropdown copy, sync button ship-hidden on the Sources page); the label rename itself is the two-text swap on each page.
2.6 KiB
2.6 KiB
Story: Nav rename — "Sources" becomes "RAG", "Git sources" becomes "Sources"
Phase: 48_nav_rename_sources · E2E: tests/e2e/test_nav_rename_sources.py
Narrative
As the admin (owner), the two admin-only nav items are confusing: "Sources" (the document catalog) and "Git sources" (the source manager) read like the same thing. I want the navbar to say "RAG" for the document catalog page and "Sources" for the source manager page, so the labels say what each page is: RAG = the indexed knowledge base you chat against; Sources = where that knowledge comes from.
- Given I am signed in as admin, on any of the six pages (chat, sources, git-sources, tuning, document viewer, login)
- When I look at the primary nav
- Then the catalog link (
#nav-sources, →/sources.html) is labeled "RAG" and the manager link (#nav-git-sources, →/git-sources.html) is labeled "Sources" — same ids, same hrefs, same order, same admin-only ship-hidden/reveal contract as before.
Acceptance criteria
- All six pages (
frontend/index.html,sources.html,git-sources.html,tuning.html,document.html,login.html) carry the swapped label text on#nav-sources("RAG") and#nav-git-sources("Sources"). Element ids,hrefs,hiddendefaults,is-active/aria-currentmarkers, and the nav order (Chat, RAG, Sources, Tuning) are unchanged — this is a label-only rename, andheader.jslogic (reveal by id) is untouched. - Anonymous visitors still see neither link (ship-hidden contract unchanged); the admin sees both, as before.
- Existing test assertions on the old label text are updated
(
test_git_sources_admin.pynav-link text,test_mobile_hamburger_nav.pyLINK_TEXTS); assertions that are NOT about these two nav items stay untouched (the document viewer's "Sources" back button, the "Sync sources" button label, the/git-sources.htmlpage-<h1>/<title>marker). - Story E2E
tests/e2e/test_nav_rename_sources.pyproves: admin sees "RAG" (→/sources.html) and "Sources" (→/git-sources.html) on all six pages; clicking each lands on the right page withis-active; anonymous sees both hidden. - Frontend-only: unit + integration green,
app/coverage unaffected, ruff + pyright clean, no CDN, one--no-gpg-signcommit.
Playwright Mapping Rule
tests/e2e/test_nav_rename_sources.py — one story, one file, run in
isolation: the two relabeled nav items' full lifecycle (labels, hrefs,
admin reveal, anonymous hide, click-navigation with the current-page
marker) on the shared header, desktop viewport.