Cap retry countdown display at 10 seconds (#4740)

The actual retry timeout remains 60 seconds, but the UI now shows
a maximum of "10s" to avoid overwhelming users with long countdowns.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-20 20:10:01 -08:00
committed by GitHub
co-authored by Claude Opus 4.5
parent 6edb4de0dc
commit 4d3b2ddb36
2 changed files with 3 additions and 3 deletions
@@ -138,7 +138,7 @@ namespace eagle {
var timeUntilTest = OpenTimeoutSeconds -
(DateTime.UtcNow - _openedAt.Value).TotalSeconds;
if (timeUntilTest > 0) {
return $"Server unavailable. Retrying in {(int)timeUntilTest}s";
return $"Server unavailable. Retrying in {Math.Min(10, (int)timeUntilTest)}s";
}
}
return "Server unavailable. Testing...";
@@ -77,7 +77,7 @@ namespace eagle {
if (nextTest.HasValue) {
var timeUntilTest = nextTest.Value - DateTime.UtcNow;
if (timeUntilTest.TotalSeconds > 0) {
int seconds = (int)Math.Ceiling(timeUntilTest.TotalSeconds);
int seconds = Math.Min(10, (int)Math.Ceiling(timeUntilTest.TotalSeconds));
_textComponent.text =
$"<color=red>●</color> Server down. Retry in {seconds}s";
return;
@@ -142,7 +142,7 @@ namespace eagle {
return "<color=yellow>●</color> Reconnecting...";
}
int secondsRemaining = (int)Math.Ceiling(timeUntilRetry.TotalSeconds);
int secondsRemaining = Math.Min(10, (int)Math.Ceiling(timeUntilRetry.TotalSeconds));
return $"<color=orange>●</color> Retry in {secondsRemaining}s";
}
}