Files
amethyst/desktopApp/plans
nrobi144 9284e12e86 feat(desktop): Web-of-Trust score badges + amy wot verbs
Adds a friends-of-friends trust score on every user avatar in Desktop
feeds, threads, profile headers, and repost overlays. For pubkey X the
score is the count of accounts in the active user's follow set who also
follow X — Gossip / Snort convention. v1 is display-only; no threshold
filtering.

Data flow
- `commons/wot/WoTService` — sparse `SnapshotStateMap<HexKey, Int>` +
  reverse index + per-follower snapshot for diff-based updates.
  Single-writer coroutine (Channel<Op> → `Snapshot.withMutableSnapshot`)
  serializes all mutations. Cap at 5000 follows/event blocks DoS via
  hostile kind-3s. Guardrail at 2000 follows/account skips WoT for
  mega-accounts.
- `DesktopIAccount.wotService` — per-account instance, matches
  `Kind3FollowListState` / `BookmarkListState` conventions.
- `Main.kt` binds `localCache.accountPubkey`, collects
  `localCache.contactListEvents` → `applyKind3`, collects
  `localCache.followedUsers` → `onFollowSetChange` +
  `subscriptionsCoordinator.loadKind3Batched(...)` with
  `onEose = markReadyOnce`. 2 s fallback timeout guarantees badge
  visibility even if index relays never EOSE.
- `FeedMetadataCoordinator.loadKind3Batched(pubkeys, onEose)` — chunks
  authors into ≤100 per Filter within one subscription. Matches
  nostr-rs-relay defaults.

UI
- `commons/ui/components/UserAvatar` gets an optional
  `badge: @Composable BoxScope.() -> Unit`. Android call sites pass
  null (no compile-time coupling to Desktop-only tooltip APIs).
- `desktopApp/.../ui/note/WoTBadge` — Material3 `TooltipBox` +
  `PlainTooltip` (multiplatform-ready, keyboard/screen-reader a11y).
  `rememberTooltipState(isPersistent = true)` fixes the
  vanish-too-fast desktop default.
- `desktopApp/.../ui/note/WoTBadgedAvatar` — drop-in replacement for
  `UserAvatar` that overlays the badge when
  `LocalWoTService != null && LocalWoTReady && pubkey !in LocalSpamExemptKeys`.
  Score read is a plain `service.scores[userHex] ?: 0` — snapshot
  system tracks per-key, so avatars only recompose when their own
  score changes.
- Call-site migration at 4 v1 surfaces: NoteCard header (covers feed /
  thread / bookmarks / search / QuotedNoteEmbed via NoteCard),
  FeedNoteCard repost header (2 avatars), UserProfileScreen header
  (2 sizes).

Amy verbs
- `amy wot get <pubkey|npub> [--json]` — hydrates a WoTService from the
  local FsEventStore, prints score for target pubkey.
- `amy wot list [--threshold N] [--limit K] [--json]` — sorted score
  list.
- `amy wot sync [--timeout N]` — batch-fetches kind-3 for the active
  follow set from outbox/inbox relays, persists to the event store.

Tests + docs
- 14 unit tests: `WoTServiceTest` covers happy path, sparse map,
  self/follower exclusion, kind-3 churn diff, guardrail, event cap,
  ready gate, clear.
- Manual testing sheet with 17 scenarios at
  `desktopApp/plans/2026-07-01-wot-score-manual-testing-sheet.md`.
- Plan at `docs/plans/2026-07-01-feat-desktop-wot-score-plan.md`.

Prerequisite `DesktopLocalCache.consumeContactList` scoping fix landed
as a separate commit.
2026-07-02 18:03:47 +03:00
..

desktopApp plans

Audited 2026-06-30. 13 plans: 10 shipped (archived), 2 in-progress, 1 queued, 0 abandoned.

In progress

Plan Summary
2026-05-12-feat-desktop-wallet-zapping-test-coverage-plan.md Desktop wallet/zap test coverage; NWC handler + RPC round-trip tests shipped, wallet-column-state and zap-dialog-logic tests still missing.
2026-06-21-napplet-desktop-host.md Desktop NIP-5A/5D host; shared core extractions done, desktop engine/scheme-handler/transport/UI edge not yet built.

Queued

Plan Summary
2026-05-21-embedded-wallet-phase2-research.md Research for an embedded self-custodial Lightning wallet (Breez/ldk-node/lightning-kmp); parked, no code.

Archived (shipped)

Plan Summary
archive/2026-05-09-embedded-local-relay-plan.md In-process SQLite local relay with write-through + startup hydration + settings UI.
archive/2026-05-11-wallet-zapping-brainstorm.md Brainstorm map for the desktop wallet & zapping experience (NWC parity shipped).
archive/2026-05-12-wallet-zapping-phase1-2-plan.md NWC wallet column (connect/balance/send/receive) plus upgraded zapping UX.
archive/2026-05-19-fix-desktop-deb-launch-crash-brainstorm.md Fix .deb launch crash via jlink modules + CI launch smoke test.
archive/2026-05-20-wallet-zapping-manual-testing-sheet.md Manual QA sheet for the desktop wallet & zapping feature.
archive/2026-05-23-feat-send-dialog-lnurl-pay-brainstorm.md Brainstorm for LNURL-pay / lightning-address support in the send dialog.
archive/2026-05-23-feat-send-dialog-lnurl-pay-plan.md Send dialog accepts LNURL + lightning addresses with auto-detect/resolve flow.
archive/2026-05-23-fix-nsec-session-persistence-brainstorm.md Fix nsec sessions not persisting across restarts (save on App-level scope).
archive/2026-06-08-feat-desktop-image-compression-plan.md JPEG re-encode/downscale upload pipeline with EXIF strip + failure dialog, shared with CLI.
archive/2026-06-17-feat-app-launch-optimization-plan.md Launch testing/benchmark foundation + targeted launch-path fixes (all in-scope phases landed).