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

fix: checking status is too blunt for paused status #1713

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Feb 3, 2025

We're checking if status is paused before pausing..

Makes sense, except we have multiple controls and only one status

So, it's possible to be pausable while sampling has determined you shouldn't be recording at all 🤦 . So if sampling had determined we should not record this session then we'd init a pause on every rrweb event... which probably causes rrweb events, and down the spiral to madness

Let's check a paused specific flag instead of the top level status

Copy link

vercel bot commented Feb 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Feb 3, 2025 10:38pm

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 fixes session recording pause logic by checking a specific _urlBlocked flag instead of the overall recording status, ensuring URL-based blocking works independently from other recording controls like sampling.

  • Modified /src/extensions/replay/sessionrecording.ts to use _urlBlocked flag for pause checks instead of general status
  • Prevents incorrect pause behavior when sampling has determined recording should be stopped
  • Maintains proper buffer flushing when pausing recordings
  • Improves precision by separating URL blocking from other recording control mechanisms

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

Copy link

github-actions bot commented Feb 3, 2025

Size Change: +30 B (0%)

Total Size: 3.3 MB

Filename Size Change
dist/array.full.es5.js 268 kB +3 B (0%)
dist/array.full.js 371 kB +3 B (0%)
dist/array.full.no-external.js 369 kB +3 B (0%)
dist/array.js 183 kB +3 B (0%)
dist/array.no-external.js 181 kB +3 B (0%)
dist/main.js 184 kB +3 B (0%)
dist/module.full.js 371 kB +3 B (0%)
dist/module.full.no-external.js 369 kB +3 B (0%)
dist/module.js 183 kB +3 B (0%)
dist/module.no-external.js 181 kB +3 B (0%)
ℹ️ View Unchanged
Filename Size
dist/all-external-dependencies.js 215 kB
dist/customizations.full.js 13.8 kB
dist/dead-clicks-autocapture.js 14.5 kB
dist/exception-autocapture.js 9.48 kB
dist/external-scripts-loader.js 2.64 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 69.4 kB
dist/surveys.js 72.4 kB
dist/tracing-headers.js 1.76 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

@pauldambra pauldambra added the bump patch Bump patch version when this PR gets merged label Feb 3, 2025
@pauldambra pauldambra requested a review from a team February 3, 2025 22:11
@pauldambra pauldambra merged commit 1bdfe2d into main Feb 3, 2025
28 checks passed
@pauldambra pauldambra deleted the fix/pd/paused-status-check branch February 3, 2025 22:47
@pauldambra
Copy link
Member Author

cc @veryayskiy for visibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants