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: create playlists from errors #21037

Merged
merged 10 commits into from
Mar 21, 2024
Merged

feat: create playlists from errors #21037

merged 10 commits into from
Mar 21, 2024

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Mar 20, 2024

Problem

We want users to be able to see a playlist of recordings containing a certain error

Changes

  • Create playlist
  • Pin recordings individually. Note: This is temporary while I work on a refactor to allow the playlist UI render without filters / session loading code (in the works but complicated)

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

Yes

How did you test this code?

playlist.mp4

@daibhin daibhin requested a review from a team March 20, 2024 11:02
Copy link
Contributor

github-actions bot commented Mar 20, 2024

Size Change: 0 B

Total Size: 824 kB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 824 kB

compressed-size-action

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.

one comment on the playlist creation...

@@ -76,12 +76,12 @@ def construct_response(df: pd.DataFrame, team: Team, user: User):
clusters = []
for cluster, rows in df.groupby("cluster"):
session_ids = rows["session_id"].unique()
sample = rows.sample(n=1)[["session_id", "input"]].rename(columns={"input": "error"}).to_dict("records")
sample = rows.sample(n=1)[["session_id", "input"]].rename(columns={"input": "error"}).to_dict("records")[0]
Copy link
Member

Choose a reason for hiding this comment

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

silly check do we know we have a non-empty thing to get [0] from at this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep good question. The cluster will only be generated if it meets the MIN_SAMPLES so we know that each cluster has at least 10 rows

@daibhin daibhin changed the title Dn feat/errors playlist feat: create playlists from errors Mar 21, 2024
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.

:shipit:

@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 2)
  • 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 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@daibhin daibhin enabled auto-merge (squash) March 21, 2024 16:28
@daibhin daibhin disabled auto-merge March 21, 2024 16:43
@daibhin daibhin merged commit 21922ff into master Mar 21, 2024
133 of 134 checks passed
@daibhin daibhin deleted the dn-feat/errors-playlist branch March 21, 2024 16:59
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.

4 participants