feat: auto-link GitHub profile from OAuth#1356
Draft
evanjacobson wants to merge 4 commits intofeature/user-profile-connect-social-accountsfrom
Draft
feat: auto-link GitHub profile from OAuth#1356evanjacobson wants to merge 4 commits intofeature/user-profile-connect-social-accountsfrom
evanjacobson wants to merge 4 commits intofeature/user-profile-connect-social-accountsfrom
Conversation
When a user links GitHub via OAuth, their profile card now shows the GitHub profile URL derived from the OAuth display_name, overriding any manually set github_url. The edit modal replaces the GitHub text input with a link to /connected-accounts when GitHub is OAuth-linked.
When GitHub is linked via OAuth, the edit modal now fully excludes the GitHub field from state, validation, and mutation — preventing stale manual values from interfering. Also validates GitHub login format and improves comment accuracy on display_name assignments.
Replace inline auth provider query in profile page with a dedicated getOAuthDisplayNames function that returns a Map<AuthProviderId, string> for O(1) lookup. Query filters for non-null display_name in SQL.
| google_user_image_url: user.image || '', | ||
| provider: account.provider, | ||
| provider_account_id: account.providerAccountId, | ||
| display_name: validLogin, |
Contributor
There was a problem hiding this comment.
WARNING: Existing GitHub links never get this value
display_name is only set when a provider row is first inserted. On later GitHub sign-ins, findAndSyncExistingUser() returns the user without updating user_auth_provider, so accounts that were already linked before this rollout keep display_name = null and never show the new auto-linked GitHub URL/UI unless the user unlinks and relinks.
Contributor
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Other Observations (not in diff)No additional issues found outside the diff. Files Reviewed (5 files)
Reviewed by gpt-5.4-20260305 · 377,160 tokens |
6 tasks
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
https://github.com/<username>derived from the OAuthdisplay_name, overriding any manually setgithub_url/connected-accountswhen GitHub is OAuth-linked, fully excluding the field from state, validation, and mutationgithub_urlis preserved in the DB and resurfaces if the user unlinks GitHubBlocked by
display_namecolumn touser_auth_provider(required migration)Test plan
https://github.com/<login>/connected-accountsgithub_urlresurfaces in both card and edit modal