Files
amethyst/commons
nrobi144andClaude Opus 4.8 4d31cd7d25 refactor: move per-note event finder to commons on the new upstream model (Phase 3)
Move EventFinderFilterAssembler(+QueryState), the loaders (NoteEventLoader,
FilterMissingEvents, FilterMissingAddressables, AddressableAuthorRelayLoader) and
watchers (EventWatcher, FilterRepliesAndReactionsToNotes/Addresses) from
amethyst/reqCommand/event/ into commons/relayClient/event/, mirroring the Phase 2
user-finder move.

- EventFinderQueryState carries the narrow UserFinderAccount; DROPS AccountScopedQuery.
  Attribution stays inline via userFinderPubkeyHex; ExplainedFilter/SubPurpose tags
  (REFERENCED_EVENTS / ENGAGEMENT) preserved.
- cache: LocalCache -> ICacheProvider threaded into NoteEventLoaderSubAssembler + the
  FilterMissing* functions (which called the LocalCache singleton statically);
  getOrCreateUser is now nullable at these sites. Added ICacheProvider.checkGetOrCreateUser
  default; LocalCache.checkGetOrCreateUser now overrides it.
- SingleSubNoEoseCacheEoseManager moved to commons (account-agnostic accountPubKeyOf);
  its two amethyst callers keep attribution via a new amethyst subclass
  AccountScopedSingleSubNoEoseCacheEoseManager (ChannelLoader) or the plain commons base
  (NWCPaymentWatcher, which never attributed).

Android unchanged via EventFinderShims.kt (typealiases + AccountViewModel overload);
EventObservers.kt stays in amethyst. New commons EventFinderFilterAssemblerSubscription
(LocalEventFinder + (note) overload reusing LocalUserFinderAccount) for Desktop.
Updated the direct loader-function callers (search/hashtag/thread sub-assemblers + the
moved test) to import from commons and pass LocalCache.

Green: commons JVM + iOS purity, :amethyst compilePlayDebugKotlin, :desktopApp compile, spotless.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-10 11:38:09 +03:00
..