- One server per app run (loopback, no password); Invite attaches an all-interfaces listener to the same server and Stop sharing detaches it (guests told with 4016); members, media and Up next never reset. No solo mode: you're home on your own server unless in a friend's. - Navigation: none / yours / friend; a join passes a version gate on /health first (clear "they/you need to update", update offer). - Invite as a value (host, port, name, password flag, version, fp reserved); addresses filtered (loopback, link-local, 198.18/15, bridges) and ranked; Sharing chip, Copy invite, Stop sharing. - Alone looks like a plain player (alone replaces solo). - AppGraph builds and disposes systems; widgets use AppScope; SessionState deleted; a test caps the remaining singletons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
755 B
Dart
15 lines
755 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.
|
|
AppGraph testGraph({HealthGetter healthGet = defaultHealthGet}) =>
|
|
AppGraph.build(identity: ClientIdentity.ephemeral(), healthGet: healthGet);
|
|
|
|
/// [child] under [graph]'s [AppScope].
|
|
Widget scoped(AppGraph graph, Widget child) => AppScope(graph: graph, child: child);
|