Repository navigation
Conversation
Recommended content waited for a non-empty row to report success, leaving the screen spinning indefinitely when all rows were empty or failed. Update loading state as rows complete so the view finishes loading once all query jobs complete. Assisted-by: codex:gpt-6.1-sol Assisted-by: agy:gemini-3.8-flash-high
Display an empty state message when all recommended rows finish loading with no media items. Add an EmptyState component with a placeholder icon and message so users receive clear visual feedback instead of an empty screen. Assisted-by: codex:gpt-6.1-sol Assisted-by: agy:gemini-3.8-flash-high
This branch has not been deployed
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.
Description
In the Recommended tab of a library, the loading state only switched to success once a row returned at least one item. If every configured row and the suggestions query came back empty or failed, the tab stayed on the loading spinner indefinitely and the user got no feedback.
This PR updates the loading state as each row completes. The tab now finishes loading as soon as any row has content, or once every row has completed. When all rows complete with no items, it shows an empty state with a film icon and a localized "No media found" message.
The change is split into two commits:
Fix recommended loading when all rows are empty: updates the loading state as rows complete, so the tab finishes loading once all row queries are done. Row jobs also rethrowCancellationExceptioninstead of reporting it as a row error.Show a message when recommended rows are all empty: adds anEmptyStatecomponent and shows it when every row completes with no media items.Related issues
I could not find an open issue for this case. #1065 ("Suggestions stuck on 'Loading...'") reported a spinner on the single Suggestions row and was fixed separately.
Steps to reproduce:
Testing
TestRecommendedEmptyStatecover row loading transitions, content arriving in a later row, empty rows, failures, pending rows, refresh after loading, and empty suggestions. All 7 pass on both commits.Screenshots
Recommended tab of an empty library.
Before (v1.1.1, still loading after 60 seconds):
After (this PR):
AI or LLM usage
I used AI tools for this change: OpenAI Codex for the initial implementation and the unit tests, Google Gemini (through Antigravity) to split the change into two commits and rebase it onto main, and Anthropic Claude for review. This covers the changes in
RecommendedContent.kt,EmptyState.kt,strings.xmlandTestRecommendedEmptyState.kt.I tested the change with the unit tests above, ktlint, and on my TV as described in Testing. I have reviewed and understand the changes in this pull request and take responsibility for them.