Skip to content

feat: complete TUI and site builder to functional state #198

Closed

Description

@Sinity

Context

TUI (polylogue/ui/tui/)

The Textual-based TUI has scaffolding for three tabs:

  • Dashboard (screens/dashboard.py) — renders stats and
    provider bars. Appears functional.
  • Browser (screens/browser.py) — exists as a file but
    implementation depth is unclear.
  • Search (screens/search.py) — exists as a file but
    implementation depth is unclear.

The widget library has only StatCard. The app class
(app.py, 56 lines) declares the tab structure and dark mode
toggle.

Unknown: whether polylogue dashboard actually launches and
renders correctly. Needs manual testing.

Site builder (polylogue/site/)

The site generation system has 16 modules including:

  • builder.py — SiteBuilder with incremental: bool = True
  • Template system split across Python modules (templates_*.py)
    and Jinja2 templates (templates/)
  • publication_flow.py — publication orchestration
  • search.py — pagefind integration

Known issues:

  • Dual template storage (Python string templates + Jinja2 files)
    suggests incomplete refactor
  • No template registry or loader pattern
  • Incremental build path exists but integration is untested

Proposed work

TUI (1 PR)

  1. Manual test: polylogue dashboard — does it launch?
  2. If Browser/Search are stubs, either implement or remove them.
  3. If functional, add a smoke test that launches the app headless.

Site (1-2 PRs)

  1. Consolidate template system (pick one: Python or Jinja2).
  2. Add smoke test for polylogue site generate.
  3. Verify incremental builds work (generate, modify one conv,
    regenerate, check only that conv's page changed).

Acceptance criteria

  • polylogue dashboard launches and renders without error.
  • polylogue site generate produces a browsable static site.
  • Both have at least one integration-level smoke test.

Activity

  1. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Starting implementation on feature/feat/tui-site-functional-state from origin/master at a1470092.

    Boundary for this slice:

    • Verify and make polylogue dashboard launch in headless/manual-friendly mode.
    • Decide Browser/Search TUI tabs by evidence: implement enough to be functional or remove dead tab promises.
    • Verify and harden polylogue site generate enough to produce a browsable static site from a seeded archive.
    • Add smoke coverage for the dashboard and site generation paths.
    • Keep this issue focused on functional state; template-system consolidation beyond what is necessary for smokeable generation should become a follow-up only if it is too large for one coherent PR.
  2. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Implementation checkpoint on feature/feat/tui-site-functional-state:

    Findings:

    • Browser and Search tabs are no longer empty stubs; current Textual tests exercise dashboard, browser, search, keyboard, and error paths.
    • Browser had one functional defect: an empty archive displayed fake fallback provider nodes (chatgpt, claude-ai) instead of an empty state.
    • polylogue dashboard renders under a bounded manual timeout; the timeout is expected because the app keeps running.
    • The site builder already has manifest and incremental tests, but the CLI site smoke only checked site-manifest.json, not whether generated HTML/search artifacts are actually browsable.

    Changes in progress:

    • Replaced Browser's fake-provider fallback with a No conversations in archive tree leaf.
    • Added a headless TUI integration smoke that runs PolylogueApp.run() against a real repository and exits through Textual autopilot after dashboard stats render.
    • Added a seeded polylogue run site smoke that verifies index.html, dashboard.html, a conversation page, and search-index.json links/content.

    Focused verification so far:

    • pytest -q tests/unit/ui/test_tui.py tests/integration/test_tui_dashboard.py (17 passed)
    • pytest -q tests/unit/site/test_builder.py tests/unit/cli/test_site.py tests/integration/test_site.py (13 passed)
    • ruff check polylogue/ui/tui/screens/browser.py tests/unit/ui/test_tui.py tests/integration/test_tui_dashboard.py tests/integration/test_site.py tests/unit/cli/test_site.py tests/unit/site/test_builder.py
    • mypy polylogue/ui/tui/screens/browser.py tests/unit/ui/test_tui.py tests/integration/test_tui_dashboard.py tests/integration/test_site.py tests/unit/cli/test_site.py tests/unit/site/test_builder.py
  3. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Verification update on feature/feat/tui-site-functional-state:

    • devtools verify completed successfully (all checks passed).
    • Explicit integration smoke run completed successfully: pytest -q tests/integration/test_tui_dashboard.py tests/integration/test_site.py (9 passed).

    This records both the default pre-PR baseline and the integration files that are intentionally outside the default devtools verify pytest scope.

  4. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Closeout for #198:

    • PR: feat: complete TUI and site functional smokes (#368) #368
    • Merge commit: 73fd9e886f8b8e23fed0b1b949183bec0ee5ec19
    • Scope landed:
      • polylogue dashboard now has a headless functional integration smoke over a real seeded repository.
      • The Browser tab no longer shows fake provider leaves for an empty archive; it renders an explicit empty state.
      • polylogue run site now has an integration smoke that verifies browsable index, dashboard, conversation HTML, and Lunr search index artifacts.

    Verification recorded on the PR:

    • pytest -q tests/unit/ui/test_tui.py tests/integration/test_tui_dashboard.py -> 17 passed
    • pytest -q tests/unit/site/test_builder.py tests/unit/cli/test_site.py tests/integration/test_site.py -> 13 passed
    • targeted ruff check and mypy over touched files -> passed
    • devtools verify -> all checks passed
    • pytest -q tests/integration/test_tui_dashboard.py tests/integration/test_site.py -> 9 passed
    • timeout 5s polylogue --plain dashboard rendered the dashboard TUI and timed out as expected because the app is interactive

    Remote checks that completed before merge were green for policy/lint/typecheck/Nix/showcase/security. The long Python matrix/CodeQL jobs were still in progress; this was accepted under the current CI-quota constraint after full local verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:sitetype:feat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions