Skip to content

Conversation

@ThomasK33
Copy link
Member

@ThomasK33 ThomasK33 commented Dec 15, 2025

Add a new Stats tab in the right sidebar that displays timing statistics for streaming sessions. The tab shows elapsed time, time to first token (TTFT), model inference time, and tool execution duration.

Features

  • Stats tab in right sidebar - New tab after Review with keyboard shortcut Cmd/Ctrl+3
  • Session/Last Request toggle - Switch between aggregate session stats and last request details
  • Tab title shows duration - Like Costs shows "$2.71", Stats shows total session time (e.g., "Stats 12s")
  • Aggregated timing stats - Progress bar + component breakdown table
  • Per-model breakdown - Each model gets its own timing section with mini progress bar
  • Live updates - Timer updates every second during active streams
  • Persistent across restarts - Session timing stats saved to localStorage

Screenshot

The Stats tab displays timing information in a format consistent with the Costs tab:

┌─────────────────────────────────────────┐
│ Costs $2.71    Review    Stats 12s      │
├─────────────────────────────────────────┤
│ Timing ●  [Session] [Last Request]  12s │
│ 1 response                              │
│ ████████████████████░░░░░              │
│                                         │
│ Component              Duration    %    │
│ ● Avg. Time to First Token  3.1s   —   │
│ ● Model Time               9.5s   79%  │
│ ● Tool Execution           2.5s   21%  │
│                                         │
│ By Model                                │
│ Sonnet 4                   12s (1 req)  │
│ ████████████████████░░░░░              │
│ TTFT: 3.1s  Model: 9.5s  Tools: 2.5s   │
└─────────────────────────────────────────┘

Implementation

  • StatsTab component - Displays timing stats with toggle and per-model breakdown
  • StreamingMessageAggregator - Tracks timing data (startTime, firstTokenTime, toolExecutionMs)
  • WorkspaceStore - Exposes StreamTimingStats and SessionTimingStats via sidebar state
  • localStorage persistence - Session stats persist across app restarts

Generated with mux

@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33 ThomasK33 force-pushed the stats-display-m8k9 branch 10 times, most recently from a646b0c to 5a16e50 Compare December 18, 2025 13:13
@ThomasK33
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ThomasK33
Copy link
Member Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Change-Id: I7d3f690636877046c1096c6003b9f2e58d2a9877
Signed-off-by: Thomas Kosiewski <[email protected]>
@ThomasK33
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ThomasK33 ThomasK33 added this pull request to the merge queue Dec 18, 2025
Merged via the queue into main with commit 695cd42 Dec 18, 2025
20 checks passed
@ThomasK33 ThomasK33 deleted the stats-display-m8k9 branch December 18, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant