hyperswitch-web
hyperswitch-web copied to clipboard
feat: added offline support for logs
Type of Change
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
This PR introduces the following enhancements:
- Added NETWORK_STATE event to logs for capturing the user's network conditions, improving debugging and visibility into connectivity issues.
- Implemented IndexedDB persistence to store logs locally when the browser is offline, ensuring no logs are lost during network outages.
- Enabled automatic sync and cleanup: Logs are automatically sent to the server and cleared from IndexedDB once the network is restored.
How did you test it?
Tested it locally
Checklist
- [x] I ran
npm run re:build - [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible