fix(starred): stop endless item requests in Starred view#3694
Merged
Conversation
3 tasks
…quests The fetchKey in Starred.vue returned 'starred' for the main view, but the store wrote flags under 'starred-0'. This mismatch meant reachedEnd and fetching were never observed, causing VirtualScroll to fire requests forever. - Change fetchKey to always return 'starred-' + this.id (e.g. 'starred-0') - Thread this.fetchKey into outOfScopeFilter instead of hardcoded 'starred' - Update Starred.spec.ts mock keys from 'starred' to 'starred-0' Agent-Logs-Url: https://github.com/nextcloud/news/sessions/852f7f2d-7b76-493d-a0c2-e41a19a74caf Co-authored-by: Grotax <5429298+Grotax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix endless requests in starred view of news app
fix(starred): stop endless item requests in Starred view
Apr 25, 2026
Member
|
@copilot you forgot to add a changelog entry... |
Agent-Logs-Url: https://github.com/nextcloud/news/sessions/cc5ab4ae-31f5-4c3b-b9e1-fa6caa0a6cc8 Co-authored-by: Grotax <5429298+Grotax@users.noreply.github.com>
Contributor
Author
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an infinite “load more” request loop in the Starred route by aligning the component’s fetchKey with the Vuex store’s keyed pagination/loading state for starred items.
Changes:
- Update
Starred.vueto consistently usestarred-<id>as thefetchKey(includingstarred-0for the main Starred view). - Pass the computed
fetchKeyintooutOfScopeFilterso filtering matches the store’slastItemLoadedkeys. - Adjust
Starred.spec.tsmocked Vuex state to usestarred-0keys and document the fix inCHANGELOG.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/components/routes/Starred.vue | Aligns fetchKey and filtering with store’s starred-<feedId> convention to prevent endless loading. |
| tests/javascript/unit/components/routes/Starred.spec.ts | Updates mocked state keys to match the corrected fetchKey convention. |
| CHANGELOG.md | Adds an Unreleased “Fixed” entry documenting the Starred infinite-request fix. |
Agent-Logs-Url: https://github.com/nextcloud/news/sessions/57a9a502-a1e2-4877-a7cb-ac4ccbc68731 Co-authored-by: Grotax <5429298+Grotax@users.noreply.github.com>
Grotax
approved these changes
Apr 25, 2026
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.
fetchKeyinStarred.vuereturned'starred'for the main view, but the store writes all state flags under'starred-' + feedId(i.e.'starred-0').VirtualScrollreadsreachedEndandfetchingfrom the mismatched key, both always undefined/false, soupdated() → $nextTick(loadMore)fires in an infinite loop with a fixed offset.Summary
Starred.vue—fetchKey: always return'starred-' + this.idinstead of a bare'starred'fallback, aligning it with the store's convention:Starred.vue—outOfScopeFilter: passthis.fetchKeyinstead of the hardcoded'starred'string (was a silent no-op for the main Starred view sincelastItemLoaded['starred']was never written):Starred.spec.ts: update mock state keys from'starred'→'starred-0'to match the corrected convention, and renameit(...)descriptions fromfetchingItems.starred→fetchingItems[starred-0]to match the actual state keys used.CHANGELOG.md: added entry underUnreleased → Fixeddocumenting the fix.Checklist