feat(ui): add TUI/Web interface #667

Closed
freemo wants to merge 1 commits from feature/m7-post-tui into master
Owner

Summary

  • Add UIDataProvider protocol and LocalUIDataProvider backed by DI container services
  • Add minimal Textual TUI with plan list, plan detail, diff viewer, and validation summary panes
  • Add FastAPI read-only web UI stub with /ui/plans, /ui/plans/<id>, /ui/sessions, /ui/diffs/<plan_id>, /ui/validations/<plan_id> endpoints
  • Add tui_refresh_interval, web_ui_enabled, web_ui_port settings
  • Add agents ui tui and agents ui web CLI commands
  • Add Behave BDD tests (21 scenarios), Robot integration tests (10 cases), ASV benchmarks

Test Results

  • Lint: All checks passed
  • Typecheck: 0 errors, 0 warnings
  • Unit tests: 9749 scenarios passed, 0 failed
  • Integration tests: TUI interface robot suite passed

ISSUES CLOSED: #341

Closes #341

## Summary - Add `UIDataProvider` protocol and `LocalUIDataProvider` backed by DI container services - Add minimal Textual TUI with plan list, plan detail, diff viewer, and validation summary panes - Add FastAPI read-only web UI stub with `/ui/plans`, `/ui/plans/<id>`, `/ui/sessions`, `/ui/diffs/<plan_id>`, `/ui/validations/<plan_id>` endpoints - Add `tui_refresh_interval`, `web_ui_enabled`, `web_ui_port` settings - Add `agents ui tui` and `agents ui web` CLI commands - Add Behave BDD tests (21 scenarios), Robot integration tests (10 cases), ASV benchmarks ## Test Results - **Lint**: All checks passed - **Typecheck**: 0 errors, 0 warnings - **Unit tests**: 9749 scenarios passed, 0 failed - **Integration tests**: TUI interface robot suite passed ISSUES CLOSED: #341 Closes #341
freemo added this to the v3.6.0 milestone 2026-03-10 06:39:16 +00:00
freemo force-pushed feature/m7-post-tui from e5808105a1 to 2e7173e03c 2026-03-10 17:58:06 +00:00 Compare
freemo self-assigned this 2026-03-11 05:46:43 +00:00
freemo added the
Type
Feature
label 2026-03-11 05:47:13 +00:00
Author
Owner

PM Compliance Update (Day 31):

Fixed by PM:

  • Added Type/Feature label
  • Added assignee (@freemo)
  • Added closing keyword to PR body

Remaining issue: Merge conflict. Please rebase against current develop branch (17 PRs merged Days 30-31).

Priority: M6 work — continue at current pace.

**PM Compliance Update (Day 31)**: Fixed by PM: - Added `Type/Feature` label - Added assignee (@freemo) - Added closing keyword to PR body **Remaining issue**: Merge conflict. Please rebase against current `develop` branch (17 PRs merged Days 30-31). **Priority**: M6 work — continue at current pace.
freemo added a new dependency 2026-03-11 06:00:10 +00:00
Author
Owner

PM Decision — Closing PR (Day 31)

This PR is being closed due to a comprehensive TUI specification that was added today (2026-03-11), rendering this implementation incomplete and misaligned.

What Changed

The specification now includes a top-level TUI section (~1,500 lines) with:

  • Textual >= 1.0 as the framework (ADR-044)
  • 18 ASCII mockup diagrams with exact Dracula-theme layouts
  • Persona system — YAML-based abstraction bundling actor + args + scope + presets (ADR-045)
  • 3 input modes: Normal (@ references), Command (/ slash), Shell (!) (ADR-046)
  • TuiMaterializer — maps ElementHandle events to Textual widgets, enabling CLI producers to render in TUI without modification
  • Multi-session tabs with independent personas, conversations, and A2A bindings
  • Session persistence in SQLite at ~/.local/state/cleveragents/tui.db
  • 16 hotkey tables, block cursor navigation, notification system (flash, desktop, title, sound)
  • Settings screen, sessions screen, content pruning, safety behaviors

Impact

This PR creates a basic ui/tui_app.py and ui/web_app.py, but:

  • Does not implement the persona system
  • Does not implement the reference/command input modes
  • Does not use TuiMaterializer
  • Does not implement the comprehensive screen layouts specified
  • Does not integrate via A2A protocol (which is now the sole communication layer)

Replacement

New issues will be created in v3.7.0 (M8 — TUI) for:

  1. Textual MainScreen with sidebar states and Dracula theme
  2. Persona system and reference/command input modes
  3. TuiMaterializer A2A integration layer

The feature/m7-post-tui branch can be archived. @freemo — the Textual scaffolding here may be useful as a starting point for the new implementation.

This closure is due to a change in specification, not a quality issue with the code.

## PM Decision — Closing PR (Day 31) This PR is being **closed** due to a comprehensive TUI specification that was added today (2026-03-11), rendering this implementation incomplete and misaligned. ### What Changed The specification now includes a **top-level TUI section** (~1,500 lines) with: - **Textual >= 1.0** as the framework (ADR-044) - **18 ASCII mockup diagrams** with exact Dracula-theme layouts - **Persona system** — YAML-based abstraction bundling actor + args + scope + presets (ADR-045) - **3 input modes**: Normal (`@` references), Command (`/` slash), Shell (`!`) (ADR-046) - **TuiMaterializer** — maps `ElementHandle` events to Textual widgets, enabling CLI producers to render in TUI without modification - **Multi-session tabs** with independent personas, conversations, and A2A bindings - **Session persistence** in SQLite at `~/.local/state/cleveragents/tui.db` - **16 hotkey tables**, block cursor navigation, notification system (flash, desktop, title, sound) - **Settings screen**, **sessions screen**, content pruning, safety behaviors ### Impact This PR creates a basic `ui/tui_app.py` and `ui/web_app.py`, but: - Does not implement the persona system - Does not implement the reference/command input modes - Does not use TuiMaterializer - Does not implement the comprehensive screen layouts specified - Does not integrate via A2A protocol (which is now the sole communication layer) ### Replacement New issues will be created in **v3.7.0 (M8 — TUI)** for: 1. Textual MainScreen with sidebar states and Dracula theme 2. Persona system and reference/command input modes 3. TuiMaterializer A2A integration layer The `feature/m7-post-tui` branch can be archived. @freemo — the Textual scaffolding here may be useful as a starting point for the new implementation. **This closure is due to a change in specification, not a quality issue with the code.**
freemo closed this pull request 2026-03-11 18:09:41 +00:00
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
Required
Details
CI / quality (pull_request) Successful in 17s
Required
Details
CI / build (pull_request) Successful in 25s
Required
Details
CI / typecheck (pull_request) Successful in 39s
Required
Details
CI / security (pull_request) Successful in 41s
Required
Details
CI / unit_tests (pull_request) Successful in 2m59s
Required
Details
CI / integration_tests (pull_request) Successful in 3m24s
Required
Details
CI / docker (pull_request) Successful in 46s
Required
Details
CI / coverage (pull_request) Successful in 5m13s
Required
Details
CI / benchmark-regression (pull_request) Successful in 33m11s

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
Type
Feature
1 Participants
Notifications
Due Date
No due date set.
Blocks
#341 feat(ui): add TUI/Web interface
cleveragents/cleveragents-core
Reference: cleveragents/cleveragents-core#667