[Bug] Desktop profile conflates Nostr name with display name
Problem
Buzz Desktop presents the first-community profile field as Your username
but persists that value as Nostr display_name. The same value is later shown
under Settings → Profile → Display name.
The Desktop profile model and Tauri command can read and preserve an existing
Nostr name, but neither onboarding nor Profile settings lets a user create or
edit it. A new user therefore cannot represent the standard two-field profile:
{
"name": "alice",
"display_name": "Alice Example"
}
This affects new and existing Desktop users who want a short Nostr name and a separate richer display name. It also teaches the user that they are choosing a username when the emitted field has different semantics.
The canonical identity remains the public key. This issue is about profile metadata and UI semantics, not account identity or authorization.
Evidence And Reproduction
Environment
- Observed release: Buzz Desktop
v0.4.25 - Release commit:
e8105d1446834f522c75d628bf1d9e77c9c077a4 - Observed OS: macOS
- Current
mainrechecked at:b8510ede1b52ebe87ed3cf18cf0b2590a86b2245 - Supported path: first-community onboarding followed by Settings → Profile
Minimal reproduction
- Start first-community onboarding with an identity that has no profile event in that community.
- At Build your profile, enter
aliceinto the field labeled Your username. - Complete onboarding.
- Open Settings → Profile.
- Observe that the same value is labeled Display name, with no separate
nameor username control. - Inspect the current source or capture the signed kind-0 event. The onboarding
payload supplies
displayName: "alice"; it does not supplyname.
Current result
- Onboarding labels the input as a username.
- The input is stored as
display_name. - Settings correctly labels the stored value as Display name.
- A pre-existing kind-0
nameis preserved by Desktop edits but cannot be created or changed through the supported Desktop UI.
Evidence classification
Observed
- On Buzz Desktop
v0.4.25for macOS, first-community onboarding requested a username. - After onboarding, Profile settings displayed the resulting value as
Display name and exposed no separate username/
namefield.
Code-proven
desktop/src/features/onboarding/ui/CommunityOnboardingFlow.tsxlabels the input Your username, uses username-oriented HTML attributes, and callsupdateProfile({ displayName: ... }).desktop/src/features/settings/ui/ProfileSettingsCard.tsxedits onlydisplayName, avatar, and about; it labels the field Display name.desktop/src/shared/api/types.ts::UpdateProfileInputhas nonamemember.desktop/src-tauri/src/commands/profile.rs::update_profileaccepts nonameargument. It only carries forwardnamewhen one already exists in the current kind-0 content.- The same behavior remains present on current
mainat the SHA above.
Documented
- NIP-01 defines
namein kind-0 user metadata. - NIP-24 defines
display_nameas a richer alternative toname, states thatnameshould still be set, and deprecates the literalusernamekey in favor ofname. - Review on PR #2088 rejected presenting the existing display-name field as a username unless a real username model was introduced separately.
Not yet runtime-proven in this report
- A redacted raw kind-0 capture from the observed production community has not
been attached. The payload-to-field mismatch is code-proven on both the
release commit and current
main.
Expected Behavior
Buzz Desktop should represent Nostr profile metadata without conflating the two fields:
nameis the short Nostr name/handle.display_nameis the richer human-facing name.- The supported Desktop profile flow allows a user to set and later edit both.
- UI labels describe the field that is actually signed and published.
- The public key remains the canonical identity; neither field is presented as globally unique.
- Editing either field preserves the other field and all unrelated kind-0 metadata.
The exact layout is a product decision. The required outcome is semantic and wire-level agreement between onboarding, settings, the update contract, and the signed kind-0 event.
Scope
- Buzz Desktop first-community profile onboarding.
- Buzz Desktop Profile settings.
- Shared Desktop profile/update types and Tauri command wiring needed to carry
name. - Signed kind-0 profile construction for the current user's supported Desktop path.
- Focused unit/integration/E2E coverage for the two-field round trip.
Owner boundary: block/buzz Desktop and its local Tauri profile command.
Non-Goals
- NIP-05 domain provisioning or verification UI.
- Making
nameglobally or community-wide unique. - Changing public-key identity, community owner/admin roles, authentication, or signing.
- Publishing profiles to additional public relays.
- Adding relay or database migrations.
- Modeling every optional kind-0 field.
- Reimplementing the general metadata-preservation work tracked by #2534 and its open PRs.
- Changing managed-agent profile semantics.
- Broad profile-page redesign, unrelated onboarding polish, or cleanup.
Acceptance Criteria
- [ ] A user can set both
nameanddisplay_namethrough supported Buzz Desktop profile flows. - [ ] A profile saved as
name = "alice"anddisplay_name = "Alice Example"emits a signed kind-0 containing those exact fields. - [ ] Reopening Profile settings displays both values in controls with semantically correct labels.
- [ ] Editing only
namepreservesdisplay_name, picture, about, NIP-05, and unmodeled kind-0 fields. - [ ] Editing only
display_namepreservesnameand the same unrelated metadata. - [ ] An existing profile containing only
display_namecontinues to load and can be upgraded without silent data loss. - [ ] An existing profile containing both fields round-trips without one field being promoted into or replacing the other.
- [ ] Repeated saves with unchanged values are idempotent at the profile-content level and do not delete unrelated metadata.
- [ ] Validation errors fail without publishing a partial replacement event or showing unsaved values as canonical.
- [ ] The UI does not imply that
nameis globally unique or authoritative over the public key. - [ ] Existing avatar, about, key import, community onboarding, and profile navigation behavior remains compatible.
Validation Plan
- Add focused tests for Desktop profile update serialization with independent
nameanddisplay_nameinputs. - Add a regression test proving that updating either field preserves the other and unmodeled kind-0 metadata.
- Add Desktop E2E coverage for:
- first-community onboarding;
- Profile settings edit/readback;
- exact raw kind-0 content after each supported path;
- returning profiles with only
display_name; - returning profiles with both fields.
- Run the repository-required Desktop checks and focused E2E tests.
- Run
just cibefore proposing implementation for merge. - Record exact-head test evidence in the implementation PR. Auto-review belongs to that PR and is not pre-claimed by this issue.
Security And Compatibility
- No private key export or new signer is required; the existing local signer remains authoritative.
- No auth scopes, permissions, community roles, secrets, network exposure, or relay admission rules should change.
- No database migration should be necessary because the source of truth is the signed kind-0 event.
- Existing profiles must remain readable without forced migration.
- The implementation must coordinate with the resolution of #2534 so a new field editor does not reintroduce destructive whole-profile rewrites.
- No personal names, public keys, private community content, credentials, or unredacted production event payloads are required in tests or issue evidence.
References
- NIP-01 — Basic protocol flow and kind-0 metadata: https://github.com/nostr-protocol/nips/blob/master/01.md
- NIP-24 — Extra metadata fields: https://github.com/nostr-protocol/nips/blob/master/24.md
- Buzz issue #2534 — destructive kind-0 rewrite and unexposed
name: https://github.com/block/buzz/issues/2534 - Buzz PR #2545 — metadata-preservation implementation: https://github.com/block/buzz/pull/2545
- Buzz PR #2606 — competing metadata-preservation implementation; explicitly
leaves exposing
--nameout of scope: https://github.com/block/buzz/pull/2606 - Buzz PR #2088 review — distinguishes display name from a real username model: https://github.com/block/buzz/pull/2088#pullrequestreview-4729588607
- Buzz PR #2118 — later onboarding change that reintroduced username copy while retaining the display-name persistence path: https://github.com/block/buzz/pull/2118
Could a maintainer please approve the CI workflow and review the implementation in #3342?
We have now completed the implementation and a focused review/triage pass for this issue against the current upstream main.
What the PR covers:
- keeps Nostr
nameanddisplay_nameas independent fields through the desktop read/write path; - allows either field to be set or cleared without overwriting or resurrecting the other;
- preserves unknown fields in the existing kind-0 profile event;
- handles blank/whitespace presentation values consistently;
- uses the intended owner-label precedence: NIP-05, then
display_name, thenname, then the pubkey fallback; - makes consecutive profile updates monotonic so a rapid set/clear sequence cannot lose the newer event;
- prevents a cleared
namefrom being restored from stale lookup data.
Review and proof completed:
- all GitHub review threads are resolved;
- a final independent high-scrutiny review reported no remaining actionable findings;
pnpm test: 3,790/3,790 passing across 58 suites;pnpm typecheck: passing;pnpm checkandgit diff --check: passing;- focused Playwright profile flows: 2/2 passing;
- the broader local desktop E2E run passed 89/90; the remaining failure was an unrelated existing Windows URL-representation expectation (
buzz-media://localhost/...versushttp://127.0.0.1:54321/...) outside this PR's changed surface; - DCO, Semgrep OSS, and zizmor currently pass on the PR.
The upstream CI workflow for the current head is still waiting for approval: https://github.com/block/buzz/actions/runs/30538179001
Would someone with maintainer access be able to approve that workflow and take a look at #3342? Is there any additional focused evidence or narrower change you would like before considering it?