- starsync://host:port/?name=&pw= (PROTOCOL.md "Invite link"); the password only when ticked, never in logs - Linux: launcher entry takes x-scheme-handler/starsync (%u, StartupNotify) and becomes its xdg-mime default; Windows: HKCU\Software\Classes\starsync -> starsync.exe - InstanceLock: lock file + loopback handoff per profile folder; the running app comes up with the second start's activation token (Wayland/X11) or AllowSetForegroundWindow (Windows) - Sharing looks up the internet address (HTTPS services with fallbacks); members card picks Internet / Home network / VPN and says when the port needs forwarding - JoinOffers: link and clipboard prompt with /health, joins through ConnectFlow; dismissed clipboard invites kept as fingerprints Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
948 B
Dart
19 lines
948 B
Dart
// Test support (not a test): the app's composition root for tests.
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:starsync/src/app/app_graph.dart';
|
|
import 'package:starsync/src/screens/home/health_probe.dart';
|
|
import 'package:starsync/src/session/identity.dart' show ClientIdentity;
|
|
|
|
/// One graph per test file, like the app's one per run: nothing starts
|
|
/// until a test calls `navigation.start()` (or `goHome`), so widget tests
|
|
/// see the app before your server is up. Sharing looks up no internet
|
|
/// address unless [publicAddress] gives one.
|
|
AppGraph testGraph({HealthGetter healthGet = defaultHealthGet, Future<String?> Function()? publicAddress}) =>
|
|
AppGraph.build(
|
|
identity: ClientIdentity.ephemeral(),
|
|
healthGet: healthGet,
|
|
publicAddress: publicAddress ?? () async => null);
|
|
|
|
/// [child] under [graph]'s [AppScope].
|
|
Widget scoped(AppGraph graph, Widget child) => AppScope(graph: graph, child: child);
|