Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

The test timeout was hardcoded to 2 minutes regardless of event duration or playback speed, causing failures for longer recordings or slower playback.

Changes:

  • Calculate timeout dynamically: (max_timestamp - min_timestamp) / playback_speed + 120000ms
  • Extract min/max timestamps from events array
  • Read playback speed from config.rrwebPlayer.speed (defaults to 1x)
  • Add debug logging for timeout calculation

Example:

// Before: Fixed 2 minute timeout
const timeout = setTimeout(() => reject(new Error('Replay timeout')), 120000);

// After: Dynamic timeout based on actual event duration
const eventDuration = maxTimestamp - minTimestamp;
const playbackSpeed = config.rrwebPlayer.speed ?? 1;
const timeoutDuration = Math.ceil(eventDuration / playbackSpeed) + 120000;
const timeout = setTimeout(() => reject(new Error('Replay timeout')), timeoutDuration);

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Jan 2, 2026

⚠️ No Changeset found

Latest commit: b494d77

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

- Extract min/max timestamps from events
- Use playback speed from config (default to 1)
- Calculate timeout: (max - min) / speed + 2 minute buffer
- Add debug logging for timeout calculation

Co-authored-by: Juice10 <4106+Juice10@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 2, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • edgedl.me.gvt1.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node install.js (dns block)
  • https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1036745/chrome-linux.zip
    • Triggering command: /usr/local/bin/node node install.js (http block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node install.js (http block)
  • https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/869685/chrome-linux.zip
    • Triggering command: /usr/local/bin/node /usr/local/bin/node install.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update timeout calculation based on review comments Fix timeout calculation to account for event duration and playback speed Jan 2, 2026
Copilot AI requested a review from Juice10 January 2, 2026 10:36
@Juice10 Juice10 marked this pull request as ready for review January 2, 2026 20:15
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