Skip to content

Conversation

tan9
Copy link
Contributor

@tan9 tan9 commented Sep 13, 2025

Summary

  • Add "Ping All" feature with shortcut key G to simultaneously check connectivity of all servers
  • Implement right-aligned ping status indicators that adapt to terminal width
  • Update single server ping (g) to display persistent status in the server list
  • Fix selection preservation when updating ping status

Changes

  • New Feature: Press G to ping all visible servers at once
  • UI Enhancement: Right-aligned status indicators showing:
    • 🟢 Green dot with latency for responsive servers (<100ms shows as "##ms", ≥100ms as "#.#s")
    • 🔴 Red dot with "DOWN" for unreachable servers
    • 🟠 Orange dot with "..." while checking
  • Responsive Design: Status indicators intelligently adapt based on terminal width:
    • Width > 80: Full status with latency
    • Width 60-80: Status dot only
    • Width < 60: Hidden to preserve content
  • Bug Fix: Preserve current server selection when ping operations update the display
  • Performance: Concurrent goroutines for simultaneous pinging without blocking UI

Testing

  • Tested G key to ping all servers - confirms all servers are pinged simultaneously
  • Tested g key for single server ping - updates status correctly
  • Verified right-alignment works across different terminal widths
  • Confirmed window resize dynamically adjusts indicator position
  • Tested with various latencies to verify formatting (<100ms, 100ms-999ms, 1s+)
  • Verified UI remains responsive during ping operations
  • Confirmed selected server stays highlighted after ping/ping all operations

Screenshots

The ping status indicators appear right-aligned at the end of each server entry, providing immediate visual feedback on server connectivity without disrupting the current selection.

Closes #30

@Adembc
Copy link
Owner

Adembc commented Sep 24, 2025

Hi @tan9. Thanks a lot for your contribution!
The base branch (main) has changed since this PR was opened, and now there’s a small conflict. Could you please rebase your branch onto the latest main.

Add comprehensive ping functionality:
- Add 'G' shortcut to ping all servers simultaneously
- Add right-aligned status indicators on server list
- Show ping latency with adaptive formatting (<100ms as "##ms", >=100ms as "#.#s")
- Responsive design adapts to window width changes
- Color-coded status: green (up), red (down), orange (checking)
- Update single server ping (g) to also show status
Maintain the current server selection when ping or ping all operations
update the server list. Previously, the selection would reset to the
first item after each update.
After ping status update, editing server form would incorrectly detect
unsaved changes. This fix excludes transient runtime fields (PingStatus,
PingLatency) and metadata fields from the comparison logic.

- Added struct tags to mark transient and metadata fields in domain.Server
- Updated serversDiffer() to skip fields based on struct tags
- Fixed goconst warnings by using existing status constants
- Added comprehensive tests for the change detection logic
@tan9
Copy link
Contributor Author

tan9 commented Sep 24, 2025

@Adembc, I’ve completed the rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Ping all with visual feedback
2 participants