Fix console turn finish timestamps

Merged
GJ
3d ago
+270-21

What type of PR is this?

/kind bug

What this PR does / why we need it:

Console conversations only show how long a turn worked, leaving its finish time unavailable. The runtime also strips completion timestamps when preparing history for replay.

Show a readable separator such as Finished at 12:05 PM · Worked for 5m 19s. Today's turns show a short local time; earlier days include the date, with the year when it differs from the current year. The full date, seconds, and time zone are available on hover, keyboard focus, or tap. Enter toggles the details and Escape dismisses them. Failed and interrupted turns have explicit labels.

Preserve completion timestamps through recent and paginated history so finish times remain available after reconnecting. Retained history shows finish times without durations. Keep older-page replay separate from live-turn timing in the console and plain terminal, so loading earlier messages neither invents a duration for an older turn nor loses the active turn's duration. Omit unknown timestamps and recovery-generated interruption times. Update the console documentation and tests for formatting, rendering, dismissal, replay isolation, and history delivery.

Which issue(s) this PR is related to:

N/A

Special notes for your reviewer:

Validation:

  • make update and make verify passed.
  • make test TEST_FLAGS="-run 'TestApplication|TestSessionPlainTerminal|TestProjectHistory|TestServerPagesProjectedHistoryItems'" passed.
  • Replay-isolation tests verify that timestamped older completions have no duration and the active turn retains its correct duration.
  • Chromium checks on a conversation fixture passed for hover, keyboard focus, Enter/Escape, touch disclosure and dismissal, and a 390px mobile layout without horizontal overflow.
  • The earlier full make test run failed on TestCodexEntrypointUsesPersistentSessionHome and the Codex case of TestAgentEntrypointsPreserveSkillReferenceFiles. Both failures reproduce on the unchanged base commit 15eb48e in this environment.

Screenshots use the same completed-turn fixture, locale (en-US), time zone (UTC), clock (August 8, 2026), and desktop viewport, rendered with the base and PR versions of the console code and styles.

Before

Before: the completed turn shows only its duration

After

After: a readable finish time comes before the duration

Full timestamp and mobile views

Full timestamp with keyboard focus

Full date, seconds, and time zone exposed by the timestamp disclosure

Mobile (390px)

Compact timestamp and duration on mobile

Does this PR introduce a user-facing change?

The console displays readable turn finish times, including in retained history. Live turn separators show finish times before their durations. Full timestamps are accessible on hover, keyboard focus, or tap, and failed and interrupted turns are labeled explicitly.

Summary by cubic

Shows each console turn's finish time before its duration, with distinct labels for completed, failed, and interrupted turns, and preserves completion timestamps in history so the finish time stays visible after reconnecting.

  • Same-day turns show the time; older turns add the date, and the year when it differs from the current year.
  • Hover, focus, or tap the finish time for the full date, seconds, and time zone; press Escape to dismiss.
  • Finish times are omitted for unknown timestamps and for turns interrupted by runtime recovery.
  • Adds coverage for live rendering, replay, missing timestamps, and paginated history, and updates the console docs.