Fix sync retry, multi-device support, and OAuth error handling#3
Open
stevemoraco wants to merge 1 commit intogrp06:mainfrom
Open
Fix sync retry, multi-device support, and OAuth error handling#3stevemoraco wants to merge 1 commit intogrp06:mainfrom
stevemoraco wants to merge 1 commit intogrp06:mainfrom
Conversation
This PR addresses three critical bugs reported by users: 1. Failed historical sync with no retry option - Added new 'stats' command for manual sync/resync - Added '--resync' flag to force resync of historical data - Fixed error message to point to correct command 2. Multi-device support not working properly - Added device identification system with unique device IDs - Device metadata sent with all API requests - Supports multiple OAuth token pairs per user account 3. "Invalid OAuth link" error on re-authentication - Added '--force' flag to auth command for clean re-auth - Improved OAuth error messages with specific failure reasons - Better error handling for rate limits and token issues Additional improvements: - Added 'sync-status' command to check sync state without triggering sync - Added debug logging support (CLAUDE_COUNT_DEBUG=1) - Updated README with comprehensive troubleshooting section - Added device.js for device identification - Added logger.js for better debugging All changes maintain backward compatibility and follow existing code patterns. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
This is great, would love multidevice support I have two computers I use almost equally |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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