-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(replay) - Background refetch #101295
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
Merged
jerryzhou196
merged 38 commits into
master
from
replay-553-background-fetch-segment-react-query-refresh
Oct 22, 2025
Merged
feat(replay) - Background refetch #101295
jerryzhou196
merged 38 commits into
master
from
replay-553-background-fetch-segment-react-query-refresh
Oct 22, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduces two new hooks: useIsLive to determine if a replay is currently live and usePollReplayRecord to poll the backend for updates on the replay record. The ReplayDetailsUserBadge component is updated to utilize these hooks, enhancing the live indicator functionality and allowing for automatic updates of replay data.
…state Refactored the usePollReplayRecord hook to utilize useRef for tracking the updated state of the replay record. This change ensures that the updated state persists across renders without causing unnecessary re-renders. Additionally, clarified the pollInterval comment for better understanding.
…rBadge component - addressed Ryans timeout comment - addressed Billys discussion with useQuery - addressed Billys > 0 for timeout
…ooks - Updated time calculation in useIsLive to use a more readable format. - Renamed replayRecord to polledReplayRecord in usePollReplayRecord for clarity. - Removed unnecessary priority prop from RefreshButton in ReplayDetailsUserBadge component.
- Added priority prop to the RefreshButton in ReplayDetailsUserBadge component for improved button emphasis. - Removed custom background and hover color styles from RefreshButton to streamline its appearance.
Removed primary priority from RefreshButton and added custom styles.
…esh button based on segment counts
…efetch in background + investigating memory leaks caused by console log capturing breadcrumbs via SDK
- Improved the refresh button logic to ensure proper query refetching and invalidation, now also triggering a summary request after refreshing.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #101295 +/- ##
===========================================
+ Coverage 76.87% 80.97% +4.10%
===========================================
Files 8728 8699 -29
Lines 388301 386003 -2298
Branches 24617 24476 -141
===========================================
+ Hits 298507 312573 +14066
+ Misses 89436 73083 -16353
+ Partials 358 347 -11 |
jerryzhou196
commented
Oct 20, 2025
static/app/views/replays/detail/header/replayDetailsUserBadge.spec.tsx
Outdated
Show resolved
Hide resolved
static/app/views/replays/detail/header/replayDetailsUserBadge.spec.tsx
Outdated
Show resolved
Hide resolved
static/app/views/replays/detail/header/replayDetailsUserBadge.spec.tsx
Outdated
Show resolved
Hide resolved
static/app/views/replays/detail/header/replayDetailsUserBadge.spec.tsx
Outdated
Show resolved
Hide resolved
…ting useQuery enabled - added a test to ensure useLoadReplayReader gets new data
jerryzhou196
commented
Oct 22, 2025
static/app/views/replays/detail/header/replayDetailsUserBadge.tsx
Outdated
Show resolved
Hide resolved
billyvg
reviewed
Oct 22, 2025
static/app/views/replays/detail/header/replayDetailsUserBadge.tsx
Outdated
Show resolved
Hide resolved
static/app/views/replays/detail/header/replayDetailsUserBadge.tsx
Outdated
Show resolved
Hide resolved
static/app/views/replays/detail/header/replayDetailsUserBadge.tsx
Outdated
Show resolved
Hide resolved
static/app/views/replays/detail/header/replayDetailsUserBadge.tsx
Outdated
Show resolved
Hide resolved
static/app/views/replays/detail/header/replayDetailsUserBadge.tsx
Outdated
Show resolved
Hide resolved
billyvg
reviewed
Oct 22, 2025
billyvg
approved these changes
Oct 22, 2025
Issues attributed to commits in this pull requestThis pull request was merged and Sentry observed the following issues:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Scope: Backend
Automatically applied to PRs that change backend components
Scope: Frontend
Automatically applied to PRs that change frontend components
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
usePollReplayRecordto return thereplayRecordinstead of justcount_segmentsuseIsLivehook and determines LIVE by checking if polled Date.now() <replayRecord.finished_at()+ 5 minutesusePollReplayRecordand the refresh buttonrequires #101462