javascript icon indicating copy to clipboard operation
javascript copied to clipboard

fix(clerk-js): Correct init retry logic

Open jacekradko opened this issue 3 months ago • 5 comments

Description

Refactor Clerk initialization retry logic to use a dedicated withRetry utility with exponential backoff

Checklist

  • [ ] pnpm test runs as expected.
  • [ ] pnpm build runs as expected.
  • [ ] (If applicable) JSDoc comments have been added or updated for any package exports
  • [ ] (If applicable) Documentation has been updated

Type of change

  • [x] 🐛 Bug fix
  • [ ] 🌟 New feature
  • [ ] 🔨 Breaking change
  • [ ] 📖 Refactoring / dependency upgrade / documentation
  • [ ] other:

Summary by CodeRabbit

  • New Features

    • Added a configurable retry utility with jittered exponential backoff for startup operations.
  • Bug Fixes

    • Improved initialization resilience and recovery for transient/network failures, clearer error wrapping (init errors now include causes), and dev-browser auth recovery; UI can mount in degraded mode.
  • Tests

    • Added comprehensive tests for retry/backoff behavior and initialization retry scenarios.
  • Chores

    • Updated TypeScript libs and added a patch changeset.

✏️ Tip: You can customize this high-level summary in your review settings.

jacekradko avatar Nov 03 '25 01:11 jacekradko