Merge pull request #2468 from Hmbown/codex/esc-whale-animation-fix

Stop header whale after liveness recovery
This commit is contained in:
Hunter Bown
2026-05-31 15:52:09 -07:00
committed by GitHub
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -4093,6 +4093,7 @@ fn reconcile_turn_liveness(app: &mut App, now: Instant, has_running_agents: bool
{
app.is_loading = false;
app.dispatch_started_at = None;
app.turn_started_at = None;
app.push_status_toast(
"Turn dispatch timed out; the engine may have stopped. Please try again.",
StatusToastLevel::Error,
@@ -4112,6 +4113,7 @@ fn reconcile_turn_liveness(app: &mut App, now: Instant, has_running_agents: bool
{
app.is_loading = false;
app.dispatch_started_at = None;
app.turn_started_at = None;
app.push_status_toast(
"Recovered from an inconsistent busy state.",
StatusToastLevel::Warning,
+4
View File
@@ -2291,12 +2291,14 @@ fn turn_liveness_watchdog_clears_stale_dispatch() {
app.is_loading = true;
app.dispatch_started_at =
Some(Instant::now() - DISPATCH_WATCHDOG_TIMEOUT - Duration::from_millis(1));
app.turn_started_at = Some(Instant::now());
let recovered = reconcile_turn_liveness(&mut app, Instant::now(), false);
assert!(recovered);
assert!(!app.is_loading);
assert!(app.dispatch_started_at.is_none());
assert!(app.turn_started_at.is_none());
let toast = app.status_toasts.back().expect("watchdog toast");
assert_eq!(toast.level, StatusToastLevel::Error);
assert!(toast.text.contains("Turn dispatch timed out"));
@@ -2308,12 +2310,14 @@ fn turn_liveness_reconciles_completed_busy_state() {
app.is_loading = true;
app.runtime_turn_status = Some("completed".to_string());
app.dispatch_started_at = Some(Instant::now());
app.turn_started_at = Some(Instant::now());
let recovered = reconcile_turn_liveness(&mut app, Instant::now(), false);
assert!(recovered);
assert!(!app.is_loading);
assert!(app.dispatch_started_at.is_none());
assert!(app.turn_started_at.is_none());
let toast = app.status_toasts.back().expect("reconciliation toast");
assert_eq!(toast.level, StatusToastLevel::Warning);
assert!(