Skip to content

TUI: mouse selection, sort and filter (0.3.0) - #5

Merged
ralyodio merged 2 commits into
mainfrom
mouse
Nov 30, 2026
Merged

ralyodio merged 2 commits into
mainfrom
mouse

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

User ask: "sk33p needs a mouse interface with the TUI so we can select rows/column ranges with cmd+click" and "sort ... maybe a filter".

Mouse + selection: click, drag, Shift+click extend, Ctrl/Alt+click add range, column/row header + corner clicks, Shift+arrows, Ctrl+A, double-click edits, wheel / Shift+wheel. Name box shows B2:C6, D:D; status bar Sum/Avg/Count. Del, Ctrl+C (TSV + OSC 52), Ctrl+V (formulas re-anchored) each one undo step.

Sort: s/S, :sort B desc, C asc, header detection, numbers/text/blanks ordering, stable. Moves cell inputs and lets the engine recompute; refuses (naming the cell) when a formula points at another row relatively.

Filter: f AutoFilter (▾/▼), :filter C > 100, contains, off; view-only, cursor skips hidden rows.

CLI/MCP: sk33p sort FILE [RANGE] --by C [--desc] [--header] [-o OUT], sk33p cat ... --where "C>100"; MCP sort_range, read_range where/header.

Cmd+click: terminal mouse reports carry only Shift/Meta/Ctrl and macOS terminals keep Cmd+click for links, so Ctrl/Alt+click adds ranges (documented in README and help).

Tests: cargo test --release 17/17 (12 new + headless end-to-end TUI test feeding real mouse bytes); clippy clean. Builds on #3 (merged).

🤖 Generated with Claude Code

ralyodio and others added 2 commits November 30, 2026 16:57
- Select by click, drag, Shift+click (extend), Ctrl/Alt+click (add range),
  column/row header and corner clicks, Shift+arrows, Ctrl+A; double-click
  edits; wheel / Shift+wheel scroll. Name box shows the selection, status bar
  Sum/Avg/Count.
- Del / Ctrl+C (TSV + OSC 52) / Ctrl+V (formulas re-anchored) as one undo step.
- Sort: s / S, :sort B desc, C asc; header detection; refuses when a formula
  points at another row relatively instead of breaking it.
- Filter: f (AutoFilter markers), :filter C > 100 / contains / off; view only.
- CLI: sk33p sort, cat --where. MCP: sort_range, read_range where/header.
- Cmd+click never reaches terminal apps on macOS: documented, use Ctrl/Alt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 5696c25 into main Nov 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant