UAT: TuiMaterializer class not implemented — TUI does not use Output Rendering Framework #1382

Open
opened 2026-04-02 17:01:51 +00:00 by freemo · 0 comments
Owner

Bug Report

Feature Area: TuiMaterializer A2A Integration
Severity: High
Found by: UAT tester uat-worker-a2a

What Was Tested

Verified whether a TuiMaterializer class exists that bridges the Output Rendering Framework (OutputSession/MaterializationStrategy) with the TUI (Textual widgets).

Expected Behavior (from spec)

Per docs/specification.md lines 28847 and 27567:

"The TUI communicates with the Application layer exclusively through A2A (ADR-026). It subscribes to A2A events for real-time updates and uses the existing Output Rendering Framework (ADR-021) via a TuiMaterializer that maps ElementHandle events to Textual widget operations — enabling all CLI command producers to render in the TUI without modification."

"A TUI MaterializationStrategy (e.g., TuiMaterializer) would subscribe to element events and route them to TUI widgets."

The spec also defines the element-to-widget mapping:

  • PanelHandle → info pane or detail card widget
  • TableHandle → sortable, filterable data grid widget
  • TreeHandle → collapsible tree view widget
  • ProgressHandle → animated progress bar or step-list widget
  • StatusHandle → toast notification or status bar message
  • CodeHandle → syntax-highlighted code viewer widget
  • DiffHandle → side-by-side diff viewer widget

Actual Behavior

No TuiMaterializer class exists anywhere in the codebase:

$ grep -rn "TuiMaterializer" src/
(no results)

The src/cleveragents/cli/output/materializers.py defines 6 materializers (RichMaterializer, ColorMaterializer, TableMaterializer, PlainMaterializer, JsonMaterializer, YamlMaterializer) but no TuiMaterializer.

The TUI (src/cleveragents/tui/app.py) does not import or use OutputSession, MaterializationStrategy, or any ElementHandle types. The TUI renders output by directly calling _Static.update() with plain strings.

Code Location

  • Missing: src/cleveragents/tui/materializer.py (or similar)
  • Missing: TuiMaterializer class implementing MaterializationStrategy protocol from src/cleveragents/cli/output/materializers.py
  • Affected: src/cleveragents/tui/app.py — does not use OutputSession

Steps to Reproduce

import cleveragents.tui as tui_pkg
import cleveragents.cli.output as output_pkg
print(hasattr(tui_pkg, 'TuiMaterializer'))   # False
print(hasattr(output_pkg, 'TuiMaterializer'))  # False

from cleveragents.cli.output.materializers import __all__ as mat_all
print('TuiMaterializer' in mat_all)  # False

Impact

Without TuiMaterializer, CLI command producers cannot render in the TUI without modification. The spec's promise that "the same command logic supports CLI, TUI, and web frontends without modification" is not fulfilled. The TUI is architecturally disconnected from the Output Rendering Framework.

Note: Issue #1315 covers the broader TUI refactoring. This issue specifically tracks the TuiMaterializer class implementation as a distinct deliverable.

## Bug Report **Feature Area:** TuiMaterializer A2A Integration **Severity:** High **Found by:** UAT tester uat-worker-a2a ### What Was Tested Verified whether a `TuiMaterializer` class exists that bridges the Output Rendering Framework (`OutputSession`/`MaterializationStrategy`) with the TUI (Textual widgets). ### Expected Behavior (from spec) Per `docs/specification.md` lines 28847 and 27567: > "The TUI communicates with the Application layer exclusively through A2A (ADR-026). It subscribes to A2A events for real-time updates and uses the existing Output Rendering Framework (ADR-021) via a **`TuiMaterializer`** that maps `ElementHandle` events to Textual widget operations — enabling all CLI command producers to render in the TUI without modification." > "A TUI `MaterializationStrategy` (e.g., `TuiMaterializer`) would subscribe to element events and route them to TUI widgets." The spec also defines the element-to-widget mapping: - `PanelHandle` → info pane or detail card widget - `TableHandle` → sortable, filterable data grid widget - `TreeHandle` → collapsible tree view widget - `ProgressHandle` → animated progress bar or step-list widget - `StatusHandle` → toast notification or status bar message - `CodeHandle` → syntax-highlighted code viewer widget - `DiffHandle` → side-by-side diff viewer widget ### Actual Behavior No `TuiMaterializer` class exists anywhere in the codebase: ``` $ grep -rn "TuiMaterializer" src/ (no results) ``` The `src/cleveragents/cli/output/materializers.py` defines 6 materializers (`RichMaterializer`, `ColorMaterializer`, `TableMaterializer`, `PlainMaterializer`, `JsonMaterializer`, `YamlMaterializer`) but no `TuiMaterializer`. The TUI (`src/cleveragents/tui/app.py`) does not import or use `OutputSession`, `MaterializationStrategy`, or any `ElementHandle` types. The TUI renders output by directly calling `_Static.update()` with plain strings. ### Code Location - Missing: `src/cleveragents/tui/materializer.py` (or similar) - Missing: `TuiMaterializer` class implementing `MaterializationStrategy` protocol from `src/cleveragents/cli/output/materializers.py` - Affected: `src/cleveragents/tui/app.py` — does not use `OutputSession` ### Steps to Reproduce ```python import cleveragents.tui as tui_pkg import cleveragents.cli.output as output_pkg print(hasattr(tui_pkg, 'TuiMaterializer')) # False print(hasattr(output_pkg, 'TuiMaterializer')) # False from cleveragents.cli.output.materializers import __all__ as mat_all print('TuiMaterializer' in mat_all) # False ``` ### Impact Without `TuiMaterializer`, CLI command producers cannot render in the TUI without modification. The spec's promise that "the same command logic supports CLI, TUI, and web frontends without modification" is not fulfilled. The TUI is architecturally disconnected from the Output Rendering Framework. Note: Issue #1315 covers the broader TUI refactoring. This issue specifically tracks the `TuiMaterializer` class implementation as a distinct deliverable.
freemo self-assigned this 2026-04-02 18:45:16 +00:00
Sign in to join this conversation.
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.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#1382
No description provided.