Skip to content

Conversation

@pauldambra
Copy link
Member

@pauldambra pauldambra commented Nov 1, 2025

had to get this out of my head while #4 is watching TV

  • the timestamp range of rrweb data in blob data returned from the API
  • does not match the playable time range in the data returned from the API
  • which means a blob can advertise it covers up to time X
  • but actually it falls short
  • so, we can't let the snapshotDataLogic manage progressive loading based on desired timestamp
  • this is why as we fixed bugs in progressive loading we got more and more reports of endless buffering because we increased the likelihood we'd be endlessly waiting on data because of the timestamp mismatch
  • instead the player already knows how much data is playably loaded and where it is up to
  • so it can just ping for the next snapshot source

there are problems with this

  • current player timestamp does not monotonically increase
  • in fact it pretty often jumps towards the end of the recording for a tick or two and then back
  • this means we load more data than we need to - not necessarily a bad thing since we'd rather load more than not at all 🙈

i've wrapped this in a flag so we can turn it off easily!

Copy link
Member Author

pauldambra commented Nov 1, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

Size Change: +56 B (0%)

Total Size: 3.34 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 3.34 MB +56 B (0%)

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

⚠️ Flapping Screenshots Detected

The following screenshots have been updated multiple times by the bot, indicating test instability:

  • playwright/__snapshots__/pageview-trends-insight.png

What this means:

  • These screenshots are changing on each test run (timing issues, rendering differences, etc.)
  • This prevents reliable verification and blocks auto-merge
  • Human intervention is required

How to fix:

  1. Investigate flakiness: Check test timing, wait for elements, stabilize animations
  2. Fix the underlying issue: Don't just update snapshots repeatedly
  3. Verify locally: Run tests multiple times to ensure stability
  4. Push your fix: This will reset the flap counter

If you need to proceed anyway:

  • Fix the test flakiness first (recommended)
  • Or manually verify snapshots are acceptable and revert the bot commits, then push a fix

The workflow has been failed to prevent merging unstable tests.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 15)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 15)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

⚠️ Flapping Screenshots Detected

The following screenshots have been updated multiple times by the bot, indicating test instability:

  • playwright/__snapshots__/pageview-trends-insight.png

What this means:

  • These screenshots are changing on each test run (timing issues, rendering differences, etc.)
  • This prevents reliable verification and blocks auto-merge
  • Human intervention is required

How to fix:

  1. Investigate flakiness: Check test timing, wait for elements, stabilize animations
  2. Fix the underlying issue: Don't just update snapshots repeatedly
  3. Verify locally: Run tests multiple times to ensure stability
  4. Push your fix: This will reset the flap counter

If you need to proceed anyway:

  • Fix the test flakiness first (recommended)
  • Or manually verify snapshots are acceptable and revert the bot commits, then push a fix

The workflow has been failed to prevent merging unstable tests.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

⚠️ Flapping Screenshots Detected

The following screenshots have been updated multiple times by the bot, indicating test instability:

  • playwright/__snapshots__/pageview-trends-insight.png

What this means:

  • These screenshots are changing on each test run (timing issues, rendering differences, etc.)
  • This prevents reliable verification and blocks auto-merge
  • Human intervention is required

How to fix:

  1. Investigate flakiness: Check test timing, wait for elements, stabilize animations
  2. Fix the underlying issue: Don't just update snapshots repeatedly
  3. Verify locally: Run tests multiple times to ensure stability
  4. Push your fix: This will reset the flap counter

If you need to proceed anyway:

  • Fix the test flakiness first (recommended)
  • Or manually verify snapshots are acceptable and revert the bot commits, then push a fix

The workflow has been failed to prevent merging unstable tests.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

3 snapshot changes in total. 0 added, 3 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@pauldambra pauldambra marked this pull request as ready for review November 1, 2025 20:22
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.

