Skip to content

mecatui: mouse interactions beyond drag-selection (links, approval buttons, textarea caret) #486

Closed

Description

@jbeda

Summary

mecatui already captures the mouse on the alt screen, but the only consumer is left-drag text selection over the conversation viewport (plus mouse-wheel scrolling in the plan-review viewport). Clicks otherwise do nothing. Three interactions would make the TUI feel modern:

  1. Click-to-open URLs — links in the scrollback render as plain text; clicking one should open it (OSC8 hyperlinks where the terminal supports them, else xdg-open/platform opener).
  2. Clickable approval / plan-review buttons — the permission modal (Allow / Always / Deny) and the plan-review action bar should respond to clicks, equivalent to their key chords.
  3. Click-to-position-cursor in the textarea — clicking inside the prompt input should move the caret to that cell.

Grounding

The hard plumbing already exists:

  • Alt-screen mouse capture: cmd/mecatui/ui/view.go:45 (capture gate) + cmd/mecatui/ui/selection.go (selectable gate, convTopRow click→content mapping that derives from the same chrome() layout the renderer uses).
  • Escape hatch: --no-mouse flag (ui/selection.go:105); MECATUI_DEBUG_MOUSE=1 shows raw coords + content mapping in the footer.
  • Mouse wheel already scrolls the plan-review viewport (ui/permission.go:147 advertises it in the scroll hint).

So each interaction is a new click consumer on top of the existing capture + coordinate-mapping infrastructure, not a from-scratch mouse feature. Likely separable PRs; the textarea caret one is probably the trickiest (focus/caret mapping through the textarea component).

Out of scope

Drag-selection behaviour changes; mouse in --inline mode (no alt screen — intentionally uncaptured there).

Activity

  1. added
    enhancement
    on Aug 12, 2026
  2. added
    tui
    on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions