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

Closed
freemo wants to merge 1 commit 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
feat(ui): add TUI/Web interface
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 18s
CI / build (pull_request) Successful in 18s
CI / security (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 42s
CI / unit_tests (pull_request) Successful in 2m47s
CI / integration_tests (pull_request) Successful in 3m20s
CI / docker (pull_request) Successful in 57s
CI / coverage (pull_request) Successful in 6m5s
CI / benchmark-regression (pull_request) Successful in 31m6s
e5808105a1
Implement UI data-provider interface backed by local services,
minimal Textual TUI with plan list/detail/diff/validation panes,
and read-only web UI stub serving the same data via local routes.

Key changes:
- Add ui/ package with UIDataProvider protocol and LocalUIDataProvider
- Add Textual-based TUI with plan list, detail, diff viewer, validation summary
- Add FastAPI web UI stub with read-only JSON endpoints
- Add tui_refresh_interval, web_ui_enabled, web_ui_port settings
- Add agents ui tui/web CLI commands
- Add Behave BDD tests, Robot integration tests, ASV benchmarks

ISSUES CLOSED: #341
freemo force-pushed feature/m7-post-tui from e5808105a1
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 18s
CI / build (pull_request) Successful in 18s
CI / security (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 42s
CI / unit_tests (pull_request) Successful in 2m47s
CI / integration_tests (pull_request) Successful in 3m20s
CI / docker (pull_request) Successful in 57s
CI / coverage (pull_request) Successful in 6m5s
CI / benchmark-regression (pull_request) Successful in 31m6s
to 2e7173e03c
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / build (pull_request) Successful in 25s
CI / typecheck (pull_request) Successful in 39s
CI / security (pull_request) Successful in 41s
CI / unit_tests (pull_request) Successful in 2m59s
CI / integration_tests (pull_request) Successful in 3m24s
CI / docker (pull_request) Successful in 46s
CI / coverage (pull_request) Successful in 5m13s
CI / benchmark-regression (pull_request) Successful in 33m11s
2026-03-10 17:58:06 +00:00
Compare
freemo self-assigned this 2026-03-11 05:46:43 +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.
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 milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#341 feat(ui): add TUI/Web interface
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!667
No description provided.