feat(market): fix publish-duplicates, add offer detail page + filters

The vecino/market view had three gaps:

- Publishing inventory duplicated the listing. discover() appended every
  offer the relay streamed, but relays legitimately resend an addressable
  NIP-99 event (stored copy + live echo on publish). Merge by
  (authorPubkeyHex, id) so each offer appears once; two authors reusing a
  lot id stay distinct.
- No product detail. Tapping a card jumped straight to chat. Add a
  read-only "product page" (MarketOfferDetailScreen) with title, mode,
  category, eco badge, coarse location, price, a "Shared by" seller
  section (profile fetched by pubkey) and the message button. Reached via
  a new /market/offer route; cards are now fully tappable. Shows only what
  the network already carries — no photos/description added to the wire.
- No filters. Add a filter bar (type, category, eco) mirroring inventory,
  each chip group shown only when a discovered offer can match it. To make
  the eco filter real, publish the organic flag on the wire: Offer.isOrganic
  -> NIP-99 'organic' tag -> OfferMapper -> ShareableLot.

Tests: commons_core organic round-trip; app-side dedup, two-author
separation, filter logic, mapper passthrough; detail-screen widget tests.
i18n keys added to en/es/pt/ast and slang regenerated.
This commit is contained in:
vjrj 2026-07-10 19:10:40 +02:00
parent e852b569ce
commit 54d7c2d3b5
21 changed files with 982 additions and 107 deletions

View file

@ -649,6 +649,10 @@ class _Translations$market$pt extends Translations$market$en {
@override String get rangeNear => 'Muito perto';
@override String get rangeArea => 'Pela minha zona';
@override String get rangeRegion => 'A minha região';
@override String get sharedBy => 'Partilhado por';
@override String get noProfile => 'Esta pessoa ainda não partilhou o seu perfil';
@override String get copyId => 'Copiar código';
@override String get idCopied => 'Código copiado';
}
// Path: profile
@ -1392,6 +1396,10 @@ extension on TranslationsPt {
'market.rangeNear' => 'Muito perto',
'market.rangeArea' => 'Pela minha zona',
'market.rangeRegion' => 'A minha região',
'market.sharedBy' => 'Partilhado por',
'market.noProfile' => 'Esta pessoa ainda não partilhou o seu perfil',
'market.copyId' => 'Copiar código',
'market.idCopied' => 'Código copiado',
'profile.title' => 'O teu perfil',
'profile.name' => 'Nome',
'profile.nameHint' => 'Como os outros te veem',