Skip to content

Add Zustand hydration recovery#712

Open
Jerry-Tekh wants to merge 3 commits into
rinafcode:mainfrom
Jerry-Tekh:fix/zustand-hydration-recovery
Open

Add Zustand hydration recovery#712
Jerry-Tekh wants to merge 3 commits into
rinafcode:mainfrom
Jerry-Tekh:fix/zustand-hydration-recovery

Conversation

@Jerry-Tekh

Copy link
Copy Markdown
Contributor

Summary

  • Add shared Zustand persist hydration recovery with default-state reset, appLogger warning, and Sentry warning events
  • Wire recovery into all persisted stores and show a one-time preferences reset toast
  • Add malformed JSON hydration regression coverage for UI, settings, and course progress stores

Tests

  • npm test -- --runInBand src/tests/store/hydrationRecovery.test.ts src/tests/store/degradationStore.test.ts
  • npx tsc --noEmit --ignoreDeprecations 6.0 --pretty false (fails on pre-existing unrelated repo errors in App.tsx and other files; touched store files are clean under filtered check)

Closes #679

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Jerry-Tekh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Kindly resolve conflict

@Jerry-Tekh

Copy link
Copy Markdown
Contributor Author

Conflicts have been resolved and pushed.

I also fixed two parser blockers found after merging latest main. The PR is now mergeable, but CI remains red because the same broad CI failures are currently present on upstream main as well.

@Jerry-Tekh

Copy link
Copy Markdown
Contributor Author

Kindly resolve conflict
Conflicts have been resolved and pushed.

I also fixed two parser blockers found after merging latest main. The PR is now mergeable, but CI remains red because the same broad CI failures are currently present on upstream main as well.

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.

[Enhancement] Add hydration error recovery for all Zustand persisted stores

2 participants