Skip to content

Conversation

@jerryzhou196
Copy link
Member

@jerryzhou196 jerryzhou196 commented Oct 9, 2025

  1. Makes the refresh button only reload what's necessary instead of a full-page refresh.
  2. Refactors usePollReplayRecord to return the replayRecord instead of just count_segments
  3. Removes useIsLive hook and determines LIVE by checking if polled Date.now() < replayRecord.finished_at() + 5 minutes
  4. Adds tests for usePollReplayRecord and the refresh button
before after
before after

requires #101462

jerryzhou196 and others added 11 commits October 6, 2025 15:32
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.
@linear
Copy link

linear bot commented Oct 9, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 9, 2025
…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.
cursor[bot]

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

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     

cursor[bot]

This comment was marked as outdated.

…ting useQuery enabled

- added a test to ensure useLoadReplayReader gets new data
@jerryzhou196 jerryzhou196 merged commit 970f2d9 into master Oct 22, 2025
48 checks passed
@jerryzhou196 jerryzhou196 deleted the replay-553-background-fetch-segment-react-query-refresh branch October 22, 2025 16:16
@sentry
Copy link

sentry bot commented Oct 22, 2025

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

  • ‼️ [**Error: �[2mexpect(�[22m�[31mreceived�[39m�2m).toB...** in ci:pull_request

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants