Simplify UX: 3 sections, Space action menu, real tunnel status#9
Merged
Conversation
Bar-chart of connections per process duplicated information already visible via sort + Topology view. Removing it simplifies the view-mode enum and frees up keybinding 4. https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
Linux netns grouping was a niche feature that complicated the UI for the common case. The view, App::namespace_cache, refresh_namespace_cache, and the prt-core::core::namespace module are all removed. https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
The bottom panel showed three tabs (Tree / Network / Connection) that each rendered partial slices of the same selected entry. The new panel combines local addr + protocol + bind type + interface + remote + state + process + cmdline + multi-port summary + process tree in one scroll view, removing the need for tab switching and the 1/2/3 + ←/→ + h/l key bindings. https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
ViewMode shrinks from { Table, Topology, ProcessDetail, SshHosts, Tunnels }
to { Connections, Processes, Ssh }. Topology and ProcessDetail are now
sub-tabs of Processes; SshHosts and Tunnels are sub-tabs of Ssh.
- Tab / Shift+Tab cycles top-level sections.
- [ / ] cycle sub-tabs inside Processes and SSH.
- Sort moves from Tab/Shift+Tab to o/O so Tab is free for navigation.
- Header gains a section breadcrumb with the active section highlighted.
- Footer hints regroup per section; old hint_views/block/trace/forward/
ssh_hosts/tunnels strings drop out.
Section labels added to i18n: section_connections, section_processes,
section_ssh, hint_section_next, hint_subtab, hint_action_menu, hint_edit_tunnel.
https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
Replaces the scattered top-level shortcuts (b=block, t=trace, F=forward, p=copy-pid) with a single contextual popup. Direct shortcuts remain only for Kill (K) and Copy (c). The menu is built from the current section + entry capabilities: - Connections: Kill, Copy, Copy PID, Block IP, Forward, Trace (Block/Forward only when remote_addr is present) - Processes: Kill, Copy, Copy PID, Trace - SSH: not opened — that section uses its own action keys Navigation: j/k or arrows, Enter to execute, Esc to close, 1..9 jumps. i18n adds action_menu_title + action_kill/copy/copy_pid/block/trace/forward across en/ru/zh. https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
Single-press Esc no longer wipes a non-empty filter. The first press shows 'Esc again to clear filter' in the status bar and arms a 1.5s window. A second press inside the window clears the filter; any other key disarms. This stops accidental filter loss when chaining Esc to close modals. i18n adds esc_again_to_clear_filter and esc_again_to_discard_form (latter wired in commit 7 for the tunnel form). https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
- TunnelStatus { Starting, Alive, Failed } replaces hard-coded "alive".
ForwardManager::cleanup() now refreshes each tunnel's last_status
instead of dropping dead ones, so failures stay visible until the user
acts. Status renders in green/yellow/red.
- Tunnel form gains edit-mode (TunnelFormState::edit) wired to the new
'e' shortcut in the tunnels view; Enter then replaces the tunnel
in-place via ForwardManager::replace_at.
- Real-time per-field validation (validate_field) highlights bad fields
in red as the user types, instead of only on Enter.
- Esc on a non-empty form now requires a second press within 1.5s
("Esc again to discard changes"), preventing accidental data loss.
- save_tunnels prunes failed tunnels before writing config.
i18n adds tunnel_status_starting/failed, tunnel_form_edit_title,
tunnel_form_field_required across en/ru/zh.
https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
The ? overlay is now organised into Global / Connections / Processes / SSH blocks reflecting the new Tab-driven navigation. Drops obsolete mentions of bottom-panel tab keys (1/2/3, ←→), fullscreen toggles (4/5/6/7/8/9), and the per-action top-level shortcuts (b, t, F, p), all of which moved into the Space action menu. https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
Rewrites the Hotkeys, Detail Panel / Sections, and SSH-related sections across README.md / README.ru.md / README.zh.md and crates/prt/README.md to match the new model: Tab/Shift+Tab between Connections/Processes/SSH, [/] for sub-tabs, Space for the action menu, two-press Esc to clear filter, edit-mode + inline validation for tunnels. CHANGELOG gains an [Unreleased] block summarising the breaking changes and new features. CLAUDE.md drops mentions of namespaces and DetailTab and points at the new ViewMode + ProcessesTab/SshTab/ActionItem types. https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
CI was failing on `-D warnings` because two newer lints fire on Rust 1.95 but not 1.94 (the local toolchain): - `clippy::collapsible_match`: the Esc cascade was an inner `if` inside a match arm; collapse it into a guard on the arm itself. - `clippy::unnecessary_map_or`: `opt.map(...).unwrap_or(false)` is now flagged in favour of `opt.is_some_and(...)`. https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
The new command palette had the same nested-if-in-match pattern that already failed CI in input.rs. Collapse it into a guarded match arm so clippy stops complaining on Rust 1.95. https://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reshapes the TUI from 7 fullscreen modes + 3 detail tabs + 6 scattered
action keys into 3 top-level sections with
Tabnavigation and asingle
Space-key action menu. Removes Chart and Namespaces, fixes thehardcoded "alive" tunnel status, and adds tunnel edit-mode + inline
form validation.
Section model
Tab/Shift+Tabcycles between three sections. Sub-tabs use[/].Action menu (
Space)Single contextual popup replaces six scattered shortcuts (
b,t,F,p, plus the previous fullscreen toggles4–9):K(Kill) andc(Copy)SSH improvements
TunnelStatus { Starting, Alive, Failed }— failed tunnels stay in thelist (red) until you act, instead of silently disappearing
e) re-opens the form with all fields pre-filled andreplaces the tunnel in place on submit
(mirrors the new filter-clear cascade)
saveprunes failed tunnels before writing configOther changes
Esccascade: closes the topmost modal/overlay; clearing a non-emptyfilter now requires a second press inside 1.5s
Tabontoo(next column) /O(reverse direction)Processes / SSH)
into one unified scrollable view
Removed
4)7) and theprt_core::core::namespacemoduleTest plan
cargo build --workspace— cleancargo test --workspace— 220 tests pass (was 188, +28 new forViewMode/sub-tabs/ActionMenu/tunnel-form/edit-mode; –7 from the
removed namespace module and DetailTab cycling tests)
cargo clippy --workspace --all-targets— cleancargo fmt --all -- --check— clean[/]toggles Detail/Topology and Hosts/TunnelsSpaceopens the action menu, items match the section, Enter executesK/cstill work as direct shortcuts;b/t/F/pno longer top-levelo/Osort the table;Tabno longer touches sort/foothen Esc → "Esc again to clear filter"; second Esc clearseon a tunnel re-opens form with values; Enter respawns?shows the new grouped cheat-sheethttps://claude.ai/code/session_01EG1UvuuvbDQQsqXnhrjpvL
Generated by Claude Code