File a bookmark in a list from the edit sheet, with one signature not two #13
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/nip51-lists-012"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the NIP-51 report end to end, and adds the Update path — the branch laoc's real-Amber test actually took, which had no coverage at all.
What was broken
Every existing list test launches a share intent for a URL that is not bookmarked yet, so
startSavingfindsexisting == nulland the draft never runs withisUpdate = true. laoc, testing with Amber:Two causes, both on that branch:
saveDraftsigned a kind:39701 unconditionally. It is addressable, so re-publishing identical content replaces the event with itself: no gain, and it costs the one thing a user cannot ignore. Now skipped when the tags and content that would be signed match what is stored. The list sync still runs — ticking a chip changes the list event, never the bookmark — so it moved intofileInLists, shared by both save paths.published_atwas minted asnowon an update when the stored event carried none. This is what made cause 1 insufficient: the "identical" check could never be true. NIP-B0 defines the field as "the first time the bookmark was published", andnowis provably not that for an event that already exists — so this was inventing data as well as raising a prompt for it. Measured on laoc's own relays (haven.laoc.xyz + nos.lol): 6 of their 8 bookmarks carry nopublished_at, so this was the common case, not an edge.What it also carries
Everything already reported in #NIP-51 support and on the ngit issues, rebased onto
main(which now has #6–#11):543b520dropped the post-saverefresh()and, unlikecreateList/editList/deleteListin that same commit, put nothing backCan't lift flat errors— native SIGABRT on any bridge throw, including a plain user decline)RESULT_CANCELEDand being misread as a rejected signatureVerification
At
6a26aac, the head of this PR:started == expected)Mutations run against the two production changes, each asserted to have landed (
git diff --numstat) before being measured:adding_an_unchanged_bookmark_to_a_list_asks_for_one_signature_not_twopublished_atediting_a_bookmark_that_never_carried_a_published_at_does_not_invent_onea_bookmark_added_to_a_list_from_the_edit_sheet_shows_without_a_manual_refresh+ the signature testediting_a_bookmark_that_never_carried_a_published_at_does_not_invent_oneThree new tests drive the real gesture — pencil, tick, Update. They open the sheet only after the list fetch has landed, because
startSavingreads the pre-ticked set once and an empty one would make Update un-file the bookmark from every list it was already in. The signature count is read from the stand-in signer's own record of the payloads it was handed, so a prompt counts whichever code path raised it.Two things this does NOT settle
stash-0.12.0-bunker-relogin-debug.apk(no list fix) andstash-0.12.0-nip42-abort-debug.apk(has it) both shipped as versionCode 19 with different bytes and the same version string, so nothing on screen could tell them apart. This branch is versionCode 22. Awaiting laoc's confirmation of what they were running.Real-Amber confirmation on a real phone is still outstanding, as with #6. The emulator signs with a stand-in.
Landed on main via ngit (nostr is now the primary repo) — commit
924aa2balready on this branch. Closing rather than fighting the merge API for a cosmetic ribbon on what laoc has since called a mirror-only copy.Pull request closed