Implement anonymous stats migration on signin

- Fix AuthModal to pass anonymousId on both signin and signup
- Add comprehensive migration logic in signin that moves anonymous completion stats to authenticated user
- Implement deduplication algorithm to handle overlapping completion dates
- Maintain earliest completion when duplicates exist

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
George Powell
2026-02-05 18:49:14 -05:00
parent 3cf95152e6
commit 06ff0820ce
2 changed files with 62 additions and 1 deletions

View File

@@ -95,7 +95,7 @@
method="POST"
action={mode === 'signin' ? '/auth/signin' : '/auth/signup'}
use:enhance={({ formData }) => {
if (mode === 'signup' && anonymousId) {
if (anonymousId) {
formData.append('anonymousId', anonymousId);
}
handleSubmit();