File a person under the name this event gave them - #328
Merged
Conversation
Two names exist for one person. `participant.display_name` is per-event and `user.name` is the account, and renaming a speaker for one conference writes the first while deliberately leaving the second alone. The deliverables library, the file version history, the comment thread and the submissions grid all read the account. So a speaker renamed on this event kept appearing under whoever her account said she was — on her own uploads, in her own comment thread, and on three of her submission rows. An organizer reading a file library could not tell which speaker produced which artefact, which is the whole point of per-speaker deliverable tracking. `eventPersonName` is now the one place that decides: this event's name, then the account name, then the address. The address rather than a blank because "who uploaded this" has to have an answer even for an account that never filled in a name. Comments are the awkward case. `file_comment.author_name` is written at post time, so every comment posted before a rename carries the old string in the row. `listFileComments` re-resolves it from `author_user_id` instead, which fixes already-posted comments without a backfill; the stored copy is kept as the fallback for an author whose account is gone, so deleting an account still does not blank the thread it posted in. The joins are left, not inner: an organizer who uploaded on a speaker's behalf may hold their role through membership and have no participant row, and dropping their name off the version history would be a worse answer than their account name. `participant_event_user` is unique, so no row fans out. Found by `sbek` CNT-S3 against run 2026-08-17T05-46-05.
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.
sbekCNT-S3, run2026-08-17T05-46-05(major):What was actually happening
There are two names for one person, and they are both correct.
participant.display_nameis what this event calls them;user.nameis the account. Renaming a speaker for one conference writes the first and deliberately leaves the second alone — that is the point of a per-event name.Every surface named in the finding read the account.
lib/services/content.tsalready resolved this properly (displayName ?? userName ?? email); the files library, the version history, the comment thread and the submissions grid did not.The fix
eventPersonNameinlib/person-name.tsis now the single place that decides the precedence, so the surfaces cannot drift apart again.lib/services/files.ts— the file index carriesownerDisplayNamealongside the account name; both uploader lookups go through a sharedeventPeoplejoin.listFileCommentsre-resolves the author fromauthor_user_idat read time.file_comment.author_nameis written at post time, so comments already posted carry the stale string in the row; re-resolving fixes them without a backfill. The stored copy stays as the fallback for an author whose account is gone, so deleting an account does not blank the thread it posted in.lib/services/review.ts— the submissions grid, the reviewer queue and the submission detail all prefer the event's name for the submitter.The joins are left, not inner: an organizer who uploaded on a speaker's behalf may hold their role through membership and have no participant row, and dropping their name off the version history would be a worse answer than their account name.
participant_event_useris unique on(event_id, user_id), so nothing fans out.Tests
lib/event-person-name.test.ts, 10 cases: the event's name beats the account; whitespace in either is not a name; the address is the last resort;commentAuthorNamere-resolves a comment posted before a rename, and keeps the stored name for an author who no longer resolves or was never recorded.lib/services/file-index.test.tsgains a case asserting a renamed speaker's headshot is filed under the event's name in both the owner and uploader columns.lint,typecheck,test(2044 in 190 files),build,docs:openapi,docs:mcpall clean.Not merged and not deployed.