feat(sharing): make going online opt-in, and show what it unlocks

Tane dialled its four default relays at launch, before anyone had asked
for anything — an F-Droid reviewer spotted it, and they were right. The
seed book needs no network at all, so the app should not have one until
the person joins the sharing side.

- SocialSettings gains a three-state `sharingEnabled`. `null` means
  "never asked", which is what lets `migrateSharingEnabled` keep an
  existing install exactly as it was: anyone past the intro was on a
  build that connected at launch, so they keep messaging, device sync
  and offer alerts. A fresh install starts fully offline.
- bootstrap only starts the shared connection when sharing is on. The
  inbox/sync/plantaré/alert listeners are untouched: they react to a
  session, and none arrives.
- SharingSwitch is the single place that moves the stored choice, the
  live connection and the flag the UI listens to, so they cannot drift.
- Agreeing to the community rules is the opt-in — one consent surface,
  reached from the market or from the drawer's invitation.
- SocialConnection.start is now idempotent and gains stop(), so turning
  sharing off goes offline immediately instead of at the next launch.
- The social drawer entries stay visible but padlocked while sharing is
  off; tapping one explains what wakes up and offers to join. Hiding
  them would have kept the tool a secret. "Coming soon" is gone for
  good — everything it labelled is built.

Covered by tests for the migration in both directions, start/stop
lifecycle, the gate turning sharing on, the invitation, and the drawer
in all three states (no social layer / off / on).
This commit is contained in:
vjrj 2026-07-25 16:47:56 +02:00
parent 62123582f5
commit fed0e8200e
35 changed files with 926 additions and 173 deletions

View file

@ -72,7 +72,6 @@
"delete": "Eliminar",
"edit": "Editar",
"type": "Tipo",
"comingSoon": "Pronto",
"offline": "Sin conexión — el compartir está en pausa"
},
"home": {
@ -571,7 +570,9 @@
"noProfile": "Esta persona aún no ha compartido su perfil",
"copyId": "Copiar código",
"idCopied": "Código copiado",
"photo": "Foto"
"photo": "Foto",
"sharingOnLabel": "Compartir está activado",
"sharingOnHelp": "Si lo desactivas, Tane deja de conectarse a ningún servidor. Tu cuaderno de semillas sigue funcionando igual."
},
"profile": {
"title": "Tu perfil",
@ -779,7 +780,8 @@
"publicNote": "Lo que publiques aquí es público, y pueden quedar copias aunque lo retires después.",
"viewLegal": "Privacidad y normas",
"accept": "Acepto",
"decline": "Ahora no"
"decline": "Ahora no",
"networkNote": "Para llevar las ofertas y los mensajes de unas personas a otras, Tane necesita conectarse y dejarlos en servidores comunitarios. Hasta que aceptes, no se conecta a nada."
},
"report": {
"offer": "Denunciar esta oferta",
@ -805,5 +807,14 @@
"manageTitle": "Personas bloqueadas",
"manageEmpty": "No has bloqueado a nadie",
"unblock": "Desbloquear"
},
"sharingInvite": {
"title": "Esto se enciende cuando empiezas a compartir",
"perkChat": "Escribirte con quien tiene semillas cerca",
"perkFavorites": "Guardar las ofertas que te gustan",
"perkPeople": "Tu círculo de gente de confianza",
"networkNote": "Para eso Tane necesita conectarse. Hasta que digas que sí, no habla con nadie.",
"start": "Empezar a compartir",
"notNow": "Ahora no"
}
}