fix(profile): display-name in QR title, verify NIP-05/lud16, normalize CLINK CTA weight#423
Merged
spe1020 merged 1 commit intoJun 10, 2026
Conversation
…ize CLINK CTA weight - User profile "...'s Profile" modal title now prefers displayName / display_name before falling back to the short name, so users see their full name instead of the username handle. - NIP-05 Identifier and Lightning Address inputs in the profile editor now show live verification: empty -> nothing, regex-invalid -> red warning + helper text + Save disabled, regex-valid -> spinner while fetching, resolved -> green check, resolved-but-wrong -> amber warning with a helper message. NIP-05 hits the domain's /.well-known/nostr.json and confirms the returned pubkey matches the signed-in user; lud16 hits /.well-known/lnurlp and checks the response is a valid LNURL payRequest. Fetches are debounced 500 ms and aborted on the next keystroke. - NofferButton CTA variant dropped from font-weight 700 to 500 so it matches the Send Zap / Copy npub buttons it sits next to on the profile page. The inline pill variant keeps its heavier weight because it competes with body text and needs the punch.
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.
Three small, related polish fixes on the profile surface.
1. Use display name in the profile QR/share modal title
The QR/share modal that opens from the profile page (e.g.
daniel's Profile) was readingprofile.name(the short handle) instead of the full display name. Now it prefersdisplayName→display_name→name, so the title readsThe Daniel 🖖's Profilefor users who have a display name set.src/routes/user/[slug]/+page.svelte— one-line change.2. Verify NIP-05 and Lightning Address inputs in the profile editor
The profile editor's NIP-05 and Lightning Address fields previously accepted anything — including malformed addresses like
daniel@nodestrichor syntactically-valid-but-wrong ones likedaniel@nodestrich.co(which has a real TLD but doesn't map to your pubkey).Each input now has five states with clear visual indication:
foo@bar)https://<domain>/.well-known/nostr.json?name=<local>and only goes green if the returnednames[local]matches the signed-in pubkey. Otherwise it shows a specific reason (<domain> has no entry for "<local>"/Domain points to a different pubkey than yours/Could not reach <domain> (<status>)).https://<domain>/.well-known/lnurlp/<local>and checks the response is a valid LNURLpayRequestwith acallback.Fetches are debounced 500 ms and aborted on the next keystroke. The Save button is disabled only on regex-invalid (hard fail);
unresolvedis a soft warning because some valid lnurlp endpoints don't send CORS headers and would otherwise be unfairly blocked.src/components/ProfileEditModal.svelte— adds verification handlers, status state, and per-state markup on both inputs.3. Normalize the CLINK CTA weight on the profile page
<NofferButton variant="cta">on the profile page was usingfont-weight: 700(bold) while the Send Zap and Copy npub buttons it sits next to use Tailwindfont-medium(500). The CLINK button visually dominated the row. Moved the heavy weight to the inline pill variant (where it competes with body text and needs the punch) and set the CTA variant to 500 so the row reads as peers.src/components/clink/NofferButton.svelte.Test plan
name@, see red ⚠ + helper text; type a real NIP-05 you own, see green ✓; type one mapped to someone else's domain, see amber ⚠ + "Domain points to a different pubkey than yours"/.well-known/lnurlp