Skip to content

Conversation

srest2021
Copy link
Member

@srest2021 srest2021 commented Sep 18, 2025

fixes REPLAY-667
fixes REPLAY-558

Previously, fast forwarding through a replay was buggy and inconsistent if you scrub or jump positions. This is because when users scrub or jump to arbitrary timestamps, the cached nextUserInteractionEvent and state become stale and prevent proper re-evaluation of fast forwarding.

We now extend the Replayer class by adding a private function reevaluateFastForward that will handle arbitrary position jumps. reevaluateFastForward finds the current event index using binary search, scans forward to find the next user interaction position, and calculates the gap of inactivity between them. If the gap is large enough, fast forwarding is triggered. We call this function if we jump/scrub to a new position, if the skipInactive config changes, and on starting playback.

Before:

  • Large period of inactivity at start never fast fowards
  • Clicking to a breadcrumb triggers fastforwarding, but scrubbing or jumping to that same area doesn't
  • Scrubbing back while fastforwarding within the same period of inactivity loses the fastforwarding but the badge stays up
Screen.Recording.2025-09-23.at.9.20.44.AM.mov

After:

  • Correctly fast forward at the start
  • Scrubbing or jumping to any position triggers the correct fastforwarding behavior, and the badge is consistent
Screen.Recording.2025-09-23.at.9.27.18.AM.mov

Copy link

linear bot commented Sep 18, 2025

@srest2021 srest2021 changed the title add refreshSkipState fix(replay): handle fast forwarding for arbitrary position jumps in replayer Sep 18, 2025
Copy link

linear bot commented Sep 18, 2025

@srest2021 srest2021 requested a review from chargome September 19, 2025 20:06
@srest2021 srest2021 requested a review from mydea September 19, 2025 20:21
@srest2021 srest2021 requested a review from billyvg September 23, 2025 16:33
@billyvg
Copy link
Member

billyvg commented Sep 23, 2025

@srest2021 Is it possible to handle this all inside of rrweb rather than requiring changes in sentry ui? The reason I ask is that if this is a bug within rrweb, it'd be nice to upstream a fix.

@srest2021
Copy link
Member Author

@billyvg Ok should be all integrated now! There was also one small bug in the frontend fixed here, I'll request you there as well. I'm thinking merge the frontend PR first then this one? Let me know what you think 🙏

Copy link
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

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

I'm going to take a closer look tomorrow, but here are a few nits for now

@srest2021 srest2021 merged commit 6d3cb32 into sentry-v2 Sep 25, 2025
17 checks passed
@srest2021 srest2021 deleted the srest2021/REPLAY-667 branch September 25, 2025 16:32
srest2021 added a commit that referenced this pull request Sep 25, 2025
Update changelog for commit:

fix(replay): handle fast forwarding for arbitrary position jumps in
replayer (#248)
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