From 62c99e4ab839c4f98c8601bbcfbbb35f4edb0358 Mon Sep 17 00:00:00 2001 From: Michel de Graaf Date: Fri, 28 Aug 2026 14:55:02 +0000 Subject: [PATCH] fix(cli): keep `room users` text output a bare roster The e2e job caught this: adding status and file columns to the text record broke `room_users_lists_who_is_in_the_room`, which asserts the line equals the username. That test encodes a real contract -- the text output is a roster to pipe into other commands -- and reformatting it was scope this change did not need. The statistics stay on the record for `--json`. Reproduced the failure locally against soulfind, then confirmed the same test passing with the fix. --- soulseek-rs/src/output.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/soulseek-rs/src/output.rs b/soulseek-rs/src/output.rs index 3e0f70e..ec385fd 100644 --- a/soulseek-rs/src/output.rs +++ b/soulseek-rs/src/output.rs @@ -389,14 +389,11 @@ pub struct RoomMemberRecord { } impl Record for RoomMemberRecord { + /// The username alone, unchanged by the statistics added alongside it: + /// the text line is a roster a caller pipes into other commands, and the + /// statistics are there for `--json` to carry. fn text(&self) -> String { - let unknown = || "-".to_string(); - format!( - "{}\t{}\t{}", - sanitize(&self.user), - self.status.clone().unwrap_or_else(unknown), - self.shared_files.map_or_else(unknown, |v| v.to_string()) - ) + sanitize(&self.user) } }