Repository navigation
Show "No results found." instead of an endless loading message - #730
Merged
Merged
Conversation
The All Sets and All Decks lists used `resultsTotalLength === 0` to decide whether the data was still loading, so a search that matched nothing was indistinguishable from a fetch that had not finished and the page sat on "Loading..." forever. Loading is now derived from the fetched list itself, and an empty result set gets its own message. The counts are also seeded from a watcher rather than onMounted, and the sorter re-applies the active search/filters when the list lands, since both components mount before the API response arrives. Fixes #709 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xba7S7uYsrKAVdniqNcfhS
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #730 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 69 69
Branches 27 27
=========================================
Hits 69 69 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Fixes #709
Problem
DownloadList.vueused one condition to represent two different states:resultsTotalLengthstarts at 0 and is also 0 when a search matches nothing, so filtering All Sets or All Decks by something like "blah blah blah" left the page stuck on "Loading..." forever.Changes
isLoading = defaultList.length === 0), and an empty result set gets its ownNo results found.message.watchondefaultListwithimmediate: truerather thanonMounted.SetList/DeckListare fetched inLayout.vue'sonMounted, so the old hook read an empty array on every load.DownloadSorter.vuewatchesprops.listand re-applies the active search/filters when the data lands. Its only prioronHandleChangecall was a 300ms timeout fired at mount, which raced the API response.Testing
eslintclean on both components,vitepress buildsucceeds, and the jest suite passes (26 tests). The interaction itself was not driven in a browser.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xba7S7uYsrKAVdniqNcfhS