Skip to content

Conversation

@alltheseas
Copy link
Contributor

Summary

  • rename the note context menu action to “Copy nevent ID” so the tooltip matches
  • switch the copy handler to emit a NIP-19 nevent… string via nostr::nips::nip19::Nip19Event

@alltheseas
Copy link
Contributor Author

@kernelkind review - this is useless without relay hints. Great catch. Working on fixing.

pub action: NoteContextSelection,
}

const MAX_RELAY_HINTS: usize = 3;
Copy link
Member

Choose a reason for hiding this comment

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

why cap it at 3?

Copy link
Contributor

Choose a reason for hiding this comment

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

because we had an issue on the ios side of massive nevent links that look really bad

Comment on lines 33 to 34
/// We intentionally skip pool-based fallbacks: NIP-19 hints should only advertise relays
/// that are likely to store the event, and emitting no hint is preferable to speculating.
Copy link
Member

Choose a reason for hiding this comment

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

I would delete these lines, "where the note was actually observed" suffices IMO

ui.ctx().copy_text(bech);
}
}
NoteContextSelection::CopyNoteId => {
Copy link
Member

Choose a reason for hiding this comment

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

should either rename CopyNoteId -> CopyNevent or create a new CopyNevent if we want to preserve copying the note id specifically

NoteContextSelection::CopyLink => {
let damus_url = |s| format!("https://damus.io/{s}");
if note_author_is_selected_acc {
let relay_hints = relay_hints_for_note(note, txn);
Copy link
Member

Choose a reason for hiding this comment

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

can use this for both, not just if the note author is the selected account

Ok(json) => ui.ctx().copy_text(json),
Err(err) => error!("error copying note json: {err}"),
},
NoteContextSelection::CopyLink => {
Copy link
Member

Choose a reason for hiding this comment

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

should rename this from CopyLink -> CopyNeventLink. It's confusing, since elsewhere we have an action for copying a profile link

@alltheseas
Copy link
Contributor Author

@kernelkind had a go at addressing your comments

@jb55
Copy link
Contributor

jb55 commented Nov 20, 2025

we should keep it "Copy note id". "nevent id" is too technical and low level

changed terminology from "copy neventID" to "copy noteID"
@alltheseas
Copy link
Contributor Author

we should keep it "Copy note id". "nevent id" is too technical and low level

fixed in da12774

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.

3 participants