Write the author display name alongside the service ID - #1
Merged
dtkav merged 1 commit intoAug 17, 2026
Merged
Conversation
Comment marks carried only author="<relay-user-id>", so the display name existed nowhere in the file and was unrecoverable without Relay's user directory. Marks now carry authorId="<id>" author="<name>", the pair the reader already resolves for early-build marks.
petergaultney
marked this pull request as ready for review
August 17, 2026 16:30
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.
🍋:
Comment marks record the author as
author="<service-id>", so a mark's display name lives only in the identity provider's user directory. Read a vault without that provider - Relay uninstalled, an export, a plain git checkout, or someone else's clone - and every comment shows a raw user ID with no way to recover who wrote it. The ID is the right thing to key identity on, but it is not durable as a record on its own.This writes the display name alongside it:
{{authorId="<id>" author="<name>">>...<<}}.That pair is not a new format.
getReviewerIdentityForMarkinsrc/main.tsalready reads it, with a comment noting that early Relay Comments builds wrote an ID inauthorIdand a display name inauthor, and preferring the ID when both are present. Metadata parsing is generickey="value", so the attribute needed no parser change. Only the writer had narrowed to ID-only; this restores the pair, and nothing downstream needed touching.Marks stay single-attribute where the second value would add nothing: no name available, or a name equal to the ID (the literal-display-name case, where the ID is the name).
Details
formatAuthoredCommenttakes an optionalauthorName. Both values go through onesafeAttributeValueguard, so an unsafe value is dropped rather than escaped - same conservative handling the ID already had. An unsafe ID with a safe name now degrades toauthor="<name>"instead of an unattributed comment; previously the ID was the only channel, so there was nothing to fall back to.formatCommentMarkuppassesidentity.name, suppressed whenidentity.source === "fallback"so the placeholder "Unknown author" is never written into a file.Not addressed here:
datehas the same gap in the other direction.formatMarkDatereads and formatsmetadata.dateand the sidebar renders it, but the writer never emits one, so it only appears on hand-written or early-build marks. Happy to add it in a separate change if you want timestamps to be durable too.