Repository navigation
fix(downloads): show why a series or episode download didn't start - #429
Conversation
"Download series" ignored the batch endpoint's result, so a request the server rejected (such as the concurrent download limit) looked like nothing happened. Single downloads only reported success or failure. Both now report the start, and a rejected request shows the server's message in a toast, with a fallback when it has none. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe detail screen now displays download-start failure messages in long-duration toasts. The view model reports failed individual and series batch download-start requests with the API error message or a fallback. ChangesDownload failure reporting
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Download-start failures reach the detail screen as server, network, or fallback messages while it is active. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
Related issue: #424
Related server PR: Silo-Server/silo-server#1704. The two are independent and can merge in either order: that PR stops the server from rejecting a series download when a slot is free, and this one shows the reason whenever it does reject one.
"Download series" called the server's batch endpoint and dropped the result. When the server refused the batch, for example with
429 rate_limitedbecausedownload.max_concurrent_per_userwas reached, nothing was queued and nothing was shown, so the button looked broken. Single-episode downloads already emitted a success/failure event, which only drove a haptic, and showed no reason.Approach
ItemDetailViewModel.reportDownloadStarthandles both paths: it emits the existing start event and, for a failed request, the server's error message throughApiResult.errorMessage, falling back to "Couldn't start the download.".onSeriesDownloadTappednow passes the batch result to it instead of ignoring it.ItemDetailScreencollects the newdownloadFailureMessagesflow and shows each message in a long toast, like the screen's other download toasts.Validation
Run in WSL2 with JDK 21 and Android SDK 36:
./gradlew :androidApp:testDebugUnitTest :androidApp:assembleDebug: passed. The two compiler warnings are in the existingSettingsViewModelOfflinePreferencesTest../gradlew :androidApp:lintDebug: passed.429 rate_limitedand the screen showed nothing.Risks
Checklist
AI Disclosure
ApiResult, thaterrorMessageis the helper other screens already use for server messages, that the new flow is collected once per screen likedownloadStartEvents, and that no string resources were bypassed (the screen's other toasts use literal text too).🤖 Generated with Claude Code
Note
Show a toast when a series or episode download fails to start
Adds user-facing error messages when a download-start request fails.
reportDownloadStarthelper inItemDetailViewModelemits an error message derived from theApiResultalongside the existing success/failure start event, with a fallback message when no error text is availablestartDownloadandonSeriesDownloadTappedboth route their enqueue results through this helper, so series batch failures are reported tooItemDetailScreencollects the failure-message flow and shows each message in a long-duration toastMacroscope summarized e85772e.