Repository navigation
Keep flip list cards mounted after the page loads - #1569
Merged
Merged
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
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.
Behaviour: Flip lists (crafts, NPC, bazaar, forge, kat and the other
GenericFlipListpages) no longer replace every card with a spinner right after the page loads. Before, a click on a card in that moment opened its detail dialog on a card that was then thrown away: no dialog, no request. That madecrafts.cy.tsfail on #1567's CI (cy.wait('@plan'): no request ever occurred).Cause: On mount,
useSortedAndFilteredItemssetsisProcessingwhile it sorts, andGenericFlipListrendered the spinner instead of the list wheneverisProcessingwas set. Every card unmounted and its open state was lost.Change:
GenericFlipListshows the spinner only while there is nothing to show. During a sort or filter run the current cards stay.useSortedAndFilteredItemssorts and filters synchronously for its first state. The server now renders the order the client settles on, so cards no longer jump after load. A card can no longer cross the blurred top-2 boundary and remount (review finding).-adlike the other ad branch.market-analysis.cy.ts: the heading-order check counts only visible headings. A stale copy in the hidden streaming container made it fail once locally (same pattern the file already uses elsewhere).Test:
crafts.cy.tsnow counts craft cards removed from the page and expects none. On the unfixed build it fails in about 5 of 7 runs (the bug itself is timing-dependent); with the fix it passed every run. Full suite locally on the fixed build: 283/283.Risk: The first sort now runs during server render and hydration instead of in a timeout. For the list sizes on these pages that is a few milliseconds.
🤖 Generated with Claude Code