@@ -622,6 +622,32 @@ def test_dump_single_round_no_separator(self):
622622 self .assertIn ("only round" , out )
623623 self .assertNotIn ("round 2" , out )
624624
625+ def test_dump_reports_time_spent (self ):
626+ """After the last response, the total time spent on the run is
627+ reported, mirroring the per-tool elapsed on tool results."""
628+ import time as _time
629+
630+ tui , buf = make_tui ()
631+ tui .session .last_messages = [
632+ Message (role = "user" , content = "question" ),
633+ Message (role = "assistant" , content = "answer" ),
634+ ]
635+ tui ._run_start = _time .time () - 6.8
636+ tui ._dump_conversation ()
637+ out = buf .getvalue ()
638+ self .assertIn ("✓ time spent (6.8s):" , out )
639+
640+ def test_dump_no_time_spent_when_unrecorded (self ):
641+ """No run start recorded (e.g. restored session) → no indicator."""
642+ tui , buf = make_tui ()
643+ tui .session .last_messages = [
644+ Message (role = "user" , content = "question" ),
645+ Message (role = "assistant" , content = "answer" ),
646+ ]
647+ tui ._dump_conversation ()
648+ out = buf .getvalue ()
649+ self .assertNotIn ("time spent" , out )
650+
625651 def test_live_panel_shows_only_current_round (self ):
626652 """The live panel renders only the LATEST round (messages from
627653 round_start on), so a second request does not replay the first
0 commit comments