Fix sync retry, multi-device support, and OAuth error handling #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes three critical bugs that were preventing users from properly syncing their data and using the leaderboard across multiple devices:
What's Changed
🔄 New Sync/Retry Functionality
statscommand to manually view stats and sync historical data--resyncflag to force complete resync when needed📱 Multi-Device Support
🔐 Improved OAuth Flow
--forceflag toauthcommand for clean re-authentication🛠️ Additional Improvements
sync-statuscommand to check sync state without triggering a syncCLAUDE_COUNT_DEBUG=1environment variableTesting
I've tested the command structure and error handling locally. The maintainer will need to test against the production backend for:
Local Testing Commands
Implementation Details
Files Changed
src/commands/stats.js- New file for stats/sync functionalitysrc/utils/device.js- New file for device identificationsrc/utils/logger.js- New file for debug loggingsrc/auth/oauth1a.js- Enhanced error handling and device supportsrc/commands/auth.js- Added --force flagsrc/utils/api.js- Added device ID to all requestsbin/cli.js- Registered new commandsREADME.md- Added troubleshooting section and command docsThis is my first open source contribution, so please let me know if you need any changes or have questions! I'm happy to iterate on the implementation.
Contributors: Steve Moraco (@stevemoraco) with assistance from Claude
🤖 Generated with Claude Code