Skip to content

Add mouse support to the navigator TUI #8

Description

@RaviTharuma

Problem

The Navigator overlay currently responds only to keyboard input. Mouse clicks and scroll-wheel events have no effect, which makes the picker inconsistent with mouse-enabled Herdr workflows and less accessible to users who expect to navigate terminal lists with the mouse.

The current event loop in src/tui.rs handles Event::Key only; mouse capture is not enabled and Event::Mouse is not handled.

Proposed behavior

Add mouse support while preserving all existing keyboard behavior:

  • Scrolling the wheel over the results moves the selection up or down.
  • Left-clicking a visible result selects it.
  • Clicking the selected result again (or double-clicking it) opens/activates it.
  • Mouse capture is enabled while the TUI is active and reliably disabled when it exits, including error paths, so terminal state is restored.
  • Clicks outside interactive areas are ignored.

Alternatives

Continue requiring keyboard navigation (Up/Down, j/k, and Enter). This works, but does not address mouse-first workflows or expected terminal picker behavior.

Environment

  • Herdr Navigator: v0.3.3
  • Platform: macOS (likely applies to Linux as well)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions