Skip to content
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

feat: add oldest sort option to session replays #30848

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

0xHericles
Copy link

Problem

As described in #30824, there's currently no way to sort session recordings from oldest to newest. This makes it harder to watch sessions in the order they happened. This PR adds an "Oldest" sorting option to make that easier.

Changes

  • Added an "Oldest" sorting option under the existing "Latest" option in session recordings.

Screenshots

CleanShot 2025-04-05 at 01 49 47@2x

CleanShot 2025-04-05 at 01 50 03@2x

Does this work well for both Cloud and self-hosted?

Yes, it works well for both Cloud and self-hosted deployments.

How did you test this code?

  • Manually verified sorting behavior locally by navigating session recordings and ensuring the order was correct for both "Latest" and "Oldest".
  • Confirmed no regressions on other sorting options.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR introduces an "Oldest" sorting option for session recordings, allowing users to view sessions from the beginning of a journey.

  • /frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistSettings.tsx: Added new "Oldest" entry and updated label logic via the getLabel helper to handle the 'older' direction.
  • /frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.ts: Enhanced sorting logic by propagating a new 'direction' parameter for proper ordering and pagination.
  • /frontend/src/types.ts: Updated type definitions with a new RecordingDirection union to support sorting by 'newer' or 'older'.

💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

couple of naming comments but otherwise this is great 🚀

@0xHericles
Copy link
Author

@pauldambra nice. Done! ;D

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.

2 participants