Skip to content

Mouse support (click, scroll, context menu) #57

@syedazeez337

Description

@syedazeez337

Summary

Add mouse interaction support — click to select, scroll to navigate, right-click for context menu.

Motivation

Lowers the learning curve significantly. New users expect mouse interaction. skim and ratatui both support mouse events via crossterm.

Requirements

Mouse Events

  • Left click: select item under cursor
  • Scroll up/down: navigate list
  • Right click: show context menu with available actions
  • Double click: trigger default action (describe)
  • Drag: future — multi-select range

Context Menu (right-click)

Show available actions based on resource kind:

┌──────────────────────┐
│ Describe       Enter │
│ Logs          Ctrl-L │
│ Exec          Ctrl-E │
│ Delete        Ctrl-D │
│ Port-forward  Ctrl-F │
│ YAML          Ctrl-Y │
│ Scale         Ctrl-S │
│ Edit          Ctrl-W │
│ Diagnose (AI) Ctrl-A │
└──────────────────────┘
  • Only show applicable actions (logs only for pods, etc.)
  • Dim disabled actions in read-only mode

Config

[ui]
mouse = true                    # enable/disable mouse

Implementation

  • skim already captures some mouse events — investigate integration points
  • Context menu: render as ratatui overlay widget
  • crossterm MouseEvent handling in the event loop

Acceptance Criteria

  • Click to select works
  • Scroll navigation works
  • Right-click context menu shows applicable actions
  • Mouse can be disabled in config
  • Doesn't interfere with terminal text selection (when disabled)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-lowPolish and quality of lifeenhancementNew feature or requestphase-4-polishEnterprise features and polish

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions