-
Notifications
You must be signed in to change notification settings - Fork 0
Implement device registration and internal mode management #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
- Throttle registerDevice calls to prevent duplicate registrations - Make effectiveInternalMode observable via StateFlow for reactive UI updates - Add missing Internal Mode Enabled row in Settings screen - Fix device registration to only trigger on Authenticated session status - Remove debug logging
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 16. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
- Centralize device registration in session status observer - Remove redundant registerDeviceAfterLogin calls from login methods - Remove lastSessionStatusAuthenticated flag (use deviceRegistrationCompleted instead) - Remove verbose debug logs that were spamming logcat 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Remove premature PostHog registration on app startup - Parse is_internal from registerDevice response instead of making a separate API call - PostHog now receives server-authoritative internal status 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Remove unnecessary dependency on PreferenceRepository - DeviceRepository only needed it for auth token, which can be obtained directly from SupabaseClient. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
For authenticated Supabase requests, the Bearer token is sufficient. The apikey header is only needed for unauthenticated requests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Server now manages is_internal status via device registration API. No need to duplicate in user metadata. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Replace confusing identifyAndRegister/registerInternal/resetAndRegister with clear single-purpose methods: identify, setInternal, reset - Remove redundant updateAnalytics calls from all login methods - Call Analytics.identify once on authentication - Call Analytics.setInternal only after server response - Call Analytics.reset on logout without is_internal parameter 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
iAmVishal16
approved these changes
Nov 24, 2025
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.
This PR implements device registration and internal mode management for Android, replicating the iOS functionality.
Changes
Key Features