Commit 3452a6a
committed
feat(tui): refactor into modular architecture with async ping support
Split monolithic tui/app.rs (721 lines) and tui/ui.rs (572 lines) into
a well-organized module structure:
- models.rs: enums, small types (Tab, AppMode, EditState, PingStatus, ...)
- state.rs: App struct and state management with mpsc ping channel
- input.rs: keyboard handlers dispatched per tab/mode
- event_loop.rs: terminal setup/teardown and main loop
- ui/mod.rs: draw dispatcher routing to tab views and overlays
- ui/header.rs, list.rs, detail.rs, status.rs, overlays.rs, history.rs, config.rs, helpers.rs
New features:
- Tab-based navigation (Connections, History, Config)
- Add new connection form (a key)
- Session history view with filters
- Environment management in Config tab
- Connection grouping by tag (f key)
- Quick-connect bar (: key)
- Multi-select and batch delete (Space, Ctrl+A, x)
- SSH command preview (p key)
- Async TCP ping with colored indicators (P key)
- Green dot for reachable (with round-trip time)
- Red dot for unreachable
- Yellow circle for in-progress
- Shared ping service (services/ping.rs) using tokio TcpStream
Bump version to 1.4.1.1 parent 261e95c commit 3452a6a
20 files changed
Lines changed: 3104 additions & 1296 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments