mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
"Remove from Messages" was hardcoded on every surface, so it never showed an "Add to Messages" counterpart for a channel that was already off the list, and the Buzz workspace rows read a session-local snapshot of the kind-10009 list that was seeded once and only ever grew — a channel taken off Messages still rendered as a disabled "Added", leaving no way back. Removal itself always worked (verified on-device: the kind-10009 republished and the row left Messages); what was missing was any read of that list on the way back. - RelayGroupListState: expose liveRelayGroupIds, the joined groups as normalized GroupIds, so the UI can ask whether a channel is on Messages without string-matching a raw relay url another client may not have normalized the way we do. - RelayGroupTopBar / BuzzImportRow: one Add/Remove toggle driven by that flow. Remove no longer pops back — you stay a member reading the channel, and staying is what makes the entry flip so the action is visibly undoable. Leave still pops. - BuzzRelayImportViewModel: track "added" against the live list instead of a one-shot seed, and add remove(); add() now also clears the dismissal so a relay's kind-44100 re-announcement isn't filtered back out. - AccountViewModel: addRelayGroupToMessages() as the counterpart to removeRelayGroupFromMessages(); acceptChannelInvite() delegates to it. Buzz DMs had the same one-way shape for a different reason: hiding is a relay-side per-viewer flag (kind-41012 -> the kind-30622 snapshot), and rebuildRows dropped hidden DMs on the floor, so a hidden conversation was gone for good. There is no unhide command — re-opening is the unhide, a kind-41010 with the same participants resolving to the same canonical channel. Hidden DMs are now projected into their own list behind a collapsible "Hidden (N)" header, faded but still openable, each offering "Add to Messages". Also added to the community view's inline DM rows, which had no menu at all and are where DMs actually live — the full inbox sits behind a "see all" row that only appears above six DMs, so in a small workspace the hidden section would have been unreachable. Both list screens now leave bottom room for the FAB, which the Scaffold's padding deliberately doesn't account for; the last row's overflow menu was sitting underneath it. Adds SimpleGroupListEventTest covering the removal path, including that a renamed channel still matches (removal keys on group id + relay only). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>