Preserve TUI status timing when the status row is hidden (#41913)

## Why

Streaming can temporarily hide the status row, but its elapsed time is still
needed when the row returns and when the final `Worked for` duration falls back
to the local clock. Approval prompts must also keep that clock paused.

## What changed

- Own the pause-aware status timer in the bottom pane independently of the
  optional status row.
- Preserve elapsed time and modal pause state while hiding or restoring the row,
  and reset the clock for new turns and Windows sandbox setup.
- Use the independent timer as the fallback for the final turn duration.

## Testing

Add timer unit coverage and TUI tests for hidden rows, outstanding approvals,
fallback turn durations, and fresh Windows sandbox setup clocks.

GitOrigin-RevId: a77931e465d5aedd4a8cd606a3a3117d1bb37ce7
This commit is contained in:
Ian MacLeod authored and copyberry committed 2026-08-31 21:19:22 +00:00
1 parent 5f79a92e39
commit 17e8101699
10 files changed
+295 -147

No files matched your search

+3 -2
View File
@@ -82,6 +82,7 @@ impl ChatWidget {
self.quit_shortcut_expires_at = None;
self.quit_shortcut_key = None;
self.update_task_running_state();
self.bottom_pane.reset_status_timer(Duration::ZERO);
self.status_state.retry_status_header = None;
self.clear_active_hook_cell();
self.status_state.pending_status_indicator_restore = false;
@@ -156,8 +157,8 @@ impl ChatWidget {
.map(|duration_ms| duration_ms / 1_000)
.or_else(|| {
self.bottom_pane
.status_widget()
.map(crate::status_indicator_widget::StatusIndicatorWidget::elapsed_seconds)
.status_elapsed()
.map(|elapsed| elapsed.as_secs())
})
} else {
None