fix(#611): apply Gemini review, accept our own channel format on paste
Two accepted findings from the standards#145 adversarial review. Finding 4, the sharp one: the app emitted the compact <key:type:name> card but could not parse it. A user copying a card out of a channel and pasting it into Add by public key would have been rejected by the app that produced it. Adds Contact.fromChannelShare and tries it after fromShareUri in the dialog, so both real formats are accepted. The parser splits on the FIRST TWO colons and takes the remainder as the name, because names carry colons, spaces, emoji and CJK. It also finds a card embedded in a longer message, which is how one actually arrives, since people caption them. Rendering a received card as a tappable affordance remains #610; this only covers text pasted or scanned into the add flow. #610 is correspondingly smaller now. Finding 2, performance: resolveContactVerification ran an O(N) message scan from a widget build inside a ListView. Now scans newest-first, since a delivered message is overwhelmingly likely to be recent, and advert-verified contacts still return on a single comparison without touching the message list. A lastMessageAt == epoch shortcut was written, then removed after checking _setContactLastMessageAt: it maintains that field only for advTypeChat, so a key-added repeater that had been messaged would have shown the wrong badge. A cheap wrong answer is worse than a slightly slower right one, and the rejected approach is documented in place. Epic #619. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>fix/652-release-prerelease-flag
parent
a88c24f44f
commit
06f7e347fd
Loading…
Reference in new issue