4 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +889 to +895
percentPlayedOfBuffered: [
(s) => [s.dataBufferedUntilPlayerTime, s.currentPlayerTime],
(dataBufferedUntilPlayerTime, currentPlayerTime) => {
const bufferedSeconds = Math.floor(dataBufferedUntilPlayerTime / 1000)
const playerSeconds = Math.floor(currentPlayerTime / 1000)
return playerSeconds / bufferedSeconds
},
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: division by zero when bufferedSeconds is 0 (early recording start). returns Infinity or NaN, causing line 1577's check to always pass and trigger excessive loading

Suggested change
percentPlayedOfBuffered: [
(s) => [s.dataBufferedUntilPlayerTime, s.currentPlayerTime],
(dataBufferedUntilPlayerTime, currentPlayerTime) => {
const bufferedSeconds = Math.floor(dataBufferedUntilPlayerTime / 1000)
const playerSeconds = Math.floor(currentPlayerTime / 1000)
return playerSeconds / bufferedSeconds
},
percentPlayedOfBuffered: [
(s) => [s.dataBufferedUntilPlayerTime, s.currentPlayerTime],
(dataBufferedUntilPlayerTime, currentPlayerTime) => {
const bufferedSeconds = Math.floor(dataBufferedUntilPlayerTime / 1000)
const playerSeconds = Math.floor(currentPlayerTime / 1000)
return bufferedSeconds === 0 ? 0 : playerSeconds / bufferedSeconds
},
],
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts
Line: 889:895

Comment:
**logic:** division by zero when `bufferedSeconds` is 0 (early recording start). returns `Infinity` or `NaN`, causing line 1577's check to always pass and trigger excessive loading

```suggestion
        percentPlayedOfBuffered: [
            (s) => [s.dataBufferedUntilPlayerTime, s.currentPlayerTime],
            (dataBufferedUntilPlayerTime, currentPlayerTime) => {
                const bufferedSeconds = Math.floor(dataBufferedUntilPlayerTime / 1000)
                const playerSeconds = Math.floor(currentPlayerTime / 1000)
                return bufferedSeconds === 0 ? 0 : playerSeconds / bufferedSeconds
            },
        ],
```

How can I resolve this? If you propose a fix, please make it concise.
if (!cache.snapshotsBySource) {
return {}
}
// TODO: if we change the data without changing the object instance then dependents don't recalculate
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: mutating cache.snapshotsBySource without creating new object instance prevents selector recalculation, potentially causing stale UI state

Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/scenes/session-recordings/player/snapshotDataLogic.tsx
Line: 358:358

Comment:
**logic:** mutating `cache.snapshotsBySource` without creating new object instance prevents selector recalculation, potentially causing stale UI state

How can I resolve this? If you propose a fix, please make it concise.
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

4 snapshot changes in total. 0 added, 4 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

⚠️ Flapping Screenshots Detected

The following screenshots have been updated multiple times by the bot, indicating test instability:

  • playwright/__snapshots__/pageview-trends-insight.png

What this means:

  • These screenshots are changing on each test run (timing issues, rendering differences, etc.)
  • This prevents reliable verification and blocks auto-merge
  • Human intervention is required

How to fix:

  1. Investigate flakiness: Check test timing, wait for elements, stabilize animations
  2. Fix the underlying issue: Don't just update snapshots repeatedly
  3. Verify locally: Run tests multiple times to ensure stability
  4. Push your fix: This will reset the flap counter

If you need to proceed anyway:

  • Fix the test flakiness first (recommended)
  • Or manually verify snapshots are acceptable and revert the bot commits, then push a fix

The workflow has been failed to prevent merging unstable tests.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

5 snapshot changes in total. 0 added, 5 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

⚠️ Flapping Screenshots Detected

The following screenshots have been updated multiple times by the bot, indicating test instability:

  • playwright/__snapshots__/pageview-trends-insight.png

What this means:

  • These screenshots are changing on each test run (timing issues, rendering differences, etc.)
  • This prevents reliable verification and blocks auto-merge
  • Human intervention is required

How to fix:

  1. Investigate flakiness: Check test timing, wait for elements, stabilize animations
  2. Fix the underlying issue: Don't just update snapshots repeatedly
  3. Verify locally: Run tests multiple times to ensure stability
  4. Push your fix: This will reset the flap counter

If you need to proceed anyway:

  • Fix the test flakiness first (recommended)
  • Or manually verify snapshots are acceptable and revert the bot commits, then push a fix

The workflow has been failed to prevent merging unstable tests.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

⚠️ Flapping Screenshots Detected

The following screenshots have been updated multiple times by the bot, indicating test instability:

  • playwright/__snapshots__/pageview-trends-insight.png

What this means:

  • These screenshots are changing on each test run (timing issues, rendering differences, etc.)
  • This prevents reliable verification and blocks auto-merge
  • Human intervention is required

How to fix:

  1. Investigate flakiness: Check test timing, wait for elements, stabilize animations
  2. Fix the underlying issue: Don't just update snapshots repeatedly
  3. Verify locally: Run tests multiple times to ensure stability
  4. Push your fix: This will reset the flap counter

If you need to proceed anyway:

  • Fix the test flakiness first (recommended)
  • Or manually verify snapshots are acceptable and revert the bot commits, then push a fix

The workflow has been failed to prevent merging unstable tests.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 14)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 15)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

