feat(ui): shared header — Sign in/Sign out and New Chat on every page; hide the Sources nav link from anonymous users

This commit is contained in:
2026-08-24 12:32:45 -04:00
parent fd7f02ce68
commit 2afc77ee56
14 changed files with 904 additions and 59 deletions
+6 -4
View File
@@ -271,12 +271,14 @@ def test_persists_across_page_navigation(
_ask(page, QUESTION)
_ask_deflected(page, OFF_TOPIC) # mixed conversation: grounded + deflected
# A trip to Sources — the New chat control is chat-page-only.
# (Phase 16: the catalog is admin-only — the trip starts with a
# real form login.)
# A trip to Sources (phase 16: the catalog is admin-only — the trip
# starts with a real form login). Phase 19 (owner permission
# 2026-08-23): the New chat control is part of the SHARED bar, so it
# is present on the sources page too — only clicking it would clear
# the conversation (pinned in tests/e2e/test_shared_header.py).
login(page, app_url, next="/sources.html")
expect(page.locator("#docs-tbody tr").first).to_be_visible(timeout=15_000)
expect(page.locator("#new-chat-btn")).to_have_count(0)
expect(page.locator("#new-chat-btn")).to_be_visible()
# Back to the chat: the conversation is exactly as left — both turns,
# the source chip, and the amber deflected bubble with its chips.