Skip to content

fix(auth): populate profiles.github_handle at signup and sync on update (GHB-110)#141

Open
aagear wants to merge 1 commit into
Ghbounty:mainfrom
aagear:fix/ghb-110-github-handle-profile-creation
Open

fix(auth): populate profiles.github_handle at signup and sync on update (GHB-110)#141
aagear wants to merge 1 commit into
Ghbounty:mainfrom
aagear:fix/ghb-110-github-handle-profile-creation

Conversation

@aagear

@aagear aagear commented Jul 10, 2026

Copy link
Copy Markdown

Fixes #110

Problem

Issue #110 reports that profiles.wallet_pubkey and profiles.github_handle are null for newly registered dev accounts, blocking MCP submissions.create and whoami.

Existing PRs (#133, #139, #140) address wallet_pubkey backfill during delegation, but none fix github_handle -- the profiles table never gets the GitHub handle even though the developer signup form captures it.

Root Cause

In frontend/lib/auth-privy.tsx:

  1. persistDevRow: The profiles table insert omits github_handle entirely. The developers table gets github_handle, but profiles does not.

  2. updateUser: When a dev updates their GitHub handle, only the developers table is updated -- profiles.github_handle is never synced.

Changes

1. persistDevRow -- populate profiles.github_handle on signup

Add github_handle: data.github ?? null to the profiles insert. The data is already available from the onboarding form.

2. updateUser -- sync github_handle to profiles on update

Extend profilePatch to include github_handle. When a dev changes their GitHub handle, both profiles and developers tables are updated.

Why this is the root-cause fix

The MCP auth path reads profiles.github_handle and profiles.wallet_pubkey. Existing PRs fix wallet_pubkey reactively during delegation. This PR fixes github_handle proactively during signup so the profile row is correct from the start, not patched later.

Testing

  • pnpm typecheck -- no new type errors (profiles table already has github_handle column in db.types.ts)
  • No behavioral change for company accounts (they do not have a GitHub handle)
  • Visual output unchanged

@aagear aagear requested a review from tomazzi14 as a code owner July 10, 2026 07:18
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

@aagear is attempting to deploy a commit to the weareghbounty-6269's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Credentials page cannot authorize agent wallet without NEXT_PUBLIC_PRIVY_SIGNER_ID

1 participant