mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
Resolves the conflict main's Buzz DM work created with the per-account stores. BuzzDmDiscovery: took main's side wholesale. It rewrote discovery to derive the whole membership picture from LocalCache observers each pass, which removed the joined-relay set as a restart trigger — so the `joined` val this branch had ported to `account.buzzWorkspaces` is simply gone, along with the import that fed it. The rest is the port main could not have known to make: three new call sites reached for `BuzzWorkspaces` as a singleton, which no longer exists. - BuzzMembershipEoseManager now reads `key.account.buzzWorkspaces`. This is the one that mattered — it is a PerUserEoseManager, so fanning each account's `#p=me` membership REQ across the *device-global* joined set (and pre-approving NIP-42 on every relay in it, per account) was the bystander leak this branch exists to close, reintroduced in a new file. - membershipRelay/toMembershipNotice/toMembershipNotices/membershipNotices take the workspace set as a parameter instead of reading a singleton: which workspaces to prefer when resolving a notice's relay is a per-account question, so only the caller can answer it. No default — every caller has an account in hand, and a silent emptySet() would quietly degrade to "whatever relay delivered it". - ChannelInvitesState takes the account's store and uses it as both the combine trigger and the data, keeping main's reasoning that a late restore-from-disk has to re-resolve which relay a notice belongs to. - The two single-notice renderers (ChannelInvite, ChatroomHeaderCompose) read the set off their AccountViewModel. Faithful to main, including its staleness: the value is read at remember time, so a set restored afterwards does not re-resolve the row. Pre-existing, not introduced here. Verified: 2874 tests green across :commons:jvmTest and :amethyst:testFdroidDebugUnitTest (main adds ~68); spotlessApply clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014UmCeSWetuKmHdrWcZkWDR