forked from Foxyz/sync_replay_project
Restructure step 3: your server, Invite, version gate, AppGraph
- 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>
This commit is contained in:
1 parent
629be0d9ed
commit
4d00b7455e
86 files changed
+2993
-2071
No files matched your search
@@ -6,16 +6,20 @@ import 'package:media_kit_video/media_kit_video.dart' show VideoState;
|
||||
import 'package:starsync/src/controls/model/controls_prefs.dart';
|
||||
import 'package:starsync/src/controls/frame.dart';
|
||||
import 'package:starsync/src/shell/session_player.dart';
|
||||
import 'package:starsync/src/state/session_state.dart';
|
||||
import 'package:starsync/src/state/settings.dart';
|
||||
|
||||
import 'test_graph.dart';
|
||||
|
||||
/// This file's composition root (see test_graph.dart).
|
||||
final _graph = testGraph();
|
||||
|
||||
// The wheel anywhere on the full player flashes the volume readout, in
|
||||
// both skins, windowed and fullscreen, with the controls up or hidden.
|
||||
// The picture is a black box with the session's controls on it (never a
|
||||
// media_kit `Video`).
|
||||
|
||||
void main() {
|
||||
final coord = SessionState.instance.coordinator;
|
||||
final coord = _graph.coordinator;
|
||||
final s = AppSettings.instance;
|
||||
|
||||
// A real player for the volume steps to go to. Never disposed: the
|
||||
@@ -46,7 +50,7 @@ void main() {
|
||||
for (final fullscreen in [false, true]) {
|
||||
final what = '${skin.name}, ${fullscreen ? 'fullscreen' : 'windowed'}';
|
||||
s.controlsSkin.value = skin;
|
||||
await tester.pumpWidget(MaterialApp(
|
||||
await tester.pumpWidget(scoped(_graph, MaterialApp(
|
||||
theme: ThemeData.dark(),
|
||||
home: Scaffold(
|
||||
body: SessionPlayer(
|
||||
@@ -68,7 +72,7 @@ void main() {
|
||||
]),
|
||||
),
|
||||
),
|
||||
));
|
||||
)));
|
||||
await tester.pump();
|
||||
expect(opacity(), 0, reason: '$what: nothing before a step');
|
||||
|
||||
@@ -91,7 +95,7 @@ void main() {
|
||||
expect(opacity(), 0, reason: '$what: gone after the second');
|
||||
}
|
||||
}
|
||||
await tester.pumpWidget(const SizedBox());
|
||||
await tester.pumpWidget(scoped(_graph, const SizedBox()));
|
||||
await tester.pump(const Duration(seconds: 5));
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user