Skip to content

Conversation

@chenyuan99
Copy link

@chenyuan99 chenyuan99 commented Feb 8, 2026

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 ensure mutation in convex/users.ts to resync a user’s stored handle with the current GitHub user.name (falling back to email prefix) on each sign-in, and to update displayName only 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.handle will now be overwritten when user.name differs, instead of only being set once at bootstrap.

Confidence Score: 4/5

  • This PR is likely safe to merge after fixing a small logic inconsistency in admin role assignment.
  • The change is narrowly scoped to user bootstrap logic and appears to address the rename issue, but it introduces an inconsistency where role assignment uses the non-normalized handle while handle/displayName updates use the normalized value, which can cause incorrect role selection in edge cases.
  • convex/users.ts

(5/5) You can turn off certain types of comments like style here!

@vercel
Copy link
Contributor

vercel bot commented Feb 8, 2026

@chenyuan99 is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sign-in broken after GitHub username change

1 participant