Settle the small leftovers of the earlier reviews
CI / Linux checks (push) Failing after 20m23s

- jitter.rs: short_packet_fuzz takes payloads of 0..=100 bytes (was under
  12) and 3000 iterations (was 500).
- ui-review.md: the whisper row pointed at voelin-audio/src/encode.rs:90;
  the C2S-only packet is built by out_audio in voelin-core/src/voice.rs.
- mixer.rs: the module doc's first paragraph is reflowed, and
  Mixer::set_priority names its parameter talkers, not clients.
- stream.rs: api_types_convert_at_the_boundary asserts the remaining
  variants: every ViewerState, StreamKind (both ways) and LeaveReason
  (alone and inside EndReason::Removed).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-14 18:09:21 +03:00
1 parent cfd9cba2dd
commit ff054008c3
4 files changed
+41 -7

No files matched your search

+3 -2
View File
@@ -702,8 +702,9 @@ mod test {
state
};
for _ in 0..500 {
let len = (next() % 12) as usize;
for _ in 0..3_000 {
// Payloads of 0..=100 bytes: empty, a lone TOC byte, and frames of any shape.
let len = (next() % 101) as usize;
let payload: Vec<u8> = (0..len).map(|_| next() as u8).collect();
let _ = handler.handle_packet(packet(30, &payload));
+4 -4
View File
@@ -2,8 +2,8 @@
//! volume and mute per talker, and everyone else dimmed while a priority
//! speaker talks.
//!
//! The jitter buffer is [`AudioHandler`]. Per
//! sender it keeps a queue of Opus packets and adapts its length:
//! The jitter buffer is [`AudioHandler`]. Per sender it keeps a queue of Opus
//! packets and adapts its length:
//!
//! - a new talker starts after a pre-buffer derived from the queue lengths of
//! the other talkers (none for the first one);
@@ -171,8 +171,8 @@ impl Mixer {
/// one of them talks: dB, clamped to -60..=0 (NaN: not at all).
/// Replaces the previous set; [`forget`](Self::forget) leaves it alone,
/// the caller sends a new set when the talkers change.
pub fn set_priority(&mut self, clients: impl IntoIterator<Item = TalkerId>, dimm_db: f32) {
self.priority = clients.into_iter().collect();
pub fn set_priority(&mut self, talkers: impl IntoIterator<Item = TalkerId>, dimm_db: f32) {
self.priority = talkers.into_iter().collect();
let db = if dimm_db.is_nan() { 0.0 } else { dimm_db.clamp(MAX_DIMM_DB, 0.0) };
self.dimm = 10f32.powf(db / 20.0);
}
+33
View File
@@ -1510,6 +1510,39 @@ mod tests {
assert!(media_codec(codec).name().eq_ignore_ascii_case(codec.sdp_name()));
}
// Every viewer state, stream kind (both ways) and leave reason.
for (state, expected) in [
(wire::ViewerState::Requested, ViewerState::Requested),
(wire::ViewerState::Connecting, ViewerState::Connecting),
(wire::ViewerState::Connected, ViewerState::Connected),
] {
assert_eq!(ViewerState::from(state), expected);
}
for (sent, kind) in [
(wire::StreamKind::Camera, StreamKind::Camera),
(wire::StreamKind::Screen, StreamKind::Screen),
(wire::StreamKind::Window, StreamKind::Window),
(wire::StreamKind::Other(9), StreamKind::Other(9)),
] {
assert_eq!(StreamKind::from(sent), kind);
assert_eq!(wire::StreamKind::from(kind), sent);
}
for (reason, expected) in [
(wire::LeaveReason::None, LeaveReason::None),
(wire::LeaveReason::Left, LeaveReason::Left),
(wire::LeaveReason::Denied, LeaveReason::Denied),
(wire::LeaveReason::Failed, LeaveReason::Failed),
(wire::LeaveReason::Kicked, LeaveReason::Kicked),
(wire::LeaveReason::Banned, LeaveReason::Banned),
(wire::LeaveReason::Other(42), LeaveReason::Other(42)),
] {
assert_eq!(LeaveReason::from(reason), expected);
assert_eq!(
EndReason::from(wire::EndReason::Removed(Some(reason))),
EndReason::Removed(Some(expected))
);
}
for (reason, expected) in [
(wire::EndReason::Local, EndReason::Local),
(wire::EndReason::Denied, EndReason::Denied),
+1 -1
View File
@@ -203,7 +203,7 @@ is not new in TS6. It is the classic client that TS3 already had.
| Assigning server and channel groups, privilege keys (tokens) | none | |
| Permission editor | none | TS6 discusses a simpler "easy view"; start there |
| Server edit, "Recent server events" (log), complaints, client database, snapshots (TS6 beta4) | none | For admins; lower priority |
| Whisper lists and whisper hotkeys | incoming whispers only (`voelin-audio/src/encode.rs:90`: C2S only) | A TS signature feature: team leads whisper to the other leads |
| Whisper lists and whisper hotkeys | incoming whispers only (`out_audio` in `voelin-core/src/voice.rs`: C2S only) | A TS signature feature: team leads whisper to the other leads |
| Asking for talk power | none (`client_talk_request` is not modelled) | Moderated channels |
| Channel description (BBCode, pictures) | none (`ChannelInfo` has the topic only) | Shown when a channel is selected |
| Server welcome message and host message in the chat | only stripped, in Home's news | Official clients print them in the Server tab, and host message mode 3 as a dialog |