mirror of
https://github.com/openai/codex.git
synced 2026-05-01 09:56:37 +00:00
What - Show compact elapsed time in the TUI status indicator: Xs, MmSSs, HhMMmSSs. - Add private helper fmt_elapsed_compact with a unit test. Why - Seconds‑only becomes hard to read during longer runs; minutes/hours improve clarity without extra noise. How - Implemented in codex-rs/tui/src/status_indicator_widget.rs only. - The helper is used when rendering the existing “Working/Thinking” timer. - No changes to codex-common::elapsed::format_duration or other crates. Scope/Impact - TUI‑only; no public API changes; minimal risk. - Snapshot tests should remain unchanged (most show “0s”). Before/After - Working (65s • Esc to interrupt) → Working (1m05s • Esc to interrupt) - Working (3723s • …) → Working (1h02m03s • …) Tests - Unit: fmt_elapsed_compact_formats_seconds_minutes_hours. - Local checks: cargo fmt --all, cargo clippy -p codex-tui -- -D warnings, cargo test -p codex-tui. Notes - Open to adjusting the exact format or moving the helper if maintainers prefer a shared location. Signed-off-by: Enrique Moreno Tent <enriquemorenotent@gmail.com>