Checkpoint: NIP-46 signer handshake fix

This commit is contained in:
Avi 2026-08-24 20:54:09 -05:00
commit b21678fafb

View file

@ -1,4 +1,66 @@
# Checkpoint — Aurora rename + dropdown fix (2026-08-24) # Checkpoint — NIP-46 signer handshake fix (2026-08-24)
A stopping point you can return to if this session is closed. Everything below was
verified green at the moment this file was written.
## Where things are
- Project: `/home/avi/Projects/Nostr_Keynctr`
- Git repo: `master` @ `64ad94d` ("Signer: listen before announcing so the
handshake reply is not lost"). Before it: `dd50b24` (Aurora rename +
dropdown fix), `ecb666b` (frosted-glass look), `bfe14f0` (glass build fix).
- Working tree: clean apart from this checkpoint update. `concept3.svg` deleted
and `KeynectrAppIconPossibility02.jpeg` untracked remain as the user had them.
## What was completed
1. **Root-caused the "Yakihonne never leaves the QR screen" bug (`64ad94d`).**
Reproduced with a reference NIP-46 client harness over live relays
(`/tmp/opencode/nc-client`): the app's announcement arrived, the client's
`ack` + `get_public_key` were answered to nobody — the signer task created
its notification receiver *after* publishing the announce, so the client's
millisecond-fast handshake reply landed in the broadcast channel before any
receiver existed and was dropped. Client waits forever → stuck QR.
Fix: open `client.notifications()` immediately after adding relays, before
connect/subscribe/announce. Post-fix round-trip PASSES end-to-end
(announce → ack → get_public_key → pubkey returned).
2. Relay observations from testing: nos.lol 502 today; nostr.wine 403
(auth/paid); nostr.l484.com sends NIP-42 AUTH challenges; healthy:
relay.primal.net, nostr.mom, soloco.nl.
## Commits added most recently
- `64ad94d` Signer: listen before announcing so the handshake reply is not lost
## Verification commands run (all green)
Rust (repo root): cargo test 113 passed; clippy (pre-existing profiles.rs
warnings only); fmt clean; release binary rebuilt with the fix.
Frontend (`frontend/`): npm test 92 passed; typecheck, lint, format clean.
End-to-end: reference NIP-46 client + `keynectr signer connect <uri>` over
wss://nostr.mom, relay.primal.net, soloco.nl — full handshake PASS.
## How to use / reproduce
GUI: `cd ~/Projects/Nostr_Keynctr/frontend && npm start` → Signer → paste a
client's nostrconnect:// link → approve requests. With Yakihonne: choose its
remote-signer/connect option, copy its link into Keynectr within its timeout;
Yakihonne should now switch from the QR screen to the logged-in state.
Harness (if ever needed again): `/tmp/opencode/nc-client` — `nc-client`
prints a nostrconnect URI to /tmp/opencode/uri.txt and PASSes on round-trip;
run `target/release/keynectr signer connect $(cat /tmp/opencode/uri.txt)`.
## Notes & next steps
- If a client is still slow, remaining edge: relays that reject kind 24133 or
need auth can starve the handshake — consider surfacing per-relay connect
status in the Signer UI later.
- Pre-existing clippy warnings in src/profiles.rs untouched by request.
---
# Older checkpoint — Aurora rename + dropdown fix (2026-08-24)
A stopping point you can return to if this session is closed. Everything below was A stopping point you can return to if this session is closed. Everything below was
verified green at the moment this file was written. verified green at the moment this file was written.