Repository navigation
fix(frontend): render exact batches in relay list and reset paging on new matches - #577
Merged
Merged
Conversation
… new matches - RelayList rendered one relay more than the batch size (slice end off by one). - The number of rendered relays was kept when the matches changed, e.g. after a search, so a new list rendered every previously loaded batch at once. It now starts again with the first batch. - Add RelayList browser tests for both cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ddTD9i5zX7dGHoYf8sZSS
|
Visit the preview URL for this PR (updated for commit 27bfadf): https://tormap-36f44--pr577-fix-frontend-relay-l-5ae7l7mm.web.app (expires Mon, 09 Nov 2026 22:58:03 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0c1f71965de18e60b0e686b0d0356977fec090dc |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #249 (resolved by d89dd7b in #569, which replaced
react-infinite-scrollerwith anIntersectionObserversentinel). Two small issues remained inRelayList; both existed before the library switch:slice(0, numberOfMatchesToDisplay + 1)).relayMatcheschanged (e.g. after a search), so a new list rendered every previously loaded batch at once. The list now starts again with the first batch. It uses the same "synced state during render" pattern asResponsiveRelayDetailsDialogandRelayDetailsDialogSmall.relayMatchesis memoized upstream, so the reset only fires on a real change.Tests
RelayList.test.tsx(browser mode): the first render shows exactly 50 relays plus the loader; after loading all 120 and swapping in a new list, only 50 are shown again.master(51 rows shown; 120 rows shown after the swap) and pass with this change.yarn test:run(179 tests in 15 files),yarn lintandyarn buildpass locally.No dependency changes, so no SCA run or dependency vetting was needed.
🤖 Generated with Claude Code
https://claude.ai/code/session_012ddTD9i5zX7dGHoYf8sZSS
Generated by Claude Code