Skip to content

fix(auth): merge guest favorites in the background on login (v5.2.6) - #138

Merged
Ingwalde merged 1 commit into
mainfrom
fix/login-favorites-merge-background
Sep 9, 2026
Merged

Ingwalde merged 1 commit into
mainfrom
fix/login-favorites-merge-background

Conversation

@Ingwalde

@Ingwalde Ingwalde commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Bug check follow-up

Reviewed the v5.2.4/v5.2.5 changes. One real bug found and fixed:

Login hangs on the favorites merge. The guest→account favorites merge ran inside the login mutation's onSuccess and awaited every addFavorite, so mutateAsync (and the sign-in button) waited while a long on-device list uploaded. Now the merge runs in the background — login resolves immediately, adds settle, then the list is cleared and the favorites query refetched. Server-side adds are idempotent, so backgrounding cannot duplicate a favorite.

Also reviewed and found acceptable / not bugs: route ordering in users.py (distinct path depths, no shadowing), avatar 304 path (returns before decode), the favorites cache-key split (invalidation still prefix-matches both), the guest-favorites cap (100 < the 120/min write limit, so a merge never trips rate limiting), and .has() owner filtering (ownerless seed rows are excluded until the curator backfill, which runs the same startup).

Bump to v5.2.6 (frontend-only fix).

🤖 Generated with Claude Code

Signing in ran the guest→account favorites merge inside the login
mutation's onSuccess and awaited every add, so mutateAsync (and the
sign-in button) hung while a long on-device list uploaded. Fire the
merge in the background instead: login resolves immediately, the adds
settle, then the list is cleared and the favorites query refetched.
Server-side adds are idempotent, so backgrounding cannot duplicate a
favorite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Ingwalde
Ingwalde merged commit b0fc4aa into main Sep 9, 2026
10 checks passed
@Ingwalde
Ingwalde deleted the fix/login-favorites-merge-background branch September 9, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant