Skip to content

v0.8.6 feat(tui): right-click context menu on transcript cells #375

@Hmbown

Description

@Hmbown

Pitch

Surface the actions the user already wants in a discoverable place. Right-click on any transcript cell pops a small menu:

  • Copy the cell's text
  • Open in editor (if the cell references a file, e.g. apply_patch / read_file results)
  • Re-run (for tool cells: re-issue the same tool with the same args)
  • Jump to thinking (for tool cells: scroll to the thinking block that produced this call)
  • Hide cell (collapse to a one-line summary, expand on click)

Different cell types expose different actions; the menu builder picks based on `HistoryCell` variant.

Implementation sketch

  1. Hook `crossterm::MouseEvent::Down(MouseButton::Right, x, y)`.
  2. Resolve `(x, y)` to a `HistoryCell` via the existing `line_meta` map in `transcript_cache`.
  3. Build menu items per-variant in a new `tui/context_menu.rs`.
  4. Render as a small popup overlay (already have `PopupView` chrome).
  5. Keyboard-equivalent: `Ctrl+Space` on the focused cell.

Acceptance

  • Right-click on a transcript cell opens a context menu.
  • Each cell type gets the right menu actions.
  • Keyboard fallback (`Ctrl+Space`) works for users without mouse capture.
  • Menu dismisses cleanly with Esc / click-outside.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.8.6Targeting v0.8.6

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions