Repository navigation
Studio: optional reply times in Settings > Chat - #14500
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47af19d0e8
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const date = new Date(finishedAt); | ||
| return ( | ||
| <time | ||
| dateTime={date.toISOString()} |
There was a problem hiding this comment.
Reject timestamps outside the valid Date range
When a restored Studio backup contains a finite but out-of-range responseDetails.finishedAt value such as 1e20, replyFinishedTimestamp accepts it because Number.isFinite succeeds, but new Date(finishedAt) is invalid and this toISOString() call throws a RangeError. Backup import preserves arbitrary message metadata, so enabling Reply times can make the affected thread fail to render; validate that the resulting Date has a finite getTime() before returning or rendering the timestamp.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Studio never writes a finishedAt outside the Date range; this needs a hand-edited or corrupted backup, so leaving it.
…ply times [skip ci]
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f4f8d2ab4
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const end = timing.streamStartTime + timing.totalStreamTime; | ||
| if (Number.isFinite(end)) return end; | ||
| } | ||
| return messageTimestamp(message); |
There was a problem hiding this comment.
Persist timing for tab-close interruptions
Fresh evidence beyond the earlier Stop/failure case is the legacy tab-close path: for browser-tool, attachment, and other nondurable runs, chat-adapter.ts deliberately retains the last streamed yield and skips the terminal yield when the tab closes. That streamed yield puts timing in top-level metadata.timing, while the history adapter persists only metadata.custom, so after reopening there is no responseDetails or custom timing and this fallback stamps a long partial reply with its creation time rather than when it was interrupted. Persist the live timing in custom metadata or otherwise record the interruption time before relying on this fallback.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Out of scope here: this is the legacy non-durable tab-close path, and fixing it means changing what the history adapter persists. The time falls back to creation for those few replies.
| const end = timing.streamStartTime + timing.totalStreamTime; | ||
| if (Number.isFinite(end)) return end; | ||
| } | ||
| return messageTimestamp(message); |
There was a problem hiding this comment.
Record completion metadata for audio replies
For output-only audio models, the special branch in chat-adapter.ts yields a “Generating audio...” placeholder, awaits generateAudio, then yields the final audio player and returns without adding either responseDetails or timing metadata. Once that message becomes complete, this fallback therefore displays the assistant message's creation time—the start of audio generation—as its finish time, which can be minutes early. Attach a finish timestamp or stream timing to the final audio yield rather than falling back to creation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Output-only audio replies are a small set and the difference is the audio generation time; not worth new adapter metadata for this opt-in display.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72ad368a33
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const locale = useLocale(); | ||
| const showReplyTimes = useChatPreferencesStore((state) => state.showReplyTimes); | ||
| const finishedAt = useAuiState(({ message }) => replyFinishedTimestamp(message)); | ||
| const [currentYear] = useState(() => new Date().getFullYear()); |
There was a problem hiding this comment.
Refresh the year used to shorten timestamps
When a thread remains mounted across New Year's Day, this state retains the previous year indefinitely, so existing replies from that year continue to render without a year even after they are no longer from the current year (for example, Dec 31, 11:55 PM after January 1). Because ordinary rerenders reuse the captured value, either include the year unconditionally or update the comparison year at the calendar boundary.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Only a thread left open across New Year is affected, and the hover title still carries the full date with the year; leaving it.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72ad368a33
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export const AssistantMessageTime: FC = () => { | ||
| const locale = useLocale(); | ||
| const showReplyTimes = useChatPreferencesStore((state) => state.showReplyTimes); | ||
| const finishedAt = useAuiState(({ message }) => replyFinishedTimestamp(message)); |
There was a problem hiding this comment.
Track live research runs when showing reply times
When a failed or cancelled Deep Research run is retried, ResearchActions writes the retried snapshot only to useResearchRunStore and follows it there, while the assistant message metadata still holds the terminal snapshot from the preceding attempt. This selector reads only that stale message metadata, so the old completedAt remains visible throughout the retry and never advances when the new attempt finishes, even though ResearchMessage renders the store's live run. Subscribe the timestamp to the live run by researchRunId, hiding it for nonterminal statuses.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Only a retried failed or cancelled research run is affected, which is rare; leaving it for this opt-in display.
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # studio/frontend/scripts/check-bundle-budget.ts
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # studio/frontend/scripts/check-bundle-budget.ts
# Conflicts: # studio/frontend/scripts/check-bundle-budget.ts
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # studio/frontend/scripts/check-bundle-budget.ts
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # studio/frontend/scripts/check-bundle-budget.ts
…rounds use their own timing
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #13673
Summary
Adds an opt-in Reply times switch to Settings > Chat > Display. When it is on, every reply shows when it finished, at the start of the row under it, so you can tell at a glance whether a long agent or tool run ended an hour ago or eight hours ago.
Oct 13, 11:55 PM, with the year only when it is not the current one, in the UI language's format. It is deliberately not "Today" / "Yesterday": nothing re-renders an old reply, so a thread left open past midnight would keep calling yesterday's replies today.Monday, October 13, 2026 at 11:55:01 PM.responseDetails.finishedAt). A reply that was stopped or failed records noresponseDetails, so its finish is its persisted stream start plus stream duration, i.e. when it stopped. A Deep Research reply uses its run'scompletedAt, and shows nothing while the run has not finished. Replies with none of these fall back to their creation time. Imported messages whose time is only an ordering estimate still show nothing, as in Studio: fix prompt timestamp layout, accessibility, and imported times #12173.Layout and performance
composer-keystroke-subscription-budget.test.ts).<time>with a nativetitle, not a Tooltip. One Tooltip per reply would subscribe to the modal layer store on every message of a long thread, which is the cost the action bar'sautohidecomment describes.Changes
chat-preferences-store.ts:showReplyTimes(defaultfalse; a saved payload without the key rehydrates as off).assistant-message-time.tsx: the new component;message-timestamp.ts:replyFinishedTimestamp.thread.tsx: renders it first in the reply footer.chat-tab.tsx,settings-search.ts: the switch, searchable by "timestamp", "time", "clock" and so on.check-bundle-budget.ts: the startup budget raised for this PR, about +1.5 KB raw / +0.4 KB transfer; merged with main at c2f75c4 the build measures 6,892,776 B raw / 2,076,549 B transfer (Node 24, 98 chunks), and the limits are that plus about 200 B, as main does.Validation
npm testinstudio/frontend: 13,234 passed, 0 failed, 1 skipped.npm run typecheck: clean.eslinton the new and changed files: clean except two errors inchat-tab.tsxon import lines this PR does not touch, which also fail onmain.tests/studio/test_chat_response_details_ui_contract.py,tests/studio/test_en_catalog.py: 51 passed.tests/reply-times-preference.test.tscovers the off default (fresh and older saved preferences), the Settings wiring, the footer position outside the autohiding bar, no assistant-ui selector while off, and the finish time, stopped reply, fallback, running and estimated cases.Screenshots
Two Studios built from main at 6bbe268 (BEFORE) and this branch at 980e663 (AFTER), with the same seeded thread and Reply times turned on. The reply finished at 23:55:01 UTC; the browser shows it in its own time zone (US Pacific here). With the switch off, both builds render the thread identically.
Reply footer: AFTER shows when the reply finished, before the existing actions.
Settings > Chat > Display: AFTER adds the Reply times switch below Response model.