From 21a7e8356352a48186993b6c931fbb2cf3ba7c99 Mon Sep 17 00:00:00 2001 From: Jim Lancaster <40281233+zoltan57@users.noreply.github.com> Date: Fri, 7 Aug 2026 09:10:03 -0500 Subject: [PATCH] Tweak empty page settings to make them more uniform. --- src/transcription/ui/components/table/documents.py | 2 +- src/transcription/ui/components/table/jobs.py | 2 +- src/transcription/ui/components/table/sources.py | 2 +- src/transcription/ui/pages/sources_page.py | 8 ++++---- tests/ui/test_sources_page.py | 2 ++ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/transcription/ui/components/table/documents.py b/src/transcription/ui/components/table/documents.py index 437271b..84d3587 100644 --- a/src/transcription/ui/components/table/documents.py +++ b/src/transcription/ui/components/table/documents.py @@ -42,7 +42,7 @@ def render_documents_table(rows: Sequence[DocumentTableRow]) -> None: """Render documents table with search filtering and custom type chips.""" if not rows: with archival_card(extra_classes="p-8 text-center"): - render_empty_state("No documents in repository yet.") + render_empty_state("No documents found in repository.") return table = build_table( diff --git a/src/transcription/ui/components/table/jobs.py b/src/transcription/ui/components/table/jobs.py index aed7c4a..65becf2 100644 --- a/src/transcription/ui/components/table/jobs.py +++ b/src/transcription/ui/components/table/jobs.py @@ -57,7 +57,7 @@ def render_jobs_table(rows: Sequence[JobTableRow]) -> None: """Render jobs table with search filtering and custom status chips.""" if not rows: with archival_card(extra_classes="p-8 text-center"): - render_empty_state("No active or historical processing jobs found.") + render_empty_state("No job records found in repository.") return table = build_table( diff --git a/src/transcription/ui/components/table/sources.py b/src/transcription/ui/components/table/sources.py index 68e6b30..3a97774 100644 --- a/src/transcription/ui/components/table/sources.py +++ b/src/transcription/ui/components/table/sources.py @@ -48,7 +48,7 @@ def render_sources_table(rows: Sequence[SourceTableRow]) -> None: """Render sources table and open detail page when clicking a row.""" if not rows: with archival_card(extra_classes="p-8 text-center"): - render_empty_state("No source file records found.") + render_empty_state("No source file records found in repository.") return table = build_table( diff --git a/src/transcription/ui/pages/sources_page.py b/src/transcription/ui/pages/sources_page.py index 8600f51..62c19ea 100644 --- a/src/transcription/ui/pages/sources_page.py +++ b/src/transcription/ui/pages/sources_page.py @@ -13,6 +13,7 @@ from transcription.ui.components.app_shell import render_navigation_header from transcription.ui.components.cards import archival_card from transcription.ui.components.error_presenter import show_error from transcription.ui.components.primitives import section_header_row +from transcription.ui.components.primitives import render_empty_state from transcription.ui.theme import page_header from ...db.session import SessionFactoryDep @@ -56,12 +57,11 @@ async def sources_page( with ui.column().classes("w-full max-w-7xl mx-auto p-6 gap-6"): with section_header_row(): - page_header(header_title, subtitle="Manage digitized source pages, raw OCR transcripts, and human revisions.") + page_header(header_title) if not sources: - with archival_card(title="No Source Assets Found"): - ui.label("No source images or pages match the current filter criteria.").classes("text-sm ui-text-muted mb-4") - ui.button("Upload New Documents", on_click=lambda: ui.navigate.to("/jobs/new")).classes("ui-btn-primary") + with archival_card(extra_classes="p-8 text-center"): + render_empty_state("No source file records found in repository.") return columns = [ diff --git a/tests/ui/test_sources_page.py b/tests/ui/test_sources_page.py index 8e06d5b..08e4d13 100644 --- a/tests/ui/test_sources_page.py +++ b/tests/ui/test_sources_page.py @@ -69,6 +69,8 @@ class TestSourcesPageRendering: assert response.status_code == 200 assert "Source Asset Records" in response.text assert "No Source Assets Found".upper() in response.text.upper() + assert "No source asset records found in repository." in response.text + assert "Upload New Documents" not in response.text @pytest.mark.asyncio async def test_sources_page_lists_seeded_sources(self, app_client):