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:
@@ -917,6 +917,9 @@ class BridgeClientProfile {
|
||||
/// Current ping in milliseconds.
|
||||
final PlatformInt64? pingMilliseconds;
|
||||
|
||||
/// Current ping deviation in milliseconds.
|
||||
final PlatformInt64? pingDeviationMilliseconds;
|
||||
|
||||
/// Client address. Empty when permission-gated.
|
||||
final String clientAddress;
|
||||
|
||||
@@ -963,6 +966,7 @@ class BridgeClientProfile {
|
||||
this.onlineSeconds,
|
||||
this.idleMilliseconds,
|
||||
this.pingMilliseconds,
|
||||
this.pingDeviationMilliseconds,
|
||||
required this.clientAddress,
|
||||
required this.serverGroups,
|
||||
required this.channelGroup,
|
||||
@@ -992,6 +996,7 @@ class BridgeClientProfile {
|
||||
onlineSeconds.hashCode ^
|
||||
idleMilliseconds.hashCode ^
|
||||
pingMilliseconds.hashCode ^
|
||||
pingDeviationMilliseconds.hashCode ^
|
||||
clientAddress.hashCode ^
|
||||
serverGroups.hashCode ^
|
||||
channelGroup.hashCode ^
|
||||
@@ -1023,6 +1028,7 @@ class BridgeClientProfile {
|
||||
onlineSeconds == other.onlineSeconds &&
|
||||
idleMilliseconds == other.idleMilliseconds &&
|
||||
pingMilliseconds == other.pingMilliseconds &&
|
||||
pingDeviationMilliseconds == other.pingDeviationMilliseconds &&
|
||||
clientAddress == other.clientAddress &&
|
||||
serverGroups == other.serverGroups &&
|
||||
channelGroup == other.channelGroup &&
|
||||
|
||||
@@ -1844,8 +1844,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
BridgeClientProfile dco_decode_bridge_client_profile(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
final arr = raw as List<dynamic>;
|
||||
if (arr.length != 25)
|
||||
throw Exception('unexpected arr length: expect 25 but see ${arr.length}');
|
||||
if (arr.length != 26)
|
||||
throw Exception('unexpected arr length: expect 26 but see ${arr.length}');
|
||||
return BridgeClientProfile(
|
||||
id: dco_decode_u_64(arr[0]),
|
||||
channel: dco_decode_u_64(arr[1]),
|
||||
@@ -1862,16 +1862,17 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
onlineSeconds: dco_decode_opt_box_autoadd_i_64(arr[12]),
|
||||
idleMilliseconds: dco_decode_opt_box_autoadd_i_64(arr[13]),
|
||||
pingMilliseconds: dco_decode_opt_box_autoadd_i_64(arr[14]),
|
||||
clientAddress: dco_decode_String(arr[15]),
|
||||
serverGroups: dco_decode_list_String(arr[16]),
|
||||
channelGroup: dco_decode_String(arr[17]),
|
||||
avatarPath: dco_decode_String(arr[18]),
|
||||
bytesDownloadedMonth: dco_decode_opt_box_autoadd_u_64(arr[19]),
|
||||
bytesUploadedMonth: dco_decode_opt_box_autoadd_u_64(arr[20]),
|
||||
bytesDownloadedTotal: dco_decode_opt_box_autoadd_u_64(arr[21]),
|
||||
bytesUploadedTotal: dco_decode_opt_box_autoadd_u_64(arr[22]),
|
||||
packetLossClientToServerTotal: dco_decode_opt_box_autoadd_f_32(arr[23]),
|
||||
packetLossServerToClientTotal: dco_decode_opt_box_autoadd_f_32(arr[24]),
|
||||
pingDeviationMilliseconds: dco_decode_opt_box_autoadd_i_64(arr[15]),
|
||||
clientAddress: dco_decode_String(arr[16]),
|
||||
serverGroups: dco_decode_list_String(arr[17]),
|
||||
channelGroup: dco_decode_String(arr[18]),
|
||||
avatarPath: dco_decode_String(arr[19]),
|
||||
bytesDownloadedMonth: dco_decode_opt_box_autoadd_u_64(arr[20]),
|
||||
bytesUploadedMonth: dco_decode_opt_box_autoadd_u_64(arr[21]),
|
||||
bytesDownloadedTotal: dco_decode_opt_box_autoadd_u_64(arr[22]),
|
||||
bytesUploadedTotal: dco_decode_opt_box_autoadd_u_64(arr[23]),
|
||||
packetLossClientToServerTotal: dco_decode_opt_box_autoadd_f_32(arr[24]),
|
||||
packetLossServerToClientTotal: dco_decode_opt_box_autoadd_f_32(arr[25]),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2577,6 +2578,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
var var_onlineSeconds = sse_decode_opt_box_autoadd_i_64(deserializer);
|
||||
var var_idleMilliseconds = sse_decode_opt_box_autoadd_i_64(deserializer);
|
||||
var var_pingMilliseconds = sse_decode_opt_box_autoadd_i_64(deserializer);
|
||||
var var_pingDeviationMilliseconds = sse_decode_opt_box_autoadd_i_64(
|
||||
deserializer,
|
||||
);
|
||||
var var_clientAddress = sse_decode_String(deserializer);
|
||||
var var_serverGroups = sse_decode_list_String(deserializer);
|
||||
var var_channelGroup = sse_decode_String(deserializer);
|
||||
@@ -2611,6 +2615,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
onlineSeconds: var_onlineSeconds,
|
||||
idleMilliseconds: var_idleMilliseconds,
|
||||
pingMilliseconds: var_pingMilliseconds,
|
||||
pingDeviationMilliseconds: var_pingDeviationMilliseconds,
|
||||
clientAddress: var_clientAddress,
|
||||
serverGroups: var_serverGroups,
|
||||
channelGroup: var_channelGroup,
|
||||
@@ -3436,6 +3441,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
sse_encode_opt_box_autoadd_i_64(self.onlineSeconds, serializer);
|
||||
sse_encode_opt_box_autoadd_i_64(self.idleMilliseconds, serializer);
|
||||
sse_encode_opt_box_autoadd_i_64(self.pingMilliseconds, serializer);
|
||||
sse_encode_opt_box_autoadd_i_64(self.pingDeviationMilliseconds, serializer);
|
||||
sse_encode_String(self.clientAddress, serializer);
|
||||
sse_encode_list_String(self.serverGroups, serializer);
|
||||
sse_encode_String(self.channelGroup, serializer);
|
||||
|
||||
Reference in New Issue
Block a user