UAT: TUI Conversation Stream is a plain Static widget — spec requires Markdown rendering, block-based interaction, streaming responses, and inline widgets #2991

Open
opened 2026-04-05 03:19:30 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: feat/tui-conversation-stream
  • Commit Message: feat(tui): implement full Conversation Stream with Markdown, block cursor, streaming, and inline widgets
  • Milestone: v3.7.0
  • Parent Epic: #868

Description

The spec defines the Conversation Stream as the central component of the TUI's main screen with these key features:

  • Markdown Rendering: Full Markdown rendering including code blocks with syntax highlighting, tables, and lists
  • Block-Based Interaction: Each message is treated as a "block" that can be selected, copied, or acted upon
  • Streaming Responses: Agent responses are streamed into the conversation view in real-time
  • Inline Widgets: The stream can host inline widgets for complex information or interactive elements like permission requests

Current Behavior

The conversation area in src/cleveragents/tui/app.py is implemented as a plain _Static widget with id "conversation" (line 112). It only calls conversation.update(text) with plain text strings. There is:

  • No Markdown rendering (just raw text display)
  • No block-based interaction (no cursor navigation between messages)
  • No streaming response support (text is replaced wholesale, not streamed)
  • No inline widget hosting capability (the Static widget cannot contain child widgets)

Note

: PR #1302 (feat(tui): implement Textual MainScreen) is open and includes a Conversation widget, but it has not been merged to master. The current master branch still uses the plain Static widget.

Expected Behavior (per spec)

The conversation area should be a rich, scrollable widget that renders Markdown, supports block cursor navigation, streams responses incrementally, and can host inline widgets like PermissionQuestionWidget and ThoughtBlockWidget.

Code Locations

  • src/cleveragents/tui/app.py line 112: yield _Static("CleverAgents TUI", id="conversation") — plain Static widget
  • src/cleveragents/tui/app.py lines 186–209: on_input_submitted calls conversation.update(result.command_result or "") — replaces entire content, no streaming

Steps to Reproduce

  1. Launch the TUI: agents tui
  2. Submit a message
  3. The response replaces the entire conversation area with plain text — no Markdown rendering, no block navigation, no streaming

Subtasks

  • Create src/cleveragents/tui/widgets/conversation_stream.py with ConversationStream class
  • Implement Markdown rendering with syntax highlighting for code blocks
  • Implement block-based message model (each message is a selectable block)
  • Implement block cursor navigation (up/down arrow keys to select blocks)
  • Implement streaming response support (incremental text updates)
  • Implement inline widget hosting (embed PermissionQuestionWidget, ThoughtBlockWidget)
  • Replace the plain Static widget in app.py with the new ConversationStream
  • Write BDD scenarios in features/tui_conversation_stream.feature

Definition of Done

  • ConversationStream class exists and replaces the plain Static widget
  • Markdown rendering works including code blocks with syntax highlighting
  • Block cursor navigation works with keyboard
  • Streaming responses update incrementally
  • Inline widgets (PermissionQuestionWidget, ThoughtBlockWidget) can be embedded
  • BDD scenarios cover all stream functionality
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `feat/tui-conversation-stream` - **Commit Message**: `feat(tui): implement full Conversation Stream with Markdown, block cursor, streaming, and inline widgets` - **Milestone**: v3.7.0 - **Parent Epic**: #868 ## Description The spec defines the Conversation Stream as the central component of the TUI's main screen with these key features: - **Markdown Rendering**: Full Markdown rendering including code blocks with syntax highlighting, tables, and lists - **Block-Based Interaction**: Each message is treated as a "block" that can be selected, copied, or acted upon - **Streaming Responses**: Agent responses are streamed into the conversation view in real-time - **Inline Widgets**: The stream can host inline widgets for complex information or interactive elements like permission requests ### Current Behavior The conversation area in `src/cleveragents/tui/app.py` is implemented as a plain `_Static` widget with id `"conversation"` (line 112). It only calls `conversation.update(text)` with plain text strings. There is: - No Markdown rendering (just raw text display) - No block-based interaction (no cursor navigation between messages) - No streaming response support (text is replaced wholesale, not streamed) - No inline widget hosting capability (the Static widget cannot contain child widgets) > **Note**: PR #1302 (`feat(tui): implement Textual MainScreen`) is open and includes a `Conversation` widget, but it has not been merged to master. The current master branch still uses the plain Static widget. ### Expected Behavior (per spec) The conversation area should be a rich, scrollable widget that renders Markdown, supports block cursor navigation, streams responses incrementally, and can host inline widgets like `PermissionQuestionWidget` and `ThoughtBlockWidget`. ### Code Locations - `src/cleveragents/tui/app.py` line 112: `yield _Static("CleverAgents TUI", id="conversation")` — plain Static widget - `src/cleveragents/tui/app.py` lines 186–209: `on_input_submitted` calls `conversation.update(result.command_result or "")` — replaces entire content, no streaming ### Steps to Reproduce 1. Launch the TUI: `agents tui` 2. Submit a message 3. The response replaces the entire conversation area with plain text — no Markdown rendering, no block navigation, no streaming ## Subtasks - [ ] Create `src/cleveragents/tui/widgets/conversation_stream.py` with `ConversationStream` class - [ ] Implement Markdown rendering with syntax highlighting for code blocks - [ ] Implement block-based message model (each message is a selectable block) - [ ] Implement block cursor navigation (up/down arrow keys to select blocks) - [ ] Implement streaming response support (incremental text updates) - [ ] Implement inline widget hosting (embed PermissionQuestionWidget, ThoughtBlockWidget) - [ ] Replace the plain Static widget in `app.py` with the new ConversationStream - [ ] Write BDD scenarios in `features/tui_conversation_stream.feature` ## Definition of Done - [ ] `ConversationStream` class exists and replaces the plain Static widget - [ ] Markdown rendering works including code blocks with syntax highlighting - [ ] Block cursor navigation works with keyboard - [ ] Streaming responses update incrementally - [ ] Inline widgets (`PermissionQuestionWidget`, `ThoughtBlockWidget`) can be embedded - [ ] BDD scenarios cover all stream functionality - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 03:20:14 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have

Valid finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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#2991
No description provided.