Skip to content

Conversation

jerryzhou196
Copy link
Member

@jerryzhou196 jerryzhou196 commented Oct 14, 2025

When building the background refresh, Billy and I encountered some bugs with useFetchParallelPages.

a. It doesn't refetch with a different hits value:

  1. (First call) useFetchParallelPages({hits = 12, perPage = 100}), then we would have pages=1
  2. (Second call) useFetchParallelPages({hits = 15, perPage = 100}), then we would still have pages=1 and the old version of cursors. The useEffect later wouldn't run fetch() on re-render when it should.

Copy link

linear bot commented Oct 14, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 14, 2025
@jerryzhou196 jerryzhou196 changed the title replay 553 fix use fetch parallel pages replay 553 - fix use fetch parallel pages Oct 14, 2025
@ryan953 ryan953 self-requested a review October 14, 2025 23:13
Copy link
Member

@ryan953 ryan953 left a comment

Choose a reason for hiding this comment

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

This should mean that we're getting into the useMemo more often (because hits will change more often than pages did) and thus we'll get a new array to process!

LG!

@jerryzhou196 jerryzhou196 changed the title replay 553 - fix use fetch parallel pages fix(replay) - fix use fetch parallel pages Oct 15, 2025
@jerryzhou196 jerryzhou196 merged commit 7e5a3d0 into master Oct 15, 2025
47 checks passed
@jerryzhou196 jerryzhou196 deleted the replay-553-fix-use-fetch-parallel-pages branch October 15, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants