UAT: TUI Block Cursor and Context Menu not implemented — spec requires block selection, copy-to-clipboard, create-plan-from-block, and explain-decision actions #3005

Open
opened 2026-04-05 03:32:23 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: feat/tui-block-cursor-context-menu
  • Commit Message: feat(tui): implement block cursor navigation and context menu for conversation stream
  • Milestone: v3.7.0
  • Parent Epic: #868

Description

The spec defines a Block Cursor and Context Menu system where:

  • The TUI features a block-based cursor that allows the user to select and interact with individual messages (blocks) in the conversation stream
  • Once a block is selected, the user can open a context menu (e.g., by right-clicking or pressing a hotkey) to perform actions:
    • Copy to Clipboard: Copy the block's content to the system clipboard
    • Create Plan from Block: Use the block's content as the basis for a new plan
    • Explain Decision: If the block represents a plan decision, open the Plan Detail Modal to that decision

Current behaviour: The conversation area is a plain _Static widget with no block-based interaction. There is no cursor navigation between messages, no context menu, no copy-to-clipboard functionality, and no "Create Plan from Block" or "Explain Decision" actions. The ThoughtBlockWidget exists but is not integrated into a conversation stream with block cursor support.

Expected behaviour per spec: The conversation stream should support block cursor navigation (selecting individual messages), and a context menu should appear when a block is selected (via right-click or hotkey) with the three specified actions.

Code Locations

  • src/cleveragents/tui/app.py line 112: yield _Static("CleverAgents TUI", id="conversation") — plain Static widget with no block interaction
  • src/cleveragents/tui/widgets/thought_block.py: ThoughtBlockWidget exists but is not integrated into a block cursor system
  • No context menu widget exists anywhere in src/cleveragents/tui/

Steps to Reproduce

  1. Launch the TUI: agents tui
  2. Submit a message to generate a response
  3. Attempt to navigate between messages with arrow keys — no block cursor exists
  4. Attempt to right-click or press a hotkey to open a context menu — no context menu exists

Subtasks

  • Create src/cleveragents/tui/widgets/context_menu.py with BlockContextMenu class
  • Implement block cursor navigation in the conversation stream
  • Implement "Copy to Clipboard" action in context menu
  • Implement "Create Plan from Block" action in context menu
  • Implement "Explain Decision" action in context menu (opens Plan Detail Modal)
  • Integrate block cursor with ThoughtBlockWidget and other message types
  • Add keyboard binding for opening context menu
  • Write BDD scenarios in features/tui_block_cursor_context_menu.feature

Definition of Done

  • Block cursor navigation works in the conversation stream
  • Context menu appears on right-click or hotkey press
  • All three context menu actions (copy, create plan, explain decision) are functional
  • BDD scenarios cover block cursor and context menu functionality
  • nox -e typecheck passes
  • nox -e unit_tests passes
  • All nox stages pass
  • Coverage >= 97%

This issue was filed by the UAT Testing agent (ca-uat-tester) as part of automated acceptance testing.


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

## Metadata - **Branch**: `feat/tui-block-cursor-context-menu` - **Commit Message**: `feat(tui): implement block cursor navigation and context menu for conversation stream` - **Milestone**: v3.7.0 - **Parent Epic**: #868 ## Description The spec defines a Block Cursor and Context Menu system where: - The TUI features a block-based cursor that allows the user to select and interact with individual messages (blocks) in the conversation stream - Once a block is selected, the user can open a context menu (e.g., by right-clicking or pressing a hotkey) to perform actions: - **Copy to Clipboard**: Copy the block's content to the system clipboard - **Create Plan from Block**: Use the block's content as the basis for a new plan - **Explain Decision**: If the block represents a plan decision, open the Plan Detail Modal to that decision **Current behaviour:** The conversation area is a plain `_Static` widget with no block-based interaction. There is no cursor navigation between messages, no context menu, no copy-to-clipboard functionality, and no "Create Plan from Block" or "Explain Decision" actions. The `ThoughtBlockWidget` exists but is not integrated into a conversation stream with block cursor support. **Expected behaviour per spec:** The conversation stream should support block cursor navigation (selecting individual messages), and a context menu should appear when a block is selected (via right-click or hotkey) with the three specified actions. ### Code Locations - `src/cleveragents/tui/app.py` line 112: `yield _Static("CleverAgents TUI", id="conversation")` — plain Static widget with no block interaction - `src/cleveragents/tui/widgets/thought_block.py`: `ThoughtBlockWidget` exists but is not integrated into a block cursor system - No context menu widget exists anywhere in `src/cleveragents/tui/` ### Steps to Reproduce 1. Launch the TUI: `agents tui` 2. Submit a message to generate a response 3. Attempt to navigate between messages with arrow keys — no block cursor exists 4. Attempt to right-click or press a hotkey to open a context menu — no context menu exists ## Subtasks - [ ] Create `src/cleveragents/tui/widgets/context_menu.py` with `BlockContextMenu` class - [ ] Implement block cursor navigation in the conversation stream - [ ] Implement "Copy to Clipboard" action in context menu - [ ] Implement "Create Plan from Block" action in context menu - [ ] Implement "Explain Decision" action in context menu (opens Plan Detail Modal) - [ ] Integrate block cursor with `ThoughtBlockWidget` and other message types - [ ] Add keyboard binding for opening context menu - [ ] Write BDD scenarios in `features/tui_block_cursor_context_menu.feature` ## Definition of Done - [ ] Block cursor navigation works in the conversation stream - [ ] Context menu appears on right-click or hotkey press - [ ] All three context menu actions (copy, create plan, explain decision) are functional - [ ] BDD scenarios cover block cursor and context menu functionality - [ ] `nox -e typecheck` passes - [ ] `nox -e unit_tests` passes - [ ] All nox stages pass - [ ] Coverage >= 97% --- > This issue was filed by the UAT Testing agent (ca-uat-tester) as part of automated acceptance testing. --- **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:34:37 +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
Author
Owner

Starting implementation on branch feat/tui-block-cursor-context-menu.

Implementing:

  1. BlockContextMenu widget with copy-to-clipboard, create-plan-from-block, and explain-decision actions
  2. ConversationStream widget with block cursor navigation
  3. Integration with ThoughtBlockWidget
  4. Keyboard bindings for context menu
  5. BDD scenarios

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

Starting implementation on branch `feat/tui-block-cursor-context-menu`. Implementing: 1. `BlockContextMenu` widget with copy-to-clipboard, create-plan-from-block, and explain-decision actions 2. `ConversationStream` widget with block cursor navigation 3. Integration with `ThoughtBlockWidget` 4. Keyboard bindings for context menu 5. BDD scenarios --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
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#3005
No description provided.