Merged
Conversation
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.
This PR is from the upstream repo list kevdliu#58. I didn't feel like waiting for it to be merged there and syncing
Commits should still reflect @aullrich2013,
Title
Fix recipe save/delete persistence by matching current AnyList web payloads
Summary
This patch fixes recipe persistence for the unofficial AnyList client.
Before this change, recipe operations such as:
createRecipe(...).save()save()recipe.delete()could return without error but fail to persist after a fresh read.
Root cause
The current recipe operation payload no longer matches what the AnyList web client sends.
The working web payload differs in a few important ways:
userIdin metadata.recipeIds.timestampandrecipeDataIdon the nested recipe payload.identifierandisHeading.What this patch changes
uidfrom the JWTsubclaim after login / token refresh.Recipe._encode()so recipe payloads match the current browser behavior more closely.recipeIdsfor recipe operations.timestampand nestedrecipeDataIdforremove-recipe.isHeadingwhen encoding ingredients.Validation
Validated against the live AnyList web app by capturing browser traffic and comparing the protobuf request bodies.
Confirmed working end-to-end after the patch:
nullNotes
This is based on observed current web payloads from
/data/user-recipe-data/update. The previous implementation appears to reflect an older contract that now succeeds superficially but does not persist recipe changes.