refactor(trust): ego-centric trust replaces the global Duniter membership

The global membership rule (curated bootstrap referents + sigQty/stepMax
parameters) solved sybil-proof identity for a UBI — a problem this app
doesn't have — and its screen leaked graph jargon (npub roots, parameter
steppers). Trust is now computed from the user's own position only:
you vouch / vouched by people you know (distance <=2) / vouched by N.

- TrustCubit: drop networkMember tier, referents and params; keep the
  circle rule and the 365-day vouch expiry (renewable, self-pruning).
- Delete TrustReferents, WotSettings, TrustNetworkScreen and the bundled
  referents asset; unwire injector/bootstrap/app/chat.
- New 'Your people' screen (/your-people, from the profile): who you
  vouch for (revocable) and who vouches for you, names via ProfileCache.
- i18n: wot.* removed, yourPeople.* added (en/es/pt/ast); trust.member
  removed. Kind 30777 events on relays stay fully compatible — only the
  interpretation changes.
This commit is contained in:
vjrj 2026-07-11 13:03:20 +02:00
parent 4af90876f4
commit dc7b2eee27
25 changed files with 595 additions and 863 deletions

View file

@ -21,8 +21,6 @@ import 'services/social_account_store.dart';
import 'services/social_connection.dart';
import 'services/social_service.dart';
import 'services/social_settings.dart';
import 'services/trust_referents.dart';
import 'services/wot_settings.dart';
import 'state/inventory_cubit.dart';
import 'state/variety_detail_cubit.dart';
import 'ui/about_screen.dart';
@ -41,8 +39,8 @@ import 'ui/offline_banner.dart';
import 'ui/profile_screen.dart';
import 'ui/settings_screen.dart';
import 'ui/theme.dart';
import 'ui/trust_network_screen.dart';
import 'ui/variety_detail_screen.dart';
import 'ui/your_people_screen.dart';
/// Root widget. Provides the repositories to the tree and wires go_router:
/// `/` is the home menu, `/inventory` the list, `/variety/:id` the item detail.
@ -61,8 +59,6 @@ class TaneApp extends StatelessWidget {
this.profileStore,
this.profileCache,
this.socialAccounts,
this.trustReferents,
this.wotSettings,
this.inbox,
this.notifications,
this.showIntro = false,
@ -81,8 +77,6 @@ class TaneApp extends StatelessWidget {
profileStore,
profileCache,
socialAccounts,
trustReferents,
wotSettings,
inbox,
) {
// A tapped message notification opens that peer's chat. Wired here because
@ -121,10 +115,6 @@ class TaneApp extends StatelessWidget {
/// Optional store of the active social identity, for the profile switcher.
final SocialAccountStore? socialAccounts;
/// Web-of-trust bootstrap referents + parameters (network membership).
final TrustReferents? trustReferents;
final WotSettings? wotSettings;
/// App-wide inbox listener; drives the messages list's live refresh.
final InboxService? inbox;
@ -151,8 +141,6 @@ class TaneApp extends StatelessWidget {
ProfileStore? profileStore,
ProfileCache? profileCache,
SocialAccountStore? socialAccounts,
TrustReferents? trustReferents,
WotSettings? wotSettings,
InboxService? inbox,
) {
return GoRouter(
@ -208,16 +196,16 @@ class TaneApp extends StatelessWidget {
connection: connection,
profileStore: profileStore,
accounts: socialAccounts,
trustNetworkEnabled:
trustReferents != null && wotSettings != null,
yourPeopleEnabled: true,
),
),
if (trustReferents != null && wotSettings != null)
if (social != null && connection != null)
GoRoute(
path: '/trust',
builder: (context, state) => TrustNetworkScreen(
referents: trustReferents,
wotSettings: wotSettings,
path: '/your-people',
builder: (context, state) => YourPeopleScreen(
social: social,
connection: connection,
profileCache: profileCache,
),
),
if (social != null && connection != null)
@ -229,8 +217,6 @@ class TaneApp extends StatelessWidget {
peerPubkey: state.pathParameters['pubkey']!,
messageStore: messageStore,
profileCache: profileCache,
trustReferents: trustReferents,
wotSettings: wotSettings,
),
),
GoRoute(