-
-
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
base: master
Are you sure you want to change the base?
feat(replay) - Background refetch #101295
Conversation
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.
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
ec1099a
to
c5da035
Compare
Co-authored-by: ryan.albrecht <ryan.albrecht@sentry.io>
- Introduced a new event replay.details-refresh-clicked to track user interactions with the refresh button in the Replay Details view. - Updated the ReplayDetailsUserBadge component to call the tracking function upon refresh action.
@ryan953 I saw you simplified the The reason why we had this convoluted usage of showRefreshButton state is so polling would stop after displaying the refreshButton. Now, it'll continue polling regardless, but if you think the overhead of that is minimal, I'm happy to use this since it's def more readable. Looping in @billyvg as well. |
I was trying to demonstrate that the logic can be put into a var instead of state and typed For example, the We should try to stop the polling if we can, so I guess there's still some details that you'll be able to work out. |
Makes the refresh button only reload what's necessary instead of a full-page refresh.
requires #101462