Files
amethyst/desktopApp
nrobi144andClaude Opus 4.8 eaba40f2a6 fix: address PR review — narrow search-relay seam, Local providers on Android, bug + test fixes
Review findings from @davotoula:

1. Behaviour drift (real): the per-note event finder reused Account.searchRelays()
   (trusted + own search list), widening every missing-event REQ to trusted relays.
   Add a narrow UserFinderAccount.searchOnlyRelays() (= the pre-extraction
   account.searchRelayList read) and use it in FilterMissingEvents. Implemented on
   Account and DesktopIAccount.
2. Runtime trap: LocalUserFinder/LocalUserFinderAccount/LocalEventFinder error() when
   unprovided and were only provided on Desktop. Provide them on Android too, at the
   logged-in root (AppNavigation) from accountViewModel.dataSources() + .account, so any
   shared composable using the no-arg observeUser*/EventFinderFilterAssemblerSubscription
   overloads is safe on Android (the :napplet process never renders these).
3. Removed the redundant `.ifEmpty { DefaultSearchRelayList }` in Account.searchRelays()
   (SearchRelayListState.flow already applies that fallback) + its now-unused import.
4. Fixed a pre-existing shadowing bug on lines this PR touches: FilterByEvent's
   `note.replyTo?.forEach { parentNote -> }` used `note` in the body, so parent notes were
   never fetched — now uses `parentNote`.
5. Added a test at the layer where #1 lived: filterMissingEvents(cache, keys) fans a
   missing event to searchOnlyRelays + the follow/mine/search default, NOT the trusted
   relays that searchRelays would add.
6. Replaced an inline fully-qualified name in the test with an import (CLAUDE.md style).

Green: commons jvmTest + verifyKmpPurity, :amethyst compilePlayDebugKotlin, :desktopApp compile, spotless.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-10 14:51:19 +03:00
..