You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today's mouse handling in src/main.rs (lines 695-789) only consumes MouseButton::Left, ScrollUp, and ScrollDown. Crossterm already emits MouseButton::X1 and MouseButton::X2 events on supported terminals — we just don't process them. A common workflow is: double-click a connection (jumps to Details), then mouse-back to return to Overview. Today that requires Esc or Shift+Tab.
We also have no view-history stack — selected_tab in UIState is a bare usize updated by direct assignment.
Scope
Two parts:
1. History stack
Add tab_history: VecDeque<usize> (bounded ~16) and optionally forward_stack: VecDeque<usize> to UIState in src/ui.rs (around line 495)
The PR must include evidence of real-world end-to-end testing — actually plug in a mouse with X1/X2 buttons (or use a tool like xev to confirm), run rustnet, and demonstrate back/forward works. Mention the terminal and the mouse model in the PR description. A short screencast is ideal.
X1/X2 buttons move backward/forward through tab history on terminals that forward them — verified live in at least one terminal (kitty, foot, WezTerm, iTerm2, or Windows Terminal). Note in the PR which terminals were tested and which forwarded the events
Terminals that don't forward X1/X2 are silently unaffected (no error, no crash) — tested by running in a terminal that doesn't support them (e.g., basic xterm) and confirming nothing breaks
History stack bounded; doesn't grow unbounded on long sessions — include a quick sanity test (e.g., 100 tab switches, confirm memory doesn't grow)
Keyboard equivalents work and are documented in the Help tab and USAGE.md
Screencast or screenshots in the PR description demonstrating mouse back/forward in action
Background
Today's mouse handling in
src/main.rs(lines 695-789) only consumesMouseButton::Left,ScrollUp, andScrollDown. Crossterm already emitsMouseButton::X1andMouseButton::X2events on supported terminals — we just don't process them. A common workflow is: double-click a connection (jumps to Details), then mouse-back to return to Overview. Today that requiresEscorShift+Tab.We also have no view-history stack —
selected_tabinUIStateis a bareusizeupdated by direct assignment.Scope
Two parts:
1. History stack
tab_history: VecDeque<usize>(bounded ~16) and optionallyforward_stack: VecDeque<usize>toUIStateinsrc/ui.rs(around line 495)i/h/Esc, and any future view-switch hotkeys from ux: polish keyboard shortcuts for view switching (design discussion) #273)go_back()/go_forward()that pop/push appropriately2. Mouse plumbing
src/main.rslines 695-789, matchMouseEventKind::Down(MouseButton::X1)→go_back()andMouseButton::X2→go_forward()Alt+Left/Alt+Right(or whatever falls out of ux: polish keyboard shortcuts for view switching (design discussion) #273)Acceptance criteria
The PR must include evidence of real-world end-to-end testing — actually plug in a mouse with X1/X2 buttons (or use a tool like
xevto confirm), run rustnet, and demonstrate back/forward works. Mention the terminal and the mouse model in the PR description. A short screencast is ideal.xterm) and confirming nothing breaksReferences
MouseButtonvariants: https://docs.rs/crossterm/latest/crossterm/event/enum.MouseButton.htmlsrc/main.rslines 695-789src/ui.rsline 495