Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to select full Event ID when replying to multiple Event ID's with six leading zeros (Eg: PoW 25 event) #63

Open
Sakhalinfox opened this issue Jan 3, 2023 · 1 comment

Comments

@Sakhalinfox
Copy link

Issue Description

I created two PoW post/reply events consisting of 6 leading zeros '000000' in the event ID by performing a --difficulty PoW of 25 leading zero bits. Nostr_Console currently displays event ID's of posts and replies of up to 6 characters in length. So, if I had to reply the third time and entered '000000' in the event ID input where it says -'Type id of event to reply to (leave blank to make a new post; type x to cancel)' it will only reply to the latest Event ID that begins with '000000', instead of informing the user that it found duplicate event ID's that began with '000000'. Ideally, the console should provide the user with the full length event ID's of the duplicate event ID's so that the user can select and copy/paste them for their next reply/response as a choice.

Steps to Reproduce

  1. Create A new PoW 25 leading zero post. This should display the event ID '000000'
    image

  2. Reply to the above post with another PoW 25 leading zero reply. This should display the event iD '000000' for the reply post.
    image

  3. Create another reply post, Nostr_Console should ask you to input the Event ID to reply to. Enter '000000'. However, it responds directly to the reply created in point 2 instead of providing the user the option to view the complete event ID of the events that have duplicate event ID's that begin with '000000' and selecting them to reply to the appropriate one.
    image

Expected Result

Provide the user a list of duplicate Event ID's that have the same initial 6 characters of the Event ID. This way the user can select, copy/paste the entire Event ID to respond to the right post that they desire.

I feel one way to handle this would be to also show the last 6 characters of the event ID apart from the beginning 6 separated with a delimiter like ':' (colon) or ellipses '....' Eg: 000000:25436d or 000000...25436d. The user can then copy that and Nostr_Console could accept that shortened event ID as an input for replying to posts or creating posts.

Example reproduction details
Event ID: 0000000862cc44026e6609e5886c7384dc6c237a43739d2a0171d2046425436d
Note ID: note1qqqqqzrze3zqymnxp8jcsmrnsnwxcgm6gdee62spw8fqgep9gdks4x9d3n

Test Environment Details

  • OS: Arch Linux
  • Nostr_Console version: Main Branch latest Git commit (v0.3.4-beta)
  • Execution Method: Docker
@vishalxl
Copy link
Owner

vishalxl commented Jan 3, 2023

  • there should be a setting to display N number of digits of event id
  • if more than one even have same prefix, app should inform user

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

No branches or pull requests

2 participants