Files
amethyst/commons
nrobi144andClaude Opus 4.8 983fc1aab2 refactor: move per-user metadata finder to commons on the new upstream model (Phase 2)
Move UserFinderFilterAssembler(+QueryState), the four sub-assemblers
(UserOutboxFinder, UserWatcher, UserReports, UserCards), FilterUserMetadataForKey,
and FilterReportsToKey from amethyst/reqCommand/user/ into commons/relayClient/user/,
plus the inner Account-free pickRelaysToLoadUsers overload into commons
PickRelaysToLoadUsers.kt.

Reconciled with upstream's re-architecture:
- UserFinderQueryState carries the narrow UserFinderAccount (Phase 1) instead of the
  full Account; DROPS AccountScopedQuery. The finder sub-assemblers extend the commons
  base managers and attribute inline via soleAccountPubKey — now sourced from
  UserFinderAccount.userFinderPubkeyHex — so upstream's per-account attribution +
  ExplainedFilter/SubPurpose tags are preserved unchanged.
- cache: LocalCache -> ICacheProvider; FilterUserMetadataForKey + pickRelaysToLoadUsers
  take an injected relayHints: HintIndexer instead of the static LocalCache.relayHints.
- UserOutboxFinderSubAssembler inlines the relay-tier union over the UserFinderAccount
  getters (behaviour-preserving vs the old Account-based outer overload).

Android unchanged: UserFinderShims.kt typealiases keep call sites (incl. reqCommand/event
EventFinder*) compiling; UserFinderFilterAssemblerSubscription + UserObservers stay in
amethyst (Account is-a UserFinderAccount). New commons UserFinderSubscription
(LocalUserFinder/LocalUserFinderAccount + overloads) and UserMetadataObservers
(observeUser*) added for Desktop. amethyst FilterFindFollowMetadataForKey's outer
overload now delegates to the commons inner one.

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

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