⚠️ Flapping Screenshots Detected

The following screenshots have been updated multiple times by the bot, indicating test instability:

  • playwright/__snapshots__/pageview-trends-insight.png

What this means:

  • These screenshots are changing on each test run (timing issues, rendering differences, etc.)
  • This prevents reliable verification and blocks auto-merge
  • Human intervention is required

How to fix:

  1. Investigate flakiness: Check test timing, wait for elements, stabilize animations
  2. Fix the underlying issue: Don't just update snapshots repeatedly
  3. Verify locally: Run tests multiple times to ensure stability
  4. Push your fix: This will reset the flap counter

If you need to proceed anyway:

  • Fix the test flakiness first (recommended)
  • Or manually verify snapshots are acceptable and revert the bot commits, then push a fix

The workflow has been failed to prevent merging unstable tests.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

⚠️ Flapping Screenshots Detected

The following screenshots have been updated multiple times by the bot, indicating test instability:

  • playwright/__snapshots__/pageview-trends-insight.png

What this means:

  • These screenshots are changing on each test run (timing issues, rendering differences, etc.)
  • This prevents reliable verification and blocks auto-merge
  • Human intervention is required

How to fix:

  1. Investigate flakiness: Check test timing, wait for elements, stabilize animations
  2. Fix the underlying issue: Don't just update snapshots repeatedly
  3. Verify locally: Run tests multiple times to ensure stability
  4. Push your fix: This will reset the flap counter

If you need to proceed anyway:

  • Fix the test flakiness first (recommended)
  • Or manually verify snapshots are acceptable and revert the bot commits, then push a fix

The workflow has been failed to prevent merging unstable tests.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 15)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

⚠️ Flapping Screenshots Detected

The following screenshots have been updated multiple times by the bot, indicating test instability:

  • playwright/__snapshots__/pageview-trends-insight.png

What this means:

  • These screenshots are changing on each test run (timing issues, rendering differences, etc.)
  • This prevents reliable verification and blocks auto-merge
  • Human intervention is required

How to fix:

  1. Investigate flakiness: Check test timing, wait for elements, stabilize animations
  2. Fix the underlying issue: Don't just update snapshots repeatedly
  3. Verify locally: Run tests multiple times to ensure stability
  4. Push your fix: This will reset the flap counter

If you need to proceed anyway:

  • Fix the test flakiness first (recommended)
  • Or manually verify snapshots are acceptable and revert the bot commits, then push a fix

The workflow has been failed to prevent merging unstable tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants