Skip to content

fix(desktop): separate Nostr name from display name - #3342

Open
TheAngryPit wants to merge 7 commits into
block:mainfrom
TheAngryPit:codex/fix-nostr-profile-fields
Open

fix(desktop): separate Nostr name from display name#3342
TheAngryPit wants to merge 7 commits into
block:mainfrom
TheAngryPit:codex/fix-nostr-profile-fields

Conversation

@TheAngryPit

@TheAngryPit TheAngryPit commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • add an editable Nostr name/handle alongside the richer display_name in first-community onboarding and Profile settings
  • carry both fields through the Desktop TypeScript and Tauri contracts while keeping the public key as canonical identity
  • patch the existing raw kind-0 object so unrelated and unmodeled metadata survives profile edits, failing closed when prior metadata is malformed
  • keep cache, E2E bridge, compatibility fallbacks, avatar handling, canonical post-save readback, and agent activity labels aligned with the two-field model
  • add focused Rust, unit, and browser regression coverage, including delayed profile seeding after an explicit avatar clear

Related issue

Fixes #2796

Related preservation work: #2534, #2545, #2606.

Root cause

Buzz Desktop labels the onboarding value as a username but publishes it as display_name. The supported UI has no independent name field, even though existing metadata can contain one. The prior update path also reconstructed a modeled subset of kind-0 metadata, which could discard unrelated fields while adding the missing editor.

This patch treats name and display_name as independent metadata and updates the existing raw JSON object before signing the replacement kind-0 event. Compatibility fallback from display_name to name is limited to presentation boundaries, including sidebar, identity lookup, profile activity, and fallback agent-session labels.

User impact

Users can represent a short Nostr handle separately from their human-facing display name without changing keys, roles, authentication, relay admission, or NIP-05. Existing display-name-only and name-only profiles remain compatible, and editing one modeled field preserves the other fields.

Testing

Fresh post-rebase evidence at abeeb060a against upstream/main 63496cc1d:

  • git diff --check upstream/main...HEAD
  • 3,786/3,786 Desktop frontend tests passed
  • Desktop TypeScript typecheck passed
  • Biome checked 1,696 Desktop files with no errors
  • Desktop file-size ratchet passed with CHECK_FILE_SIZES_BASE=upstream/main
  • focused name-only agent presentation regressions passed: 6/6
    • profile activity uses the raw name
    • fallback agent session uses the raw name
    • existing activity return-target tests remain green

The pre-rebase branch also passed the complete just desktop-ci gate, focused Rust profile tests, and four focused Playwright profile/onboarding tests. Fresh GitHub checks on the rebased branch are the authority for the full current snapshot.

The patch is currently test_proven for the Desktop frontend and focused profile paths. It does not claim supported-path runtime or end-to-end signed-event proof.

Manual test plan

  1. Create or import a profile containing different name and display_name values.
  2. Open Profile settings and confirm both controls display the exact stored values.
  3. Edit only the handle, save, reopen settings, and confirm the display name, avatar, about, NIP-05, and unrelated kind-0 metadata remain unchanged.
  4. Edit only the display name and repeat the preservation check.
  5. Run first-community onboarding with distinct handle and display-name values and inspect the signed kind-0 readback.
  6. Clear the avatar before a delayed profile seed resolves and confirm the old avatar is not restored.
  7. Open activity for a name-only NIP-OA agent without a managed/relay agent record and confirm its name is shown instead of Agent.

Non-goals

  • NIP-05 provisioning or verification UI
  • globally unique usernames
  • key, signer, role, authentication, or relay changes
  • public-relay profile replication
  • database migrations

@TheAngryPit

Copy link
Copy Markdown
Author

Profile settings screenshots

Before — Buzz v0.5.0

The supported Profile editor exposes only display_name.

before-v0.5.0-profile

After — PR #3342

The same editor exposes an independent Nostr name handle while retaining the richer display name and profile description.

after-pr-3342-profile

@TheAngryPit
TheAngryPit marked this pull request as ready for review July 28, 2026 21:36
@TheAngryPit
TheAngryPit requested a review from a team as a code owner July 28, 2026 21:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cec957d304

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/nostr_convert.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdc5880479

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/nostr_convert.rs Outdated
@TheAngryPit
TheAngryPit force-pushed the codex/fix-nostr-profile-fields branch 2 times, most recently from 8b89f7f to 02e127c Compare July 29, 2026 18:57
@TheAngryPit

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02e127c8c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/nostr_convert.rs Outdated
Signed-off-by: Vitor Cepeda Lopes <vitor@vitorcepedalopes.com>
Signed-off-by: Vitor Cepeda Lopes <vitor@vitorcepedalopes.com>
Signed-off-by: Vitor Cepeda Lopes <vitor@vitorcepedalopes.com>
Signed-off-by: Vitor Cepeda Lopes <vitor@vitorcepedalopes.com>
@TheAngryPit
TheAngryPit force-pushed the codex/fix-nostr-profile-fields branch from 02e127c to 3211052 Compare July 30, 2026 08:27
Signed-off-by: Vitor Cepeda Lopes <vitor@vitorcepedalopes.com>
@TheAngryPit
TheAngryPit force-pushed the codex/fix-nostr-profile-fields branch from 3211052 to abeeb06 Compare July 30, 2026 08:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abeeb060a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/profile/ui/UserProfilePanelUtils.ts Outdated
Signed-off-by: Vitor Cepeda Lopes <vitor@vitorcepedalopes.com>
Signed-off-by: Vitor Cepeda Lopes <vitor@vitorcepedalopes.com>
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.

[Bug] Desktop profile conflates Nostr name with display name

1 participant