Skip to content

fix(collab-c5): F-165 — your name on your own comments, not "Anonymous"#116

Merged
th3-br41n merged 1 commit into
mainfrom
feat/f165-display-name
Jul 8, 2026
Merged

fix(collab-c5): F-165 — your name on your own comments, not "Anonymous"#116
th3-br41n merged 1 commit into
mainfrom
feat/f165-display-name

Conversation

@th3-br41n

Copy link
Copy Markdown
Contributor

Part of 0.2.1. A posted comment's author rendered as "Anonymous" — Notes + Journal passed authorName={localPresenceName()}, a renderer-local localStorage pref that nothing sets. The signed vault profile (roster.self().displayName, Collab-C6) is the real identity and was already wired into the ShareDialog member list + existing comments; the optimistic author echo of a just-posted comment was the one path still on the localStorage default.

  • @brainstorm/sdk/self-display-name — a small hook: prefer the profile displayName, fall back to the short key fingerprint when unset (honest — it's your key, not "Anonymous"), and only fall back to localPresenceName() when the roster is unavailable (older shell / no roster.read).
  • Notes + Journal comment panels now pass the resolved self name.

Also pre-stages presence (same self-name resolution).

Tests: +5 (profile name / fingerprint fallback / whitespace trim / null roster / rejected self()). Notes+Journal+SDK suites green (3094). Touched apps + packages typecheck clean (the pre-existing contacts lexical worktree gap is unrelated).

🤖 Generated with Claude Code

A posted comment's author rendered as "Anonymous": Notes + Journal passed
`authorName={localPresenceName()}`, which reads a renderer-local
localStorage pref that nothing ever sets. The signed vault profile
(`roster.self().displayName`, Collab-C6) is the real identity and was
already wired into the ShareDialog member list + existing comments — the
optimistic author echo was the one path still on the localStorage default.

- packages/sdk/src/use-self-display-name.ts — a small React hook:
  prefer the profile displayName, fall back to the short key fingerprint
  when it's unset (honest — it's your key, not "Anonymous"), and only
  fall back to localPresenceName() when the roster is unavailable (older
  shell / no `roster.read`). New `@brainstorm/sdk/self-display-name`
  subpath + vitest alias.
- Notes + Journal comment panels now pass the resolved self name.

+5 tests (profile name / fingerprint fallback / whitespace trim / null
roster / rejected self()). Notes+Journal+SDK suites green (3094);
touched apps + packages typecheck clean (pre-existing contacts `lexical`
worktree gap unrelated).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@th3-br41n th3-br41n merged commit 59657a2 into main Jul 8, 2026
3 checks passed
@th3-br41n th3-br41n deleted the feat/f165-display-name branch July 8, 2026 15:13
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.

1 participant