Repository navigation
Copy the staff roster name onto the account at sign-in - #47
Open
akulsharma1 wants to merge 1 commit into
Open
akulsharma1 wants to merge 1 commit into
akulsharma1 wants to merge 1 commit into
Conversation
Accounts created by magic-link sign-in start with a null displayName; only attendee registration ever fills it in. Staff never register, so the admin site greeted them with "Welcome, null!". syncRosterRoles now copies staff.name into authInfo.displayName on sign-in, but only while displayName is null so a name set through registration is never overwritten. The admin home page and navbar also treat a missing name as empty instead of rendering "null". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying rp-monorepo with
|
| Latest commit: |
40231cd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d91fd53d.rp-monorepo.pages.dev |
| Branch Preview URL: | https://fix-staff-display-name.rp-monorepo.pages.dev |
advitagelli
approved these changes
Sep 3, 2026
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.
Problem
Staff added to the roster who log in to the admin site for the first time see "Welcome, null!" (e.g. Arthur). Magic-link sign-in creates their
authInforow withdisplayName = NULL, and the only code path that ever writesdisplayNameis attendee registration — which staff never go through.syncRosterRolescopied roles from the roster on sign-in, but not the name.Fix
magic-link-service.ts):syncRosterRolesnow reads the staff roster row (name included). When the email is rostered it grants STAFF as before, and also writesstaff.nameintoauthInfo.displayName— guarded with.is("displayName", null)so a name set through registration is never overwritten. This runs before the JWT is minted, so even the very first login gets a token with the correct name. Existing accounts (like Arthur's) self-repair on their next login; no backfill needed.Home.tsx,Main.tsx): the greeting and its animation gate use truthiness instead of== "", andMain.tsxcoerces the API'sdisplayNamewith?? ""before it enters the string-typed state, so a null can never render as the text "null" (also protects the navbar avatar).Tests
displayName: "Unregistered Staff").displayNamewins over the roster name.🤖 Generated with Claude Code