Treat an already-gone recommendation as cleared, not an error#86
Merged
Conversation
Tester report: subscribing to a recommendation showed "Subscribed to X, but the suggestion could not be cleared" and left the card with a stale Subscribe button. discoverProvider.dismiss optimistically removed the card, then on ANY failure rolled it back and rethrew — so a 404 (the recommendation already gone) made the card reappear and the screen show the cleanup error. Now a 404 is treated as success: the card stays cleared and nothing is rethrown (other errors keep the rollback). Covers the staleness-sweep race and, with the backend fix (windoze95/nullfeed-backend#133) that stops subscribe from wiping the list, makes the Explore/Home subscribe->clear flow reliable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Tester report
Subscribing to a recommendation showed "Subscribed to X, but the suggestion could not be cleared" and left the card with a stale Subscribe button.
Fix
discoverProvider.dismissoptimistically removed the card, then on any failure rolled it back and rethrew — so a 404 (the recommendation already gone) made the card reappear and the screen show the cleanup error. Now a 404 is treated as success: the card stays cleared, nothing is rethrown (other errors keep the rollback + surface). This covers the staleness-sweep race and, together with the backend fix (windoze95/nullfeed-backend#133 — subscribe no longer wipes the whole list), makes the Explore/Home subscribe→clear flow reliable.Test plan
New widget test asserts a 404 during clear leaves the card removed with no error toast.
dart format+flutter analyze --fatal-infos --fatal-warningsclean; all 234 tests pass.🤖 Generated with Claude Code