-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: make time stamp selector more discoverable #46432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: make time stamp selector more discoverable #46432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 2 comments
frontend/src/scenes/session-recordings/player/controller/PlayerControllerTime.tsx
Outdated
Show resolved
Hide resolved
frontend/src/scenes/session-recordings/player/controller/PlayerControllerTime.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the discoverability of timestamp format controls in Session Replay by adding visible clock icon buttons/dropdowns in two locations: the player controls and the inspector header. Previously, users had to click directly on timestamps to discover the format toggle, which was unintuitive during incident response scenarios.
Changes:
- Added
TimestampFormatButtoncomponent in player controls with clock icon dropdown - Added
TimestampFormatSettingsButtoncomponent in inspector header with clock icon and label - Both components integrate with existing
playerSettingsLogicstate management
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
PlayerInspectorControls.tsx |
Added TimestampFormatSettingsButton component to inspector header settings bar with clock icon, label showing current format, and dropdown menu to toggle between Relative/UTC/Device formats |
PlayerControllerTime.tsx |
Added TimestampFormatButton component with clock icon button and dropdown menu, plus local TIMESTAMP_FORMAT_LABELS constant for tooltip text |
PlayerController.tsx |
Integrated TimestampFormatButton component into player control bar next to the timestamp display |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
frontend/src/scenes/session-recordings/player/controller/PlayerControllerTime.tsx
Outdated
Show resolved
Hide resolved
frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorControls.tsx
Outdated
Show resolved
Hide resolved
Addresses PR review feedback by extracting shared utility function for timestamp format menu items to avoid code duplication. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
| [TimestampFormat.Relative]: 'Relative', | ||
| [TimestampFormat.UTC]: 'UTC', | ||
| [TimestampFormat.Device]: 'Device', | ||
| } | ||
|
|
||
| export function getTimestampFormatMenuItems( | ||
| setTimestampFormat: (format: TimestampFormat) => void, | ||
| currentFormat: TimestampFormat | ||
| ): Array<{ label: string; onClick: () => void; active: boolean }> { | ||
| return [ | ||
| { | ||
| label: 'Relative', | ||
| onClick: () => setTimestampFormat(TimestampFormat.Relative), | ||
| active: currentFormat === TimestampFormat.Relative, | ||
| }, | ||
| { | ||
| label: 'UTC', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Order changed from UTC → Device → Relative to Relative → UTC → Device. This changes existing user behavior in the playlist filters dropdown.
| [TimestampFormat.Relative]: 'Relative', | |
| [TimestampFormat.UTC]: 'UTC', | |
| [TimestampFormat.Device]: 'Device', | |
| } | |
| export function getTimestampFormatMenuItems( | |
| setTimestampFormat: (format: TimestampFormat) => void, | |
| currentFormat: TimestampFormat | |
| ): Array<{ label: string; onClick: () => void; active: boolean }> { | |
| return [ | |
| { | |
| label: 'Relative', | |
| onClick: () => setTimestampFormat(TimestampFormat.Relative), | |
| active: currentFormat === TimestampFormat.Relative, | |
| }, | |
| { | |
| label: 'UTC', | |
| export function getTimestampFormatMenuItems( | |
| setTimestampFormat: (format: TimestampFormat) => void, | |
| currentFormat: TimestampFormat | |
| ): Array<{ label: string; onClick: () => void; active: boolean }> { | |
| return [ | |
| { | |
| label: 'UTC', | |
| onClick: () => setTimestampFormat(TimestampFormat.UTC), | |
| active: currentFormat === TimestampFormat.UTC, | |
| }, | |
| { | |
| label: 'Device', | |
| onClick: () => setTimestampFormat(TimestampFormat.Device), | |
| active: currentFormat === TimestampFormat.Device, | |
| }, | |
| { | |
| label: 'Relative', | |
| onClick: () => setTimestampFormat(TimestampFormat.Relative), | |
| active: currentFormat === TimestampFormat.Relative, | |
| }, | |
| ] | |
| } |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/scenes/session-recordings/utils.ts
Line: 15:31
Comment:
Order changed from UTC → Device → Relative to Relative → UTC → Device. This changes existing user behavior in the playlist filters dropdown.
```suggestion
export function getTimestampFormatMenuItems(
setTimestampFormat: (format: TimestampFormat) => void,
currentFormat: TimestampFormat
): Array<{ label: string; onClick: () => void; active: boolean }> {
return [
{
label: 'UTC',
onClick: () => setTimestampFormat(TimestampFormat.UTC),
active: currentFormat === TimestampFormat.UTC,
},
{
label: 'Device',
onClick: () => setTimestampFormat(TimestampFormat.Device),
active: currentFormat === TimestampFormat.Device,
},
{
label: 'Relative',
onClick: () => setTimestampFormat(TimestampFormat.Relative),
active: currentFormat === TimestampFormat.Relative,
},
]
}
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.



Problem
When debugging production issues with Session Replay, users need UTC timestamps to correlate console errors and network calls with external logging tools (e.g., Grafana).
The timestamp format toggle (Relative/UTC/Device) exists but is hidden:
This is a pain in the arse when I need to quickly debug things when I'm on call.
Changes
Two additions to make timestamp format more discoverable:
Both use the existing
playerSettingsLogicstate—no new logic added.How did you test this code?
pnpm typescript:check)Publish to changelog?
Yes - "Session Replay: Timestamp format toggle now visible in player controls and inspector header"