UAT: Conversation widget (PR branch) missing DiffView, TerminalEmbed, ShellResult block types — only 7 of 10 spec-required types implemented #1362

Open
opened 2026-04-02 16:58:43 +00:00 by freemo · 0 comments
Owner

Bug Report: [tui] — Conversation widget missing 3 of 10 spec-required block types

Severity Assessment

  • Impact: Medium. Three important block types (DiffView, TerminalEmbed, ShellResult) are absent from the Conversation widget in the unmerged PR branch. When these events arrive from the A2A layer, they will not be rendered correctly.
  • Likelihood: 100% reproducible for those block types.
  • Priority: Medium

Location

  • File: src/cleveragents/tui/widgets/conversation.py (in unmerged PR branch feature/m8-tui-mainscreen)
  • Spec reference: docs/specification.md, lines 29617–29636 (Conversation Stream block types table)

Description

The specification defines 10 conversation block types that the Conversation widget must support. The BlockType enum in the PR branch (feature/m8-tui-mainscreen) only implements 7 of them, omitting 3:

Block Type Spec Required PR Branch Status
Welcome WELCOME
UserInput USER_INPUT
ActorResponse ACTOR_RESPONSE
ActorThought ACTOR_THOUGHT
ToolCall TOOL_CALL
PlanProgress PLAN_PROGRESS
DiffView Missing
TerminalEmbed Missing
ShellResult Missing
Note NOTE

Evidence

PR branch conversation.py BlockType enum:

class BlockType(Enum):
    """Types of conversation message blocks."""
    WELCOME = "welcome"
    USER_INPUT = "user_input"
    ACTOR_RESPONSE = "actor_response"
    ACTOR_THOUGHT = "actor_thought"
    TOOL_CALL = "tool_call"
    PLAN_PROGRESS = "plan_progress"
    NOTE = "note"
    # Missing: DIFF_VIEW, TERMINAL_EMBED, SHELL_RESULT

Spec requirement (docs/specification.md, lines 29617–29636):

| DiffView | Unified or side-by-side diff, syntax highlighting | Tool results with diffs |
| TerminalEmbed | Bordered terminal, $primary 50% border, green/red tint | Shell or tool terminal output |
| ShellResult | Left border $primary, 4% foreground bg | User shell command (!) output |

Missing Visual Treatments

Per the spec, each missing block type has specific visual requirements:

  • DiffView: Unified or side-by-side diff with syntax highlighting and line numbers. Must implement ExpandProtocol (collapsible).
  • TerminalEmbed: Bordered terminal widget with $primary 50% border, green (success) or red (error) tint.
  • ShellResult: Left border $primary, 4% foreground background. Rendered when user runs !shell commands.

