UAT: TuiMaterializer in PR #1294 only implements 4 of 9 required ElementHandle types — Tree, Code, Diff, Separator, ActionHint widgets missing #3305

Open
opened 2026-04-05 09:28:34 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: bugfix/m8-tui-materializer-complete-widget-registry
  • Commit Message: fix(tui): implement all 9 ElementHandle widget factories in TuiMaterializer
  • Milestone: None (Backlog)
  • Parent Epic: #868

Bug Report

Feature Area: TUI Implementation (v3.7.0 — M8) — TuiMaterializer A2A integration layer
Severity: High
Priority: Backlog

What Was Tested

Inspected the TuiMaterializer implementation in PR #1294 (branch: feature/m8-tui-materializer) at src/cleveragents/tui/materializer.py.

Expected Behavior (from spec / ADR-044)

Per ADR-044 (TUI Architecture and Framework), the TuiMaterializer must handle ALL ElementHandle types:

ElementHandle Type Textual Widget Mapping
PanelHandle Static container with key-value Label pairs inside a Collapsible
TableHandle DataTable widget
TreeHandle Tree widget
ProgressHandle ProgressBar (deterministic) or custom Throbber (indeterminate)
StatusHandle Label with semantic CSS class (-info, -warning, -error, -success)
CodeHandle Read-only TextArea with syntax highlighting via tree-sitter
DiffHandle Custom DiffView widget supporting unified and side-by-side modes
SeparatorHandle Rule widget
ActionHintHandle Static with muted text and command references

ADR-044 explicitly states: "partial implementation would cause silent failures when CLI commands run in TUI context"

Actual Behavior

The PR #1294 implementation only handles 4 of 9 required ElementHandle types:

  • PanelHandle → RichLog (but spec requires Collapsible+Label, not RichLog)
  • TableHandle → DataTable
  • ProgressHandle → Static (but spec requires ProgressBar/Throbber, not Static)
  • StatusHandle → Static (but spec requires Label with semantic CSS class, not plain Static)
  • TreeHandle → NOT IMPLEMENTED (no factory in DEFAULT_WIDGET_REGISTRY)
  • CodeHandle → NOT IMPLEMENTED
  • DiffHandle → NOT IMPLEMENTED
  • SeparatorHandle → NOT IMPLEMENTED
  • ActionHintHandle → NOT IMPLEMENTED

Additionally:

  • The supports_incremental_updates attribute is missing from TuiMaterializer (required by MaterializationStrategy protocol)
  • The bind_event_queue() method for A2A event subscription (TaskStatusUpdateEvent / TaskArtifactUpdateEvent) is not implemented
  • PanelHandle uses RichLog instead of the spec-required Collapsible+Label combination

Steps to Reproduce

  1. Checkout branch feature/m8-tui-materializer
  2. Inspect src/cleveragents/tui/materializer.py
  3. Check DEFAULT_WIDGET_REGISTRY — only 4 entries: "panel", "table", "progress", "status"
  4. Attempt to render a TreeHandle, CodeHandle, DiffHandle, SeparatorHandle, or ActionHintHandle via TuiMaterializer
  5. Expected: widget created; Actual: warning logged, no widget created (silent failure)

Code Location

  • src/cleveragents/tui/materializer.py (branch: feature/m8-tui-materializer)
  • DEFAULT_WIDGET_REGISTRY dict — missing 5 handle type entries
  • TuiMaterializer class — missing supports_incremental_updates attribute and bind_event_queue() method

Impact

Any CLI command that produces Tree, Code, Diff, Separator, or ActionHint output elements will silently fail to render in the TUI. This includes plan tree views, code diffs, and syntax-highlighted code blocks — core TUI use cases.

Subtasks

  • Add TreeHandleTree widget factory to DEFAULT_WIDGET_REGISTRY
  • Add CodeHandle → read-only TextArea with syntax highlighting (tree-sitter) factory to DEFAULT_WIDGET_REGISTRY
  • Add DiffHandleDiffView widget factory (unified and side-by-side modes) to DEFAULT_WIDGET_REGISTRY
  • Add SeparatorHandleRule widget factory to DEFAULT_WIDGET_REGISTRY
  • Add ActionHintHandleStatic with muted text factory to DEFAULT_WIDGET_REGISTRY
  • Fix PanelHandle → replace RichLog with Collapsible+Label per spec
  • Fix ProgressHandle → replace Static with ProgressBar (deterministic) or Throbber (indeterminate) per spec
  • Fix StatusHandle → replace plain Static with Label bearing semantic CSS class (-info, -warning, -error, -success) per spec
  • Add supports_incremental_updates = True attribute to TuiMaterializer
  • Implement bind_event_queue() method for A2A event subscription (TaskStatusUpdateEvent / TaskArtifactUpdateEvent)

