bugfix: #170 Sign-in broken after GitHub username change #179
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.
fix #170 Sign-in broken after GitHub username change
Updated user bootstrap to sync the app handle/display name with the current GitHub login on each sign-in, so username changes update the stored handle instead of leaving the old one. This keeps profile lookups and GitHub-related flows (like account age checks) aligned after a rename; change lives in convex/users.ts.
convex/users.ts: refreshes handle when user.name changes; updates displayName only when it was still the auto-generated handle.
Greptile Overview
Greptile Summary
This change updates the
ensuremutation inconvex/users.tsto resync a user’s storedhandlewith the current GitHubuser.name(falling back to email prefix) on each sign-in, and to updatedisplayNameonly when it’s unset or still equal to the auto-generated handle. The intent is to keep profile lookups and GitHub-dependent logic aligned after a GitHub username rename.Main behavior change is that an existing
user.handlewill now be overwritten whenuser.namediffers, instead of only being set once at bootstrap.Confidence Score: 4/5
(5/5) You can turn off certain types of comments like style here!