Steps to Reproduce

  1. Run the TUI app (once PR #1302 is merged)
  2. Run a shell command with !ls — a ShellResult block should appear
  3. Observe: no ShellResult block type exists; the block cannot be rendered correctly
  4. Similarly, tool calls that produce diffs cannot render DiffView blocks

Expected Behavior

All 10 block types are supported by the Conversation widget with their spec-defined visual treatments.

Actual Behavior

DiffView, TerminalEmbed, and ShellResult block types are absent from the BlockType enum and have no rendering logic.

Category

tui / block-cursor / block-types / uat


Metadata

  • Branch: feat/tui-missing-block-types
  • Commit Message: feat(tui): add DiffView, TerminalEmbed, ShellResult block types to Conversation widget
  • Milestone: v3.7.0
  • Parent Epic: #694

Subtasks

  • Add DIFF_VIEW, TERMINAL_EMBED, SHELL_RESULT to the BlockType enum in conversation.py
  • Add rendering logic for DiffView (unified diff with syntax highlighting, collapsible)
  • Add rendering logic for TerminalEmbed (bordered terminal, green/red tint)
  • Add rendering logic for ShellResult (left border $primary, 4% foreground bg)
  • Add DIFF_VIEW to the ExpandProtocol implementors (alongside ToolCall and ActorThought)
  • Update _block_style() function to handle the 3 new block types
  • Write Behave BDD scenarios for each new block type
  • Run nox -e typecheck, nox -e unit_tests, nox -e coverage_report

Definition of Done

  • All 10 block types are in BlockType enum
  • Each block type has correct visual treatment per spec
  • DiffView implements ExpandProtocol
  • BDD scenarios cover all 3 new block types
  • All nox stages pass
  • Coverage ≥ 97%
## Bug Report: [tui] — Conversation widget missing 3 of 10 spec-required block types ### Severity Assessment - **Impact**: Medium. Three important block types (DiffView, TerminalEmbed, ShellResult) are absent from the `Conversation` widget in the unmerged PR branch. When these events arrive from the A2A layer, they will not be rendered correctly. - **Likelihood**: 100% reproducible for those block types. - **Priority**: Medium ### Location - **File**: `src/cleveragents/tui/widgets/conversation.py` (in unmerged PR branch `feature/m8-tui-mainscreen`) - **Spec reference**: `docs/specification.md`, lines 29617–29636 (Conversation Stream block types table) ### Description The specification defines **10 conversation block types** that the `Conversation` widget must support. The `BlockType` enum in the PR branch (`feature/m8-tui-mainscreen`) only implements **7** of them, omitting 3: | Block Type | Spec Required | PR Branch Status | |---|---|---| | `Welcome` | ✅ | ✅ `WELCOME` | | `UserInput` | ✅ | ✅ `USER_INPUT` | | `ActorResponse` | ✅ | ✅ `ACTOR_RESPONSE` | | `ActorThought` | ✅ | ✅ `ACTOR_THOUGHT` | | `ToolCall` | ✅ | ✅ `TOOL_CALL` | | `PlanProgress` | ✅ | ✅ `PLAN_PROGRESS` | | `DiffView` | ✅ | ❌ **Missing** | | `TerminalEmbed` | ✅ | ❌ **Missing** | | `ShellResult` | ✅ | ❌ **Missing** | | `Note` | ✅ | ✅ `NOTE` | ### Evidence **PR branch `conversation.py`** `BlockType` enum: ```python class BlockType(Enum): """Types of conversation message blocks.""" WELCOME = "welcome" USER_INPUT = "user_input" ACTOR_RESPONSE = "actor_response" ACTOR_THOUGHT = "actor_thought" TOOL_CALL = "tool_call" PLAN_PROGRESS = "plan_progress" NOTE = "note" # Missing: DIFF_VIEW, TERMINAL_EMBED, SHELL_RESULT ``` **Spec requirement** (`docs/specification.md`, lines 29617–29636): > | `DiffView` | Unified or side-by-side diff, syntax highlighting | Tool results with diffs | > | `TerminalEmbed` | Bordered terminal, `$primary 50%` border, green/red tint | Shell or tool terminal output | > | `ShellResult` | Left border `$primary`, 4% foreground bg | User shell command (!) output | ### Missing Visual Treatments Per the spec, each missing block type has specific visual requirements: - **`DiffView`**: Unified or side-by-side diff with syntax highlighting and line numbers. Must implement `ExpandProtocol` (collapsible). - **`TerminalEmbed`**: Bordered terminal widget with `$primary 50%` border, green (success) or red (error) tint. - **`ShellResult`**: Left border `$primary`, 4% foreground background. Rendered when user runs `!shell` commands. ### Steps to Reproduce 1. Run the TUI app (once PR #1302 is merged) 2. Run a shell command with `!ls` — a `ShellResult` block should appear 3. Observe: no `ShellResult` block type exists; the block cannot be rendered correctly 4. Similarly, tool calls that produce diffs cannot render `DiffView` blocks ### Expected Behavior All 10 block types are supported by the `Conversation` widget with their spec-defined visual treatments. ### Actual Behavior `DiffView`, `TerminalEmbed`, and `ShellResult` block types are absent from the `BlockType` enum and have no rendering logic. ### Category tui / block-cursor / block-types / uat --- ## Metadata - **Branch**: `feat/tui-missing-block-types` - **Commit Message**: `feat(tui): add DiffView, TerminalEmbed, ShellResult block types to Conversation widget` - **Milestone**: v3.7.0 - **Parent Epic**: #694 ## Subtasks - [ ] Add `DIFF_VIEW`, `TERMINAL_EMBED`, `SHELL_RESULT` to the `BlockType` enum in `conversation.py` - [ ] Add rendering logic for `DiffView` (unified diff with syntax highlighting, collapsible) - [ ] Add rendering logic for `TerminalEmbed` (bordered terminal, green/red tint) - [ ] Add rendering logic for `ShellResult` (left border `$primary`, 4% foreground bg) - [ ] Add `DIFF_VIEW` to the `ExpandProtocol` implementors (alongside `ToolCall` and `ActorThought`) - [ ] Update `_block_style()` function to handle the 3 new block types - [ ] Write Behave BDD scenarios for each new block type - [ ] Run `nox -e typecheck`, `nox -e unit_tests`, `nox -e coverage_report` ## Definition of Done - [ ] All 10 block types are in `BlockType` enum - [ ] Each block type has correct visual treatment per spec - [ ] `DiffView` implements `ExpandProtocol` - [ ] BDD scenarios cover all 3 new block types - [ ] All nox stages pass - [ ] Coverage ≥ 97%
freemo self-assigned this 2026-04-02 18:45:18 +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#1362
No description provided.