fix: address post-event-driven issues and client info parity (#16)
* fix(ui): restore speaking status indicators Speaking state (isSpeaking) is computed from voice activity timestamps in the protocol layer and cannot be represented as a discrete delta. The event-driven refactor removed periodic snapshot refreshes, causing speaking indicators to go stale. Adds a 750ms periodic snapshot refresh (matching SPEAKING_ACTIVITY_WINDOW) while the audio stats timer is active (in-channel only). Structural changes (moves, joins, leaves) are still handled by instant deltas. * fix(ui): hide server query clients from delta joins When a ServerQuery client sends a message, a ClientJoined delta fires. Before PR#15 the periodic snapshot rebuild would include the SQ client but the snapshot_view filter hid it. With deltas, the client persisted in the local snapshot. Now ClientJoined deltas skip SQ clients entirely. * fix(proto): log getconnectioninfo errors instead of silently discarding Ping and packet loss showing 'Unknown' in the client info sheet is caused by getconnectioninfo failures being silently swallowed. Now logs the error with the client_id so the root cause can be diagnosed (e.g. missing b_client_connectioninfo_view permission on the server). Also logs clientgetvariables failures. * fix(proto): refresh non-self client profiles before mapping * feat(protocol): add ping deviation to client profiles * chore(ui): regenerate Flutter bridge bindings for ping deviation * fix(l10n): add ping deviation labels to client info * feat(ui): show ping deviation in client info sheet
This commit is contained in:
@@ -20,6 +20,7 @@ void main() {
|
||||
onlineSeconds: 3661,
|
||||
idleMilliseconds: 42000,
|
||||
pingMilliseconds: 38,
|
||||
pingDeviationMilliseconds: 7,
|
||||
clientAddress: '203.0.113.24',
|
||||
serverGroups: const ['Admin', 'Talk Power'],
|
||||
channelGroup: 'Guest',
|
||||
@@ -77,9 +78,56 @@ void main() {
|
||||
expect(find.text('Connection'), findsOneWidget);
|
||||
expect(find.text('1h 1m 1s'), findsOneWidget);
|
||||
expect(find.text('42.00 s'), findsOneWidget);
|
||||
expect(find.text('7 ms'), findsOneWidget);
|
||||
expect(find.text('203.0.113.24'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('hides ping deviation row when the value is absent', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
localizationsDelegates: AppL10n.localizationsDelegates,
|
||||
supportedLocales: AppL10n.supportedLocales,
|
||||
home: Scaffold(
|
||||
body: SizedBox(
|
||||
height: 500,
|
||||
child: ClientInfoSheet(
|
||||
clientName: 'Bob',
|
||||
loadProfile: () async => rust.BridgeClientProfile(
|
||||
id: BigInt.from(101),
|
||||
channel: BigInt.from(7),
|
||||
name: 'Bob',
|
||||
uniqueId: 'client-unique-id',
|
||||
databaseId: BigInt.from(55),
|
||||
countryCode: 'US',
|
||||
description: 'Operator',
|
||||
version: '3.6.2',
|
||||
platform: 'Windows',
|
||||
onlineSeconds: 3661,
|
||||
idleMilliseconds: 42000,
|
||||
pingMilliseconds: 38,
|
||||
clientAddress: '203.0.113.24',
|
||||
serverGroups: const ['Admin'],
|
||||
channelGroup: 'Guest',
|
||||
avatarPath: '/avatar_aabbcc',
|
||||
bytesDownloadedMonth: BigInt.from(2048),
|
||||
bytesUploadedMonth: BigInt.from(4096),
|
||||
bytesDownloadedTotal: BigInt.from(1048576),
|
||||
bytesUploadedTotal: BigInt.from(2097152),
|
||||
packetLossClientToServerTotal: 0.0123,
|
||||
packetLossServerToClientTotal: 0.0456,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Ping deviation'), findsNothing);
|
||||
expect(find.text('7 ms'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('loading and error states use localized copy', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
|
||||
Reference in New Issue
Block a user