Definition of Done

  • DEFAULT_WIDGET_REGISTRY includes all 9 ElementHandle types
  • TreeHandleTree widget factory implemented and tested
  • CodeHandle → read-only TextArea with syntax highlighting factory implemented and tested
  • DiffHandleDiffView widget factory implemented and tested (unified + side-by-side modes)
  • SeparatorHandleRule widget factory implemented and tested
  • ActionHintHandleStatic with muted text factory implemented and tested
  • PanelHandleCollapsible+Label (not RichLog) per ADR-044 spec
  • ProgressHandleProgressBar (deterministic) or Throbber (indeterminate) per ADR-044 spec
  • StatusHandleLabel with semantic CSS class per ADR-044 spec
  • supports_incremental_updates = True attribute added to TuiMaterializer
  • bind_event_queue() method implemented for A2A event subscription
  • No silent failures when any ElementHandle type is passed to TuiMaterializer
  • All nox stages pass
  • Coverage >= 97%

Backlog note: This issue was discovered during autonomous operation
on milestone v3.7.0 (M8). It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-uat-tester

## Metadata - **Branch**: `bugfix/m8-tui-materializer-complete-widget-registry` - **Commit Message**: `fix(tui): implement all 9 ElementHandle widget factories in TuiMaterializer` - **Milestone**: None (Backlog) - **Parent Epic**: #868 ## Bug Report **Feature Area:** TUI Implementation (v3.7.0 — M8) — TuiMaterializer A2A integration layer **Severity:** High **Priority:** Backlog ### What Was Tested Inspected the TuiMaterializer implementation in PR #1294 (branch: `feature/m8-tui-materializer`) at `src/cleveragents/tui/materializer.py`. ### Expected Behavior (from spec / ADR-044) Per ADR-044 (TUI Architecture and Framework), the TuiMaterializer must handle ALL ElementHandle types: | ElementHandle Type | Textual Widget Mapping | |---|---| | PanelHandle | Static container with key-value Label pairs inside a Collapsible | | TableHandle | DataTable widget | | TreeHandle | Tree widget | | ProgressHandle | ProgressBar (deterministic) or custom Throbber (indeterminate) | | StatusHandle | Label with semantic CSS class (`-info`, `-warning`, `-error`, `-success`) | | CodeHandle | Read-only TextArea with syntax highlighting via tree-sitter | | DiffHandle | Custom DiffView widget supporting unified and side-by-side modes | | SeparatorHandle | Rule widget | | ActionHintHandle | Static with muted text and command references | ADR-044 explicitly states: *"partial implementation would cause silent failures when CLI commands run in TUI context"* ### Actual Behavior The PR #1294 implementation only handles **4 of 9** required ElementHandle types: - ✅ PanelHandle → RichLog (**but spec requires Collapsible+Label, not RichLog**) - ✅ TableHandle → DataTable - ✅ ProgressHandle → Static (**but spec requires ProgressBar/Throbber, not Static**) - ✅ StatusHandle → Static (**but spec requires Label with semantic CSS class, not plain Static**) - ❌ TreeHandle → **NOT IMPLEMENTED** (no factory in `DEFAULT_WIDGET_REGISTRY`) - ❌ CodeHandle → **NOT IMPLEMENTED** - ❌ DiffHandle → **NOT IMPLEMENTED** - ❌ SeparatorHandle → **NOT IMPLEMENTED** - ❌ ActionHintHandle → **NOT IMPLEMENTED** **Additionally:** - The `supports_incremental_updates` attribute is missing from `TuiMaterializer` (required by `MaterializationStrategy` protocol) - The `bind_event_queue()` method for A2A event subscription (`TaskStatusUpdateEvent` / `TaskArtifactUpdateEvent`) is not implemented - `PanelHandle` uses `RichLog` instead of the spec-required `Collapsible+Label` combination ### Steps to Reproduce 1. Checkout branch `feature/m8-tui-materializer` 2. Inspect `src/cleveragents/tui/materializer.py` 3. Check `DEFAULT_WIDGET_REGISTRY` — only 4 entries: `"panel"`, `"table"`, `"progress"`, `"status"` 4. Attempt to render a `TreeHandle`, `CodeHandle`, `DiffHandle`, `SeparatorHandle`, or `ActionHintHandle` via `TuiMaterializer` 5. **Expected:** widget created; **Actual:** warning logged, no widget created (silent failure) ### Code Location - `src/cleveragents/tui/materializer.py` (branch: `feature/m8-tui-materializer`) - `DEFAULT_WIDGET_REGISTRY` dict — missing 5 handle type entries - `TuiMaterializer` class — missing `supports_incremental_updates` attribute and `bind_event_queue()` method ### Impact Any CLI command that produces Tree, Code, Diff, Separator, or ActionHint output elements will silently fail to render in the TUI. This includes plan tree views, code diffs, and syntax-highlighted code blocks — core TUI use cases. ## Subtasks - [ ] Add `TreeHandle` → `Tree` widget factory to `DEFAULT_WIDGET_REGISTRY` - [ ] Add `CodeHandle` → read-only `TextArea` with syntax highlighting (tree-sitter) factory to `DEFAULT_WIDGET_REGISTRY` - [ ] Add `DiffHandle` → `DiffView` widget factory (unified and side-by-side modes) to `DEFAULT_WIDGET_REGISTRY` - [ ] Add `SeparatorHandle` → `Rule` widget factory to `DEFAULT_WIDGET_REGISTRY` - [ ] Add `ActionHintHandle` → `Static` with muted text factory to `DEFAULT_WIDGET_REGISTRY` - [ ] Fix `PanelHandle` → replace `RichLog` with `Collapsible+Label` per spec - [ ] Fix `ProgressHandle` → replace `Static` with `ProgressBar` (deterministic) or `Throbber` (indeterminate) per spec - [ ] Fix `StatusHandle` → replace plain `Static` with `Label` bearing semantic CSS class (`-info`, `-warning`, `-error`, `-success`) per spec - [ ] Add `supports_incremental_updates = True` attribute to `TuiMaterializer` - [ ] Implement `bind_event_queue()` method for A2A event subscription (`TaskStatusUpdateEvent` / `TaskArtifactUpdateEvent`) ## Definition of Done - [ ] `DEFAULT_WIDGET_REGISTRY` includes all 9 ElementHandle types - [ ] `TreeHandle` → `Tree` widget factory implemented and tested - [ ] `CodeHandle` → read-only `TextArea` with syntax highlighting factory implemented and tested - [ ] `DiffHandle` → `DiffView` widget factory implemented and tested (unified + side-by-side modes) - [ ] `SeparatorHandle` → `Rule` widget factory implemented and tested - [ ] `ActionHintHandle` → `Static` with muted text factory implemented and tested - [ ] `PanelHandle` → `Collapsible+Label` (not `RichLog`) per ADR-044 spec - [ ] `ProgressHandle` → `ProgressBar` (deterministic) or `Throbber` (indeterminate) per ADR-044 spec - [ ] `StatusHandle` → `Label` with semantic CSS class per ADR-044 spec - [ ] `supports_incremental_updates = True` attribute added to `TuiMaterializer` - [ ] `bind_event_queue()` method implemented for A2A event subscription - [ ] No silent failures when any ElementHandle type is passed to `TuiMaterializer` - [ ] All nox stages pass - [ ] Coverage >= 97% > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.7.0 (M8). It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — This is a significant implementation gap in the TuiMaterializer (5 of 9 widget types missing), but the TUI milestone (v3.7.0) has no deadline and is lower priority than M1-M6 milestones.
  • Milestone: v3.7.0 — This is TUI implementation work (M8). Assigning to v3.7.0.
  • MoSCoW: Should Have — The TuiMaterializer must eventually implement all 9 ElementHandle types per ADR-044, but partial implementation is acceptable for initial TUI development. The missing types (Tree, Code, Diff, Separator, ActionHint) are important but not blocking initial TUI functionality.
  • Parent Epic: #868 (TUI Interface, Modals and Persona System)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — This is a significant implementation gap in the TuiMaterializer (5 of 9 widget types missing), but the TUI milestone (v3.7.0) has no deadline and is lower priority than M1-M6 milestones. - **Milestone**: v3.7.0 — This is TUI implementation work (M8). Assigning to v3.7.0. - **MoSCoW**: Should Have — The TuiMaterializer must eventually implement all 9 ElementHandle types per ADR-044, but partial implementation is acceptable for initial TUI development. The missing types (Tree, Code, Diff, Separator, ActionHint) are important but not blocking initial TUI functionality. - **Parent Epic**: #868 (TUI Interface, Modals and Persona System) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo added this to the v3.7.0 milestone 2026-04-05 09:40:02 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium (upgrading from Backlog — missing ElementHandle types means the TUI cannot render several important content types, but this is M8 scope with no deadline)
  • Milestone: v3.7.0 (TUI materializer is explicitly M8 scope)
  • MoSCoW: Must Have — the TuiMaterializer must support all 9 ElementHandle types to be spec-compliant. Missing 5 of 9 types means the materializer is fundamentally incomplete.
  • Parent Epic: #868 (TUI Interface, Modals and Persona System)

This should be addressed as part of the TUI materializer implementation, but development effort should focus on M1-M6 milestones first per the v3.7.0 milestone description.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium (upgrading from Backlog — missing ElementHandle types means the TUI cannot render several important content types, but this is M8 scope with no deadline) - **Milestone**: v3.7.0 (TUI materializer is explicitly M8 scope) - **MoSCoW**: Must Have — the TuiMaterializer must support all 9 ElementHandle types to be spec-compliant. Missing 5 of 9 types means the materializer is fundamentally incomplete. - **Parent Epic**: #868 (TUI Interface, Modals and Persona System) This should be addressed as part of the TUI materializer implementation, but development effort should focus on M1-M6 milestones first per the v3.7.0 milestone description. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.7.0 milestone 2026-04-07 00:00:22 +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.

Blocks
Reference
cleveragents/cleveragents-core#3305
No description provided.