UAT: Block context menu (enter key) not implemented — Conversation widget missing context menu widget entirely #1346

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

Bug Report: [tui] — Block context menu not implemented

Severity Assessment

  • Impact: High. Users cannot perform any block-level actions (copy to clipboard, copy to prompt, export, retry, show raw data) because the context menu does not exist.
  • Likelihood: 100% reproducible — the feature does not exist in master or in the unmerged PR branch.
  • Priority: High

Location

  • Missing file: src/cleveragents/tui/widgets/block_context_menu.py (does not exist anywhere)
  • Related file: src/cleveragents/tui/screens/main_screen.py (in unmerged PR branch feature/m8-tui-mainscreen) — no enter key handler or context menu invocation

Description

The specification (§ "Block Cursor and Context Menu" → "Context Menu") requires that pressing enter with the block cursor on any conversation block opens a floating context menu with the following actions:

Action Key Applies To
Copy to clipboard c All blocks
Copy to prompt p All blocks
Export as Markdown e All blocks
Export as SVG v All blocks
Maximize / restore m ActorThought, ToolCall, DiffView
Retry r ActorResponse only
Show raw data d All blocks
Dismiss escape

No such context menu widget exists anywhere in the codebase — neither in master nor in the unmerged PR branch feature/m8-tui-mainscreen (PR #1302).

Additionally, the enter key binding for opening the context menu is absent from both the current app.py BINDINGS and the PR branch main_screen.py BINDINGS.

Evidence

PR branch main_screen.py BINDINGS (no enter binding for context menu):

BINDINGS: ClassVar[list[BindingType]] = [
    Binding("shift+tab", "cycle_sidebar", "Sidebar", show=True),
    Binding("ctrl+q", "quit_app", "Quit", show=True),
    Binding("escape", "escape_cascade", "Back", show=True),
    Binding("alt+up", "cursor_up", "Cursor Up", show=False),
    Binding("alt+down", "cursor_down", "Cursor Down", show=False),
    Binding("ctrl+b", "focus_sidebar", "Focus Sidebar", show=False),
    Binding("ctrl+n", "new_session", "New Session", show=False),
    Binding("ctrl+w", "close_session", "Close Session", show=False),
]

No enter binding for context menu. No BlockContextMenu widget class anywhere in the repository.

Spec requirement (docs/specification.md, lines 29673–29695):

Pressing enter with the block cursor on any conversation block opens a floating context menu:

┌─ Block Actions ──────────────────────────────────────────────────────┐
│  c   Copy to clipboard                                               │
│  p   Copy to prompt                                                  │
│  e   Export as Markdown                                              │
│  v   Export as SVG (opens browser)                                   │
│  m   Maximize / restore block                                        │
│  r   Retry (ActorResponse only)                                      │
│  d   Show raw data                                                   │
│──────────────────────────────────────────────────────────────────────│
│ escape Dismiss                                                       │
└──────────────────────────────────────────────────────────────────────┘

Steps to Reproduce

  1. Run the TUI app
  2. Navigate to a conversation block using alt+up/alt+down (once block cursor is implemented)
  3. Press enter — no context menu appears

Expected Behavior

A floating context menu should appear with actions: copy to clipboard (c), copy to prompt (p), export as Markdown (e), export as SVG (v), maximize/restore (m), retry (r), show raw data (d), dismiss (escape).

Actual Behavior

No context menu exists. The enter key is not bound to any context menu action.

Category

tui / block-cursor / context-menu / uat


Metadata

  • Branch: feat/tui-block-context-menu
  • Commit Message: feat(tui): implement block context menu with clipboard, export, and retry actions
  • Milestone: v3.7.0
  • Parent Epic: #694

Subtasks

  • Create src/cleveragents/tui/widgets/block_context_menu.py with a BlockContextMenu widget
  • Implement all 7 context menu actions: c (copy to clipboard), p (copy to prompt), e (export Markdown), v (export SVG), m (maximize/restore), r (retry), d (show raw data)
  • Add enter binding to MainScreen BINDINGS to open the context menu for the focused block
  • Add escape to dismiss the context menu
  • Restrict r (retry) to ActorResponse blocks only
  • Restrict m (maximize/restore) to ActorThought, ToolCall, DiffView blocks
  • Write Behave BDD scenarios for all context menu actions
  • Run nox -e typecheck, nox -e unit_tests, nox -e coverage_report

Definition of Done

  • BlockContextMenu widget exists and is triggered by enter on a focused block
  • All 7 actions are implemented and tested
  • escape dismisses the menu
  • Block-type restrictions for r and m are enforced
  • BDD scenarios cover all menu actions
  • All nox stages pass
  • Coverage ≥ 97%
## Bug Report: [tui] — Block context menu not implemented ### Severity Assessment - **Impact**: High. Users cannot perform any block-level actions (copy to clipboard, copy to prompt, export, retry, show raw data) because the context menu does not exist. - **Likelihood**: 100% reproducible — the feature does not exist in master or in the unmerged PR branch. - **Priority**: High ### Location - **Missing file**: `src/cleveragents/tui/widgets/block_context_menu.py` (does not exist anywhere) - **Related file**: `src/cleveragents/tui/screens/main_screen.py` (in unmerged PR branch `feature/m8-tui-mainscreen`) — no `enter` key handler or context menu invocation ### Description The specification (§ "Block Cursor and Context Menu" → "Context Menu") requires that pressing `enter` with the block cursor on any conversation block opens a **floating context menu** with the following actions: | Action | Key | Applies To | |--------|-----|-----------| | Copy to clipboard | `c` | All blocks | | Copy to prompt | `p` | All blocks | | Export as Markdown | `e` | All blocks | | Export as SVG | `v` | All blocks | | Maximize / restore | `m` | ActorThought, ToolCall, DiffView | | Retry | `r` | ActorResponse only | | Show raw data | `d` | All blocks | | Dismiss | `escape` | — | No such context menu widget exists anywhere in the codebase — neither in master nor in the unmerged PR branch `feature/m8-tui-mainscreen` (PR #1302). Additionally, the `enter` key binding for opening the context menu is absent from both the current `app.py` BINDINGS and the PR branch `main_screen.py` BINDINGS. ### Evidence **PR branch `main_screen.py` BINDINGS** (no `enter` binding for context menu): ```python BINDINGS: ClassVar[list[BindingType]] = [ Binding("shift+tab", "cycle_sidebar", "Sidebar", show=True), Binding("ctrl+q", "quit_app", "Quit", show=True), Binding("escape", "escape_cascade", "Back", show=True), Binding("alt+up", "cursor_up", "Cursor Up", show=False), Binding("alt+down", "cursor_down", "Cursor Down", show=False), Binding("ctrl+b", "focus_sidebar", "Focus Sidebar", show=False), Binding("ctrl+n", "new_session", "New Session", show=False), Binding("ctrl+w", "close_session", "Close Session", show=False), ] ``` No `enter` binding for context menu. No `BlockContextMenu` widget class anywhere in the repository. **Spec requirement** (`docs/specification.md`, lines 29673–29695): > Pressing `enter` with the block cursor on any conversation block opens a floating context menu: > ``` > ┌─ Block Actions ──────────────────────────────────────────────────────┐ > │ c Copy to clipboard │ > │ p Copy to prompt │ > │ e Export as Markdown │ > │ v Export as SVG (opens browser) │ > │ m Maximize / restore block │ > │ r Retry (ActorResponse only) │ > │ d Show raw data │ > │──────────────────────────────────────────────────────────────────────│ > │ escape Dismiss │ > └──────────────────────────────────────────────────────────────────────┘ > ``` ### Steps to Reproduce 1. Run the TUI app 2. Navigate to a conversation block using `alt+up`/`alt+down` (once block cursor is implemented) 3. Press `enter` — no context menu appears ### Expected Behavior A floating context menu should appear with actions: copy to clipboard (`c`), copy to prompt (`p`), export as Markdown (`e`), export as SVG (`v`), maximize/restore (`m`), retry (`r`), show raw data (`d`), dismiss (`escape`). ### Actual Behavior No context menu exists. The `enter` key is not bound to any context menu action. ### Category tui / block-cursor / context-menu / uat --- ## Metadata - **Branch**: `feat/tui-block-context-menu` - **Commit Message**: `feat(tui): implement block context menu with clipboard, export, and retry actions` - **Milestone**: v3.7.0 - **Parent Epic**: #694 ## Subtasks - [ ] Create `src/cleveragents/tui/widgets/block_context_menu.py` with a `BlockContextMenu` widget - [ ] Implement all 7 context menu actions: `c` (copy to clipboard), `p` (copy to prompt), `e` (export Markdown), `v` (export SVG), `m` (maximize/restore), `r` (retry), `d` (show raw data) - [ ] Add `enter` binding to `MainScreen` BINDINGS to open the context menu for the focused block - [ ] Add `escape` to dismiss the context menu - [ ] Restrict `r` (retry) to `ActorResponse` blocks only - [ ] Restrict `m` (maximize/restore) to `ActorThought`, `ToolCall`, `DiffView` blocks - [ ] Write Behave BDD scenarios for all context menu actions - [ ] Run `nox -e typecheck`, `nox -e unit_tests`, `nox -e coverage_report` ## Definition of Done - [ ] `BlockContextMenu` widget exists and is triggered by `enter` on a focused block - [ ] All 7 actions are implemented and tested - [ ] `escape` dismisses the menu - [ ] Block-type restrictions for `r` and `m` are enforced - [ ] BDD scenarios cover all menu actions - [ ] All nox stages pass - [ ] Coverage ≥ 97%
freemo self-assigned this 2026-04-02 18:45:20 +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#1346
No description provided.