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": "Delete",
"edit": "Edit",
"type": "Type",
"comingSoon": "Coming soon",
"offline": "You're offline — sharing is paused"
},
"home": {
@ -572,7 +571,9 @@
"noProfile": "This person hasn't shared a profile yet",
"copyId": "Copy code",
"idCopied": "Code copied",
"photo": "Photo"
"photo": "Photo",
"sharingOnLabel": "Sharing is on",
"sharingOnHelp": "Turn this off and Tane stops connecting to any server. Your seed book keeps working just the same."
},
"profile": {
"title": "Your profile",
@ -780,7 +781,8 @@
"publicNote": "What you publish here is public, and copies may remain even if you remove it later.",
"viewLegal": "Privacy & rules",
"accept": "I agree",
"decline": "Not now"
"decline": "Not now",
"networkNote": "To carry offers and messages between people, Tane needs to go online and leave them on community servers. Until you agree, it doesn't connect to anything."
},
"report": {
"offer": "Report this offer",
@ -806,5 +808,14 @@
"manageTitle": "Blocked people",
"manageEmpty": "You haven't blocked anyone",
"unblock": "Unblock"
},
"sharingInvite": {
"title": "This wakes up when you start sharing",
"perkChat": "Write to whoever has seeds near you",
"perkFavorites": "Keep the offers you like",
"perkPeople": "Your circle of people you trust",
"networkNote": "For that, Tane needs to go online. Until you say yes, it doesn't talk to anyone.",
"start": "Start sharing",
"notNow": "Not now"
}
}