Stabilisation quick fixes: orderly close, visible version and update band, chat pop-ups on, Windows shaders and hwdec, render logs
- Close: hide the window, dispose every player, thumbnail job and the sound engine, leave, then close normally; Linux runner _exit (the NVIDIA EGL exit handler crashed 10/10 closes, 0/41 now); Windows tears down inside the message loop, then TerminateProcess; watchdogs. - Version under the Settings tab; an update band instead of a dot, never over a video; checks at start and every 4 hours. - Chat pop-ups default to All again. - Shader read-back compared as a list (old mpv joins with ','), so Windows stops turning shaders off; Windows hwdec auto-copy. - Render diagnostics (`mpv: render` lines); RAM-only demuxer cache pin silences the file-cache warning; a volume readout test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e537f9d5f8
commit
ea607c1a52
29 files changed
+873
-168
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
@@ -7,6 +8,7 @@ import 'package:watch_together/src/schedule/ui/schedule_page.dart';
|
||||
import 'package:sync_relay_core/core.dart';
|
||||
import 'package:watch_together/src/screens/home/health_probe.dart';
|
||||
import 'package:watch_together/src/screens/home/media_picker.dart';
|
||||
import 'package:watch_together/src/screens/home/update_indicator.dart';
|
||||
import 'package:watch_together/src/shell/app_shell.dart';
|
||||
import 'package:watch_together/src/shell/library_link.dart' show soloPlayHint;
|
||||
import 'package:watch_together/src/state/session_state.dart';
|
||||
@@ -58,13 +60,18 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
test('chat pop-ups default to All', () {
|
||||
expect(AppSettings().chatPopups.value, ChatPopups.all);
|
||||
});
|
||||
|
||||
test('hwdec value follows mode', () {
|
||||
final s = AppSettings();
|
||||
expect(s.hwdec.value, 'auto');
|
||||
expect(s.hwdec.value, autoHwdec);
|
||||
expect(autoHwdec, Platform.isWindows ? 'auto-copy' : 'auto');
|
||||
s.setHwdecMode(HwdecMode.off);
|
||||
expect(s.hwdec.value, 'no');
|
||||
s.setHwdecMode(HwdecMode.custom);
|
||||
expect(s.hwdec.value, 'auto');
|
||||
expect(s.hwdec.value, autoHwdec);
|
||||
s.setHwdecCustom(' vaapi ');
|
||||
expect(s.hwdec.value, 'vaapi');
|
||||
});
|
||||
@@ -150,7 +157,7 @@ void main() {
|
||||
expect(find.text('Hardware decoding'), findsOneWidget);
|
||||
await tester.tap(find.byKey(const ValueKey('settings-updates')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Check for updates on start'), findsOneWidget);
|
||||
expect(find.text('Check for updates automatically'), findsOneWidget);
|
||||
await tester.tap(find.byKey(const ValueKey('settings-shortcuts')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Toggle ready'), findsOneWidget);
|
||||
@@ -288,4 +295,53 @@ void main() {
|
||||
expect(tester.takeException(), isNull, reason: source);
|
||||
}
|
||||
});
|
||||
|
||||
group('update bar', () {
|
||||
const m = UpdateManifest(
|
||||
version: '1.2.1', protocol: 1, url: 'http://x/a.tgz', notes: 'Faster joins');
|
||||
Future<UpdateController> pump(WidgetTester tester, UpdateStatus s,
|
||||
{String current = '1.2.0'}) async {
|
||||
final c = UpdateController(
|
||||
currentVersion: current,
|
||||
executablePath: '/nowhere/watch_together',
|
||||
restart: (_, _) async {});
|
||||
c.status.value = s;
|
||||
await tester.pumpWidget(MaterialApp(
|
||||
home: Scaffold(body: Column(children: [UpdateBar(controller: c)]))));
|
||||
return c;
|
||||
}
|
||||
|
||||
testWidgets('says what is ready, the version running, Later hides it',
|
||||
(tester) async {
|
||||
await pump(tester,
|
||||
const UpdateStatus(UpdatePhase.available, manifest: m, canInstall: true));
|
||||
expect(find.text('Starsync 1.2.1 is ready'), findsOneWidget);
|
||||
expect(find.text('You are running 1.2.0 · Faster joins'), findsOneWidget);
|
||||
expect(find.text('Update and restart'), findsOneWidget);
|
||||
await tester.tap(find.byKey(const ValueKey('update-later')));
|
||||
await tester.pump();
|
||||
expect(find.byKey(const ValueKey('update-bar')), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('a copy that cannot update itself says it is older',
|
||||
(tester) async {
|
||||
await pump(tester, const UpdateStatus(UpdatePhase.available, manifest: m));
|
||||
expect(find.text('This copy of Starsync is older than the latest release (1.2.1)'),
|
||||
findsOneWidget);
|
||||
expect(find.text('Update and restart'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('a test build is not told which version it runs',
|
||||
(tester) async {
|
||||
await pump(tester,
|
||||
const UpdateStatus(UpdatePhase.available, manifest: m, canInstall: true),
|
||||
current: '1.2.1-dev.2');
|
||||
expect(find.text('Faster joins'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('nothing to install: no bar', (tester) async {
|
||||
await pump(tester, const UpdateStatus(UpdatePhase.idle));
|
||||
expect(find.byKey(const ValueKey('update-bar')), findsNothing);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user