Repository navigation
Conversation
"Your name" is optional at setup and in the profile, but the editor only published presence when the user had a display name, and the relay derived the session identity from the raw display name. A user without one published no presence at all: peers saw no cursor or selection ring, and the "someone else is editing" guards never fired for them. userDisplayLabel (src/core/users/displayName.ts) returns the trimmed display name, else the email address. The relay's session identity and the editor's published presence both use it, so they keep matching the anti-spoofing check; collaborators now see the email of a user without a display name. The account menu, profile tab, activity widget, users table, audit labels and UserAvatar use the same helper, replacing displayUserName and the inline fallbacks. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Mineorey
marked this pull request as ready for review
October 12, 2026 15:51
This branch has not been deployed
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
What. Adds
userDisplayLabel(user)insrc/core/users/displayName.ts. It returns the trimmed display name, or the email address when there is none. It is now used in these places:server/collab/socket.ts)CanvasRootpublishesUserAvatar(alt text and initial)displayUserName(users utils) and the inlinedisplayName.trim() || emailfallbacks are removed.Why. "Your name" is optional at setup and in the profile.
usePublishEditorPresencepublishes nothing when the name is empty, and the relay built its session identity from the raw display name. As a result, a user without a display name had no presence at all: peers saw no cursor and no selection ring, and the "someone else is editing" guards never fired for that user. The relay only forwards presence whose identity matches the session, so client and server have to use the same label. Both now useuserDisplayLabel.Impact. Collaborators now see the email address of a user who has no display name, in presence and in the existing name displays. The anti-spoofing check is unchanged: it still compares the full identity. No schema or data changes.
Note:
server/handlers/cms/dashboard/activity.tshas an unrelated module-local helper with the same name (nullable row columns). I left it alone; it could be folded in later if that's wanted.Verification
Run in the project's Bun dev container on this branch:
bun run build: passesbun test --timeout 60000: 7122 pass, 2 fail. Both failures are environment-related and also fail onmainin the same container: the circular-dependency check hits its internal 15 s timeout, and thepixel-art-icons.gitignorefreshness check needsgit, which the container doesn't have.bun run lint: cleancollabSocket.test.ts(new case: a user without a display name gets their email as the presence name)collabRelayIntegration.test.ts(expected identities now useuserDisplayLabel)src/__tests__/users/displayName.test.tsChecklist
docs/features/site-shell.md: session identity, and that collaborators see the email).For transparancy: Generated with Claude