mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 11:48:24 +00:00
Seven findings, all verified against the code before acting. Crash: AudienceDetail keys its chips by pubkey with no dedup, while the Notifying row it replaces deduped via toSet(). pTags can legitimately repeat a pubkey — the voice-reply branch notifies the parent author on top of the notify list, and none of the three loadFromDraft paths called distinct() — so expanding the flap on such a draft throws a duplicate-key error. Fixed at both ends: the loaders dedupe, and the render guards. Removed the "No inbox relay" badge outright. It read LocalCache once inside a remember with no kind:10050 subscription, so on a cold start every member was badged and the badge never cleared. Worse, it overstated the consequence even when accurate: EventBroadcaster falls back to the recipient's linked relays when a DM relay list is missing, so the wrap is not undeliverable. A warning that fires for everyone and overstates its own severity is worse than none; doing it properly needs a subscription. Provenance: a list that un-mutes somebody recorded nothing for them, because they were not newcomers to pTags — so undoing the group chip removed their batch-mates and left them in a private note's audience. addToAudience now distinguishes "new to pTags" from "new to the effective audience" and claims both. Also: list ids are qualified by kind, since a people list and a follow pack may share a d tag and provenance keys on that string; a member in both the public and encrypted halves of a list is no longer badged as a disclosure risk they are not; the group chip counts only people who will actually be p-tagged, not muted ones; and the lock's haptic reports the direction it moved instead of always ToggleOn. The new tests caught a bug in this very commit: the newcomer filter used a mutating set membership check that reported every incoming pubkey as already known, silently emptying provenance. 21 selection tests (up from 19); full amethyst suite green at 1197. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R1eVeWjMgG8WSU6jKk8d3o