tane/apps/app_seeds/lib
vjrj b9492cb65a refactor(social): one shared relay connection per identity
Every feature (offers, messaging, trust, profile, the inbox listener) used
to open its OWN RelayPool via social.openSession — several sockets to the
same relays, more battery, and reconnection logic living only in the inbox
listener.

Add SocialConnection: ONE shared session per identity, lazily connected and
reused by all. It watches connectivity — dropping the session when the
network goes and reconnecting when it returns, announcing each change on a
sessions stream so the inbox listener re-subscribes automatically. Callers
get the session via connection.session() and never close it (the connection
owns its lifecycle); recreated/disposed on an identity switch.

- InboxService now consumes the shared connection (subscribes on its
  sessions stream) instead of owning its own socket + connectivity code.
- createOffersCubit + the chat/market/profile screens use the shared
  connection; dead createMessagesCubit/createTrustCubit factories removed.
- DI registers SocialConnection per identity; Bootstrap starts it (after
  the inbox subscribes); switchSocialAccount disposes + recreates it.

Tests: SocialConnection lifecycle (reuse, concurrent connect, offline drop +
reconnect, unreachable retry) with a fake opener + online stream; inbox test
updated. nostr added as a dev_dependency for the channel fake.
2026-07-10 21:50:34 +02:00
..
data feat(market): host and publish the cover photo with each offer 2026-07-10 21:12:36 +02:00
db feat(inventory): photo-first drafts + on-device OCR (digitization R2+R4) 2026-07-09 21:23:46 +02:00
di refactor(social): one shared relay connection per identity 2026-07-10 21:50:34 +02:00
domain Solve lint issue 2026-07-10 10:34:43 +02:00
i18n Merge branch 'claude/nostalgic-wright-acfc25': inline offer photos 2026-07-10 21:43:35 +02:00
security feat(backup): sealed backups + printable recovery sheet 2026-07-09 22:32:13 +02:00
services refactor(social): one shared relay connection per identity 2026-07-10 21:50:34 +02:00
state refactor(social): one shared relay connection per identity 2026-07-10 21:50:34 +02:00
ui refactor(social): one shared relay connection per identity 2026-07-10 21:50:34 +02:00
app.dart refactor(social): one shared relay connection per identity 2026-07-10 21:50:34 +02:00
bootstrap.dart refactor(social): one shared relay connection per identity 2026-07-10 21:50:34 +02:00
main.dart feat(identity): switch social identity, all from the one backup 2026-07-10 20:22:24 +02:00