- Add 'gpu' feature flag (enabled by default)
- Make gfxinfo dependency optional
- Provide no-op GPU metrics when gpu feature disabled
- Disable GPU support for RISC-V builds in CI (libdrm unavailable)
- All other architectures (amd64, arm64, armhf) still get GPU support
- Add cargo-deb metadata to socktop and socktop_agent Cargo.toml
- Create systemd service file for socktop_agent
- Add postinst/postrm maintainer scripts for user/group management
- Create GitHub Actions workflow to build .deb packages for AMD64 and ARM64
- Add comprehensive documentation in docs/DEBIAN_PACKAGING.md
- Packages will be available as artifacts on every push
- Automatic GitHub releases for version tags
- Add Up/Down arrow key handling in help modal
- Display scrollbar when content exceeds viewport
- Update title to indicate scrollability
- Fixes content cutoff on small terminal windows
This commit implements several major improvements to the TUI experience:
1. CPU Average Display in Main Window
- Show average CPU usage over monitoring period alongside current value
- Format: "CPU avg (now: 45.2% | avg: 52.3%)"
- Helps identify sustained vs momentary CPU spikes
2. Max Memory Tracking in Process Details Modal
- Track and display peak memory usage since monitoring started
- Shown as "Max Memory: 67.8 MB" in yellow for emphasis
- Helps identify memory leaks and usage patterns
- Resets when switching to different process
3. Fuzzy Process Search
- Press / to activate search mode with bordered search box
- Type to fuzzy-match process names (case-insensitive)
- Press Enter to auto-select first result
- Navigate results with arrow keys while typing
- Press c to clear filter
- Press / again to edit existing search
Search box features:
- Yellow bordered box for high visibility
- Active mode: "Search: query_"
- Filter mode: "Filter: query (press / to edit, c to clear)"
Technical implementation:
- Centralized filtering with get_filtered_sorted_indices()
- Consistent filtering across display, navigation, mouse, and auto-scroll
- Proper content area offset calculation for search box
- Real-time filtering as user types
4. Code Quality Improvements
- Created ProcessDisplayParams and ProcessKeyParams structs
- Created MemoryIoParams struct for process modal rendering
- Reduced function arguments to stay under clippy limits
- Exported get_filtered_sorted_indices for reuse
Files Modified:
- socktop/src/app.rs: Search state, auto-scroll with filtering, max memory tracking
- socktop/src/ui/cpu.rs: CPU average calculation and display
- socktop/src/ui/processes.rs: Fuzzy search, filtering, parameter structs
- socktop/src/ui/modal.rs: Updated help modal with new shortcuts
- socktop/src/ui/modal_process.rs: Max memory display, MemoryIoParams struct
- socktop/src/ui/modal_types.rs: Added max_mem_bytes field
Testing:
- All tests pass
- No clippy warnings
- Cargo fmt applied
- Tested search, navigation, mouse clicks, and auto-scroll
- Verified on both filtered and unfiltered process lists
Breaking Changes:
- None (all changes are additive features)
Closes: (performance monitoring improvements)