Skip to content

feat: add enhanced UI with color display, progress tracking, and scan stats#45

Open
fadhilyori wants to merge 7 commits intomainfrom
feat/ui-enhancement
Open

feat: add enhanced UI with color display, progress tracking, and scan stats#45
fadhilyori wants to merge 7 commits intomainfrom
feat/ui-enhancement

Conversation

@fadhilyori
Copy link
Owner

Adds a comprehensive UI refresh to improve the scanning experience. This introduces color-coded output, progress bars, tabular results, health scores, and various sorting options.

What's new

📊 Improved results display

  • Results now shown in a clean table with columns for IP, status, latency (min/avg/max), packet loss, and jitter
  • Status icons (●/○) for quick visual identification
  • Color-coded rows based on latency performance
  • Sortable by IP, latency, packet loss, or jitter (use --sort flag)

📈 Network health scoring

  • Automatic health score calculation (0-100) based on online/offline ratio
  • Descriptive labels (Excellent/Good/Fair/Poor/Critical)
  • Enhanced scoring available with detailed metrics consideration

⏱️ Progress tracking

  • Real-time progress bar showing current scan progress
  • Displays current IP and online count
  • Progress callback support for custom integrations

📝 Summary improvements

  • Scan rate display (hosts/sec or hosts/min) alongside execution time
  • Color-coded summary based on network health percentage

🎨 Visual enhancements

  • Color support for terminal output
  • Automatic color detection (respects NO_COLOR env var)
  • Consistent color scheme for better readability

New dependencies

  • fatih/color - Colored terminal output
  • olekukonko/tablewriter - Table formatting
  • schollz/progressbar/v3 - Progress bar display

Usage examples

# Default display
subping 192.168.1.0/24
# Sort by latency
subping 192.168.1.0/24 --sort latency
# Sort by packet loss
subping 192.168.1.0/24 --sort loss

Breaking changes

  • ResultDisplayer.ShowSummary signature changed - now includes rate parameter
  • Custom implementations of display interfaces may need updates

- Add fatih/color for colored terminal output
- Add olekukonko/tablewriter for table formatting
- Add schollz/progressbar/v3 for progress bar display
Calculate and display scan rate in final summary, showing hosts/sec
or hosts/min depending on speed. Moves rate information from temporary
progress stats to permanent scan results summary.
@fadhilyori fadhilyori self-assigned this Dec 29, 2025
@fadhilyori fadhilyori added the enhancement New feature or request label Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant