BlueGit

ict rusty-teams

fix(help): keep always-on diagnostics, close privacy gaps in support packages

- diagnostics::record, WebRTC audio lines and call dumps stay on; the toggle adds detailed logs
- merged log is cut on a char boundary
- notice texts are not logged
- issue draft and client summary show paths relative to home

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-11-14 · 2 weeks ago

Hash
792e45aa00ff86f2c3342ad0dc1a9e5858627b20
Parent
762a13fc
9 files changed +96 −64
crates/app-base/locales/app.yml +4 −4
@@ -171,11 +171,11 @@ settings:
171 171 en: Debug logging
172 172 de: Debug-Protokollierung
173 173 debug_logging_on_detail:
174 en: Writing diagnostics.log — turn off when you are done
175 de: Schreibt diagnostics.log — danach wieder ausschalten
174 en: Writing detailed logs to diagnostics.log - turn off when you are done
175 de: Schreibt ausführliche Logs in diagnostics.log - danach wieder ausschalten
176 176 debug_logging_off_detail:
177 en: Off by default — enable before reproducing a bug
178 de: Standardmässig aus — vor der Fehlerreproduktion einschalten
177 en: Off by default - enable before reproducing a bug
178 de: Standardmäßig aus - vor der Fehlerreproduktion einschalten
179 179 clear_logs:
180 180 en: Clear logs
181 181 de: Logs leeren
@@ -171,11 +171,11 @@ settings:
171 en: Debug logging
171 en: Debug logging
172 de: Debug-Protokollierung
172 de: Debug-Protokollierung
173 debug_logging_on_detail:
173 debug_logging_on_detail:
174 en: Writing diagnostics.log — turn off when you are done
174 en: Writing detailed logs to diagnostics.log - turn off when you are done
175 de: Schreibt diagnostics.log — danach wieder ausschalten
175 de: Schreibt ausführliche Logs in diagnostics.log - danach wieder ausschalten
176 debug_logging_off_detail:
176 debug_logging_off_detail:
177 en: Off by default — enable before reproducing a bug
177 en: Off by default - enable before reproducing a bug
178 de: Standardmässig aus — vor der Fehlerreproduktion einschalten
178 de: Standardmäßig aus - vor der Fehlerreproduktion einschalten
179 clear_logs:
179 clear_logs:
180 en: Clear logs
180 en: Clear logs
181 de: Logs leeren
181 de: Logs leeren
crates/app-base/src/diagnostics.rs +22 −21
@@ -1,8 +1,8 @@
1 1 use std::fs::{self, OpenOptions};
2 2 use std::io::Write;
3 3 use std::path::{Path, PathBuf};
4 use std::sync::atomic::{AtomicBool, Ordering};
5 4 use std::sync::OnceLock;
5 use std::sync::atomic::{AtomicBool, Ordering};
6 6
7 7 pub const DIAGNOSTICS_FILE: &str = "diagnostics.log";
8 8 pub const DIAGNOSTICS_SETTING_KEY: &str = "diagnostics_enabled";
@@ -17,15 +17,7 @@ static PATH: OnceLock<PathBuf> = OnceLock::new();
17 17 static ENABLED: AtomicBool = AtomicBool::new(false);
18 18
19 19 const OWN_CRATE_PREFIXES: [&str; 10] = [
20 "app",
21 "app_base",
22 "state",
23 "calling",
24 "chatsvc",
25 "session",
26 "webview",
27 "mcp",
28 "agents",
20 "app", "app_base", "state", "calling", "chatsvc", "session", "webview", "mcp", "agents",
29 21 "teams",
30 22 ];
31 23
@@ -90,16 +82,17 @@ pub fn record_if_slow(label: &str, elapsed: std::time::Duration) {
90 82 }
91 83
92 84 pub fn record(message: impl AsRef<str>) {
93 if !is_enabled() {
94 return;
95 }
96 85 let message = message.as_ref();
97 86 eprintln!("{message}");
98 87 let Some(path) = PATH.get() else {
99 88 return;
100 89 };
101 if let Err(error) = append_rotated(path, MAX_BYTES, RING_SLOTS, &format!("{} {message}\n", line_prefix()))
102 {
90 if let Err(error) = append_rotated(
91 path,
92 MAX_BYTES,
93 RING_SLOTS,
94 &format!("{} {message}\n", line_prefix()),
95 ) {
103 96 eprintln!("diagnostics write failed: {error}");
104 97 }
105 98 }
@@ -182,7 +175,9 @@ fn rotate_ring(path: &Path, ring_slots: u32) -> std::io::Result<()> {
182 175 fn ring_path(path: &Path, slot: u32) -> PathBuf {
183 176 path.with_file_name(format!(
184 177 "{}.{}",
185 path.file_name().and_then(|name| name.to_str()).unwrap_or(DIAGNOSTICS_FILE),
178 path.file_name()
179 .and_then(|name| name.to_str())
180 .unwrap_or(DIAGNOSTICS_FILE),
186 181 slot
187 182 ))
188 183 }
@@ -202,7 +197,10 @@ pub(crate) fn read_ring_merged(path: &Path, slots: u32, max_bytes: u64) -> Strin
202 197 if merged.len() as u64 <= max_bytes {
203 198 return merged;
204 199 }
205 let start = merged.len() - max_bytes as usize;
200 let mut start = merged.len() - max_bytes as usize;
201 while !merged.is_char_boundary(start) {
202 start += 1;
203 }
206 204 merged[start..].to_owned()
207 205 }
208 206
@@ -218,13 +216,13 @@ struct DiagnosticsLog;
218 216
219 217 impl log::Log for DiagnosticsLog {
220 218 fn enabled(&self, metadata: &log::Metadata<'_>) -> bool {
221 if !is_enabled() {
222 return false;
223 }
224 219 let target = metadata.target();
225 220 if target == "libwebrtc" {
226 221 return true;
227 222 }
223 if !is_enabled() {
224 return false;
225 }
228 226 if is_own_crate(target) {
229 227 return metadata.level() <= log::Level::Info;
230 228 }
@@ -288,7 +286,10 @@ mod tests {
288 286
289 287 #[test]
290 288 fn audio_lines_are_kept_and_endpoint_dumps_and_noise_are_skipped() {
291 assert!(keeps_webrtc_line(log::Level::Debug, "(audio_device_impl.cc:123): Init"));
289 assert!(keeps_webrtc_line(
290 log::Level::Debug,
291 "(audio_device_impl.cc:123): Init"
292 ));
292 293 assert!(keeps_webrtc_line(
293 294 log::Level::Debug,
294 295 "(webrtc_voice_engine.cc:10): WebRtcVoiceEngine::Init"
@@ -1,8 +1,8 @@
1use std::fs::{self, OpenOptions};
1use std::fs::{self, OpenOptions};
2use std::io::Write;
2use std::io::Write;
3use std::path::{Path, PathBuf};
3use std::path::{Path, PathBuf};
4use std::sync::atomic::{AtomicBool, Ordering};
5use std::sync::OnceLock;
4use std::sync::OnceLock;
5use std::sync::atomic::{AtomicBool, Ordering};
6
6
7pub const DIAGNOSTICS_FILE: &str = "diagnostics.log";
7pub const DIAGNOSTICS_FILE: &str = "diagnostics.log";
8pub const DIAGNOSTICS_SETTING_KEY: &str = "diagnostics_enabled";
8pub const DIAGNOSTICS_SETTING_KEY: &str = "diagnostics_enabled";
@@ -17,15 +17,7 @@ static PATH: OnceLock<PathBuf> = OnceLock::new();
17static ENABLED: AtomicBool = AtomicBool::new(false);
17static ENABLED: AtomicBool = AtomicBool::new(false);
18
18
19const OWN_CRATE_PREFIXES: [&str; 10] = [
19const OWN_CRATE_PREFIXES: [&str; 10] = [
20 "app",
20 "app", "app_base", "state", "calling", "chatsvc", "session", "webview", "mcp", "agents",
21 "app_base",
22 "state",
23 "calling",
24 "chatsvc",
25 "session",
26 "webview",
27 "mcp",
28 "agents",
29 "teams",
21 "teams",
30];
22];
31
23
@@ -90,16 +82,17 @@ pub fn record_if_slow(label: &str, elapsed: std::time::Duration) {
90}
82}
91
83
92pub fn record(message: impl AsRef<str>) {
84pub fn record(message: impl AsRef<str>) {
93 if !is_enabled() {
94 return;
95 }
96 let message = message.as_ref();
85 let message = message.as_ref();
97 eprintln!("{message}");
86 eprintln!("{message}");
98 let Some(path) = PATH.get() else {
87 let Some(path) = PATH.get() else {
99 return;
88 return;
100 };
89 };
101 if let Err(error) = append_rotated(path, MAX_BYTES, RING_SLOTS, &format!("{} {message}\n", line_prefix()))
90 if let Err(error) = append_rotated(
102 {
91 path,
92 MAX_BYTES,
93 RING_SLOTS,
94 &format!("{} {message}\n", line_prefix()),
95 ) {
103 eprintln!("diagnostics write failed: {error}");
96 eprintln!("diagnostics write failed: {error}");
104 }
97 }
105}
98}
@@ -182,7 +175,9 @@ fn rotate_ring(path: &Path, ring_slots: u32) -> std::io::Result<()> {
182fn ring_path(path: &Path, slot: u32) -> PathBuf {
175fn ring_path(path: &Path, slot: u32) -> PathBuf {
183 path.with_file_name(format!(
176 path.with_file_name(format!(
184 "{}.{}",
177 "{}.{}",
185 path.file_name().and_then(|name| name.to_str()).unwrap_or(DIAGNOSTICS_FILE),
178 path.file_name()
179 .and_then(|name| name.to_str())
180 .unwrap_or(DIAGNOSTICS_FILE),
186 slot
181 slot
187 ))
182 ))
188}
183}
@@ -202,7 +197,10 @@ pub(crate) fn read_ring_merged(path: &Path, slots: u32, max_bytes: u64) -> Strin
202 if merged.len() as u64 <= max_bytes {
197 if merged.len() as u64 <= max_bytes {
203 return merged;
198 return merged;
204 }
199 }
205 let start = merged.len() - max_bytes as usize;
200 let mut start = merged.len() - max_bytes as usize;
201 while !merged.is_char_boundary(start) {
202 start += 1;
203 }
206 merged[start..].to_owned()
204 merged[start..].to_owned()
207}
205}
208
206
@@ -218,13 +216,13 @@ struct DiagnosticsLog;
218
216
219impl log::Log for DiagnosticsLog {
217impl log::Log for DiagnosticsLog {
220 fn enabled(&self, metadata: &log::Metadata<'_>) -> bool {
218 fn enabled(&self, metadata: &log::Metadata<'_>) -> bool {
221 if !is_enabled() {
222 return false;
223 }
224 let target = metadata.target();
219 let target = metadata.target();
225 if target == "libwebrtc" {
220 if target == "libwebrtc" {
226 return true;
221 return true;
227 }
222 }
223 if !is_enabled() {
224 return false;
225 }
228 if is_own_crate(target) {
226 if is_own_crate(target) {
229 return metadata.level() <= log::Level::Info;
227 return metadata.level() <= log::Level::Info;
230 }
228 }
@@ -288,7 +286,10 @@ mod tests {
288
286
289 #[test]
287 #[test]
290 fn audio_lines_are_kept_and_endpoint_dumps_and_noise_are_skipped() {
288 fn audio_lines_are_kept_and_endpoint_dumps_and_noise_are_skipped() {
291 assert!(keeps_webrtc_line(log::Level::Debug, "(audio_device_impl.cc:123): Init"));
289 assert!(keeps_webrtc_line(
290 log::Level::Debug,
291 "(audio_device_impl.cc:123): Init"
292 ));
292 assert!(keeps_webrtc_line(
293 assert!(keeps_webrtc_line(
293 log::Level::Debug,
294 log::Level::Debug,
294 "(webrtc_voice_engine.cc:10): WebRtcVoiceEngine::Init"
295 "(webrtc_voice_engine.cc:10): WebRtcVoiceEngine::Init"
crates/app-base/src/support.rs +20 −6
@@ -42,10 +42,10 @@ impl ClientInfo {
42 42 camera: impl Into<String>,
43 43 ) -> Self {
44 44 let logs_root = local_data_dir()
45 .map(|path| path.display().to_string())
45 .map(|path| home_relative(&path))
46 46 .unwrap_or_else(|| "unknown".to_owned());
47 47 let support_bundles_root = support_bundles_dir()
48 .map(|path| path.display().to_string())
48 .map(|path| home_relative(&path))
49 49 .unwrap_or_else(|| "unknown".to_owned());
50 50 ClientInfo {
51 51 version: package_version.to_owned(),
@@ -119,6 +119,14 @@ impl ClientInfo {
119 119 }
120 120 }
121 121
122 pub fn home_relative(path: &Path) -> String {
123 let home = directories::BaseDirs::new().map(|base| base.home_dir().to_path_buf());
124 match home.and_then(|home| path.strip_prefix(home).ok().map(Path::to_path_buf)) {
125 Some(relative) => format!("~/{}", relative.display()).replace('\\', "/"),
126 None => path.display().to_string(),
127 }
128 }
129
122 130 fn yes_no(value: bool) -> &'static str {
123 131 if value { "yes" } else { "no" }
124 132 }
@@ -242,8 +250,12 @@ pub fn list_bundle_files(bundle: &Path) -> std::io::Result<Vec<BundleFileEntry>>
242 250 /// Remove one support package directory. Refuses paths outside `parent` when provided.
243 251 pub fn delete_support_bundle(bundle: &Path, parent: Option<&Path>) -> std::io::Result<()> {
244 252 if let Some(parent) = parent {
245 let canonical_parent = parent.canonicalize().unwrap_or_else(|_| parent.to_path_buf());
246 let canonical_bundle = bundle.canonicalize().unwrap_or_else(|_| bundle.to_path_buf());
253 let canonical_parent = parent
254 .canonicalize()
255 .unwrap_or_else(|_| parent.to_path_buf());
256 let canonical_bundle = bundle
257 .canonicalize()
258 .unwrap_or_else(|_| bundle.to_path_buf());
247 259 if !canonical_bundle.starts_with(&canonical_parent) {
248 260 return Err(std::io::Error::new(
249 261 std::io::ErrorKind::InvalidInput,
@@ -289,7 +301,7 @@ pub fn issue_body(client: &ClientInfo, bundle: &SupportBundlePaths) -> String {
289 301 Attach the files from that folder (do not paste secrets).\n",
290 302 client.markdown(),
291 303 bundle.folder_name,
292 bundle.directory.display(),
304 home_relative(&bundle.directory),
293 305 )
294 306 }
295 307
@@ -431,7 +443,9 @@ mod tests {
431 443 fn issue_url_encodes_spaces_and_newlines() {
432 444 let info = sample_client();
433 445 let bundle = SupportBundlePaths {
434 directory: PathBuf::from("/tmp/ms-teams-linux/support-bundles/support-20260101T000000Z"),
446 directory: PathBuf::from(
447 "/tmp/ms-teams-linux/support-bundles/support-20260101T000000Z",
448 ),
435 449 folder_name: "support-20260101T000000Z".into(),
436 450 };
437 451 let url = issue_url(&info, &bundle);
@@ -42,10 +42,10 @@ impl ClientInfo {
42 camera: impl Into<String>,
42 camera: impl Into<String>,
43 ) -> Self {
43 ) -> Self {
44 let logs_root = local_data_dir()
44 let logs_root = local_data_dir()
45 .map(|path| path.display().to_string())
45 .map(|path| home_relative(&path))
46 .unwrap_or_else(|| "unknown".to_owned());
46 .unwrap_or_else(|| "unknown".to_owned());
47 let support_bundles_root = support_bundles_dir()
47 let support_bundles_root = support_bundles_dir()
48 .map(|path| path.display().to_string())
48 .map(|path| home_relative(&path))
49 .unwrap_or_else(|| "unknown".to_owned());
49 .unwrap_or_else(|| "unknown".to_owned());
50 ClientInfo {
50 ClientInfo {
51 version: package_version.to_owned(),
51 version: package_version.to_owned(),
@@ -119,6 +119,14 @@ impl ClientInfo {
119 }
119 }
120}
120}
121
121
122pub fn home_relative(path: &Path) -> String {
123 let home = directories::BaseDirs::new().map(|base| base.home_dir().to_path_buf());
124 match home.and_then(|home| path.strip_prefix(home).ok().map(Path::to_path_buf)) {
125 Some(relative) => format!("~/{}", relative.display()).replace('\\', "/"),
126 None => path.display().to_string(),
127 }
128}
129
122fn yes_no(value: bool) -> &'static str {
130fn yes_no(value: bool) -> &'static str {
123 if value { "yes" } else { "no" }
131 if value { "yes" } else { "no" }
124}
132}
@@ -242,8 +250,12 @@ pub fn list_bundle_files(bundle: &Path) -> std::io::Result<Vec<BundleFileEntry>>
242/// Remove one support package directory. Refuses paths outside `parent` when provided.
250/// Remove one support package directory. Refuses paths outside `parent` when provided.
243pub fn delete_support_bundle(bundle: &Path, parent: Option<&Path>) -> std::io::Result<()> {
251pub fn delete_support_bundle(bundle: &Path, parent: Option<&Path>) -> std::io::Result<()> {
244 if let Some(parent) = parent {
252 if let Some(parent) = parent {
245 let canonical_parent = parent.canonicalize().unwrap_or_else(|_| parent.to_path_buf());
253 let canonical_parent = parent
246 let canonical_bundle = bundle.canonicalize().unwrap_or_else(|_| bundle.to_path_buf());
254 .canonicalize()
255 .unwrap_or_else(|_| parent.to_path_buf());
256 let canonical_bundle = bundle
257 .canonicalize()
258 .unwrap_or_else(|_| bundle.to_path_buf());
247 if !canonical_bundle.starts_with(&canonical_parent) {
259 if !canonical_bundle.starts_with(&canonical_parent) {
248 return Err(std::io::Error::new(
260 return Err(std::io::Error::new(
249 std::io::ErrorKind::InvalidInput,
261 std::io::ErrorKind::InvalidInput,
@@ -289,7 +301,7 @@ pub fn issue_body(client: &ClientInfo, bundle: &SupportBundlePaths) -> String {
289 Attach the files from that folder (do not paste secrets).\n",
301 Attach the files from that folder (do not paste secrets).\n",
290 client.markdown(),
302 client.markdown(),
291 bundle.folder_name,
303 bundle.folder_name,
292 bundle.directory.display(),
304 home_relative(&bundle.directory),
293 )
305 )
294}
306}
295
307
@@ -431,7 +443,9 @@ mod tests {
431 fn issue_url_encodes_spaces_and_newlines() {
443 fn issue_url_encodes_spaces_and_newlines() {
432 let info = sample_client();
444 let info = sample_client();
433 let bundle = SupportBundlePaths {
445 let bundle = SupportBundlePaths {
434 directory: PathBuf::from("/tmp/ms-teams-linux/support-bundles/support-20260101T000000Z"),
446 directory: PathBuf::from(
447 "/tmp/ms-teams-linux/support-bundles/support-20260101T000000Z",
448 ),
435 folder_name: "support-20260101T000000Z".into(),
449 folder_name: "support-20260101T000000Z".into(),
436 };
450 };
437 let url = issue_url(&info, &bundle);
451 let url = issue_url(&info, &bundle);
crates/app-state/src/call/launcher.rs +1 −3
@@ -367,9 +367,7 @@ async fn start_engine(
367 367 )> {
368 368 let session = Session::with_transport(transport.clone(), SessionConfig::for_app()).await?;
369 369 let poll_session = Session::with_transport(transport, SessionConfig::for_app()).await?;
370 let dump_dir = app_base::diagnostics::is_enabled()
371 .then(|| crate::support::call_dumps_dir())
372 .flatten();
370 let dump_dir = crate::support::call_dumps_dir();
373 371 let config = EngineConfig {
374 372 ringable,
375 373 dump_dir,
@@ -367,9 +367,7 @@ async fn start_engine(
367)> {
367)> {
368 let session = Session::with_transport(transport.clone(), SessionConfig::for_app()).await?;
368 let session = Session::with_transport(transport.clone(), SessionConfig::for_app()).await?;
369 let poll_session = Session::with_transport(transport, SessionConfig::for_app()).await?;
369 let poll_session = Session::with_transport(transport, SessionConfig::for_app()).await?;
370 let dump_dir = app_base::diagnostics::is_enabled()
370 let dump_dir = crate::support::call_dumps_dir();
371 .then(|| crate::support::call_dumps_dir())
372 .flatten();
373 let config = EngineConfig {
371 let config = EngineConfig {
374 ringable,
372 ringable,
375 dump_dir,
373 dump_dir,
crates/app-state/src/notice.rs +0 −1
@@ -51,7 +51,6 @@ impl AppState {
51 51 action: Option<NoticeAction>,
52 52 cx: &mut Context<Self>,
53 53 ) {
54 log::info!("notice: {text}");
55 54 self.notice_count += 1;
56 55 let id = self.notice_count;
57 56 self.notice = Some(Notice { id, text, action });
@@ -51,7 +51,6 @@ impl AppState {
51 action: Option<NoticeAction>,
51 action: Option<NoticeAction>,
52 cx: &mut Context<Self>,
52 cx: &mut Context<Self>,
53 ) {
53 ) {
54 log::info!("notice: {text}");
55 self.notice_count += 1;
54 self.notice_count += 1;
56 let id = self.notice_count;
55 let id = self.notice_count;
57 self.notice = Some(Notice { id, text, action });
56 self.notice = Some(Notice { id, text, action });
crates/app-state/src/support_bundle.rs +11 −2
@@ -180,10 +180,19 @@ mod tests {
180 180 let reports = root.path().join("call-reports");
181 181 fs::create_dir_all(&reports).unwrap();
182 182 fs::write(reports.join("20260101T000000Z-echo.md"), "# report\n").unwrap();
183 fs::write(reports.join("20260101T000000Z-echo.json"), "{\"schema\":1}\n").unwrap();
183 fs::write(
184 reports.join("20260101T000000Z-echo.json"),
185 "{\"schema\":1}\n",
186 )
187 .unwrap();
184 188
185 189 let bundle = write_support_bundle_from(&data, &sample_client(), &reports).unwrap();
186 190 assert!(bundle.directory.join("20260101T000000Z-echo.md").is_file());
187 assert!(bundle.directory.join("20260101T000000Z-echo.json").is_file());
191 assert!(
192 bundle
193 .directory
194 .join("20260101T000000Z-echo.json")
195 .is_file()
196 );
188 197 }
189 198 }
@@ -180,10 +180,19 @@ mod tests {
180 let reports = root.path().join("call-reports");
180 let reports = root.path().join("call-reports");
181 fs::create_dir_all(&reports).unwrap();
181 fs::create_dir_all(&reports).unwrap();
182 fs::write(reports.join("20260101T000000Z-echo.md"), "# report\n").unwrap();
182 fs::write(reports.join("20260101T000000Z-echo.md"), "# report\n").unwrap();
183 fs::write(reports.join("20260101T000000Z-echo.json"), "{\"schema\":1}\n").unwrap();
183 fs::write(
184 reports.join("20260101T000000Z-echo.json"),
185 "{\"schema\":1}\n",
186 )
187 .unwrap();
184
188
185 let bundle = write_support_bundle_from(&data, &sample_client(), &reports).unwrap();
189 let bundle = write_support_bundle_from(&data, &sample_client(), &reports).unwrap();
186 assert!(bundle.directory.join("20260101T000000Z-echo.md").is_file());
190 assert!(bundle.directory.join("20260101T000000Z-echo.md").is_file());
187 assert!(bundle.directory.join("20260101T000000Z-echo.json").is_file());
191 assert!(
192 bundle
193 .directory
194 .join("20260101T000000Z-echo.json")
195 .is_file()
196 );
188 }
197 }
189}
198}
crates/app/src/i18n.rs +8 −2
@@ -79,7 +79,10 @@ mod tests {
79 79 assert_eq!(tr("settings.help.create_bundle_button"), "Create");
80 80 assert_eq!(tr("settings.help.logs_path"), "Logs root");
81 81 assert_eq!(tr("settings.help.bundles_path"), "Support packages");
82 assert_eq!(tr("settings.help.packages_empty"), "No support packages yet");
82 assert_eq!(
83 tr("settings.help.packages_empty"),
84 "No support packages yet"
85 );
83 86 assert_eq!(tr("settings.help.copy_path_tooltip"), "Copy path");
84 87 assert_eq!(tr("settings.help.debug_logging"), "Debug logging");
85 88 apply_locale("de");
@@ -87,7 +90,10 @@ mod tests {
87 90 assert_eq!(tr("settings.help.create_bundle_button"), "Erstellen");
88 91 assert_eq!(tr("settings.help.logs_path"), "Log-Root");
89 92 assert_eq!(tr("settings.help.bundles_path"), "Support-Pakete");
90 assert_eq!(tr("settings.help.packages_empty"), "Noch keine Support-Pakete");
93 assert_eq!(
94 tr("settings.help.packages_empty"),
95 "Noch keine Support-Pakete"
96 );
91 97 assert_eq!(tr("settings.help.copy_path_tooltip"), "Pfad kopieren");
92 98 assert_eq!(tr("settings.help.debug_logging"), "Debug-Protokollierung");
93 99 assert!(tr("settings.help.detail").contains("Support-Paket"));
@@ -79,7 +79,10 @@ mod tests {
79 assert_eq!(tr("settings.help.create_bundle_button"), "Create");
79 assert_eq!(tr("settings.help.create_bundle_button"), "Create");
80 assert_eq!(tr("settings.help.logs_path"), "Logs root");
80 assert_eq!(tr("settings.help.logs_path"), "Logs root");
81 assert_eq!(tr("settings.help.bundles_path"), "Support packages");
81 assert_eq!(tr("settings.help.bundles_path"), "Support packages");
82 assert_eq!(tr("settings.help.packages_empty"), "No support packages yet");
82 assert_eq!(
83 tr("settings.help.packages_empty"),
84 "No support packages yet"
85 );
83 assert_eq!(tr("settings.help.copy_path_tooltip"), "Copy path");
86 assert_eq!(tr("settings.help.copy_path_tooltip"), "Copy path");
84 assert_eq!(tr("settings.help.debug_logging"), "Debug logging");
87 assert_eq!(tr("settings.help.debug_logging"), "Debug logging");
85 apply_locale("de");
88 apply_locale("de");
@@ -87,7 +90,10 @@ mod tests {
87 assert_eq!(tr("settings.help.create_bundle_button"), "Erstellen");
90 assert_eq!(tr("settings.help.create_bundle_button"), "Erstellen");
88 assert_eq!(tr("settings.help.logs_path"), "Log-Root");
91 assert_eq!(tr("settings.help.logs_path"), "Log-Root");
89 assert_eq!(tr("settings.help.bundles_path"), "Support-Pakete");
92 assert_eq!(tr("settings.help.bundles_path"), "Support-Pakete");
90 assert_eq!(tr("settings.help.packages_empty"), "Noch keine Support-Pakete");
93 assert_eq!(
94 tr("settings.help.packages_empty"),
95 "Noch keine Support-Pakete"
96 );
91 assert_eq!(tr("settings.help.copy_path_tooltip"), "Pfad kopieren");
97 assert_eq!(tr("settings.help.copy_path_tooltip"), "Pfad kopieren");
92 assert_eq!(tr("settings.help.debug_logging"), "Debug-Protokollierung");
98 assert_eq!(tr("settings.help.debug_logging"), "Debug-Protokollierung");
93 assert!(tr("settings.help.detail").contains("Support-Paket"));
99 assert!(tr("settings.help.detail").contains("Support-Paket"));
crates/app/src/settings/help.rs +29 −24
@@ -206,9 +206,11 @@ impl HelpView {
206 206 .child(title),
207 207 )
208 208 .child(Self::copy_path_button(copy_id, path.clone()))
209 .child(text_button(open_id, tr("common.open")).on_click(move |_, _, _| {
210 Self::reveal_path(&open_path);
211 })),
209 .child(
210 text_button(open_id, tr("common.open")).on_click(move |_, _, _| {
211 Self::reveal_path(&open_path);
212 }),
213 ),
212 214 )
213 215 .child(
214 216 div()
@@ -376,9 +378,8 @@ impl HelpView {
376 378 .gap(px(8.))
377 379 .items_center()
378 380 .child(
379 text_button("settings-help-preview-back", tr("common.close")).on_click(
380 cx.listener(|this, _, _, cx| this.close_preview(cx)),
381 ),
381 text_button("settings-help-preview-back", tr("common.close"))
382 .on_click(cx.listener(|this, _, _, cx| this.close_preview(cx))),
382 383 )
383 384 .child(
384 385 div()
@@ -475,11 +476,14 @@ impl HelpView {
475 476 control_row(
476 477 tr("settings.help.clear_logs"),
477 478 tr("settings.help.clear_logs_detail"),
478 text_button("settings-help-clear-logs", tr("settings.help.clear_logs_button"))
479 .on_click(cx.listener(move |_, _, _, cx| {
480 clear_app.update(cx, |state, cx| state.clear_diagnostic_logs(cx));
481 cx.notify();
482 })),
479 text_button(
480 "settings-help-clear-logs",
481 tr("settings.help.clear_logs_button"),
482 )
483 .on_click(cx.listener(move |_, _, _, cx| {
484 clear_app.update(cx, |state, cx| state.clear_diagnostic_logs(cx));
485 cx.notify();
486 })),
483 487 )
484 488 })
485 489 .child(caption(tr("settings.help.caption_paths")))
@@ -510,19 +514,20 @@ impl HelpView {
510 514 .child(control_row(
511 515 tr("settings.help.create_bundle"),
512 516 tr("settings.help.create_bundle_detail"),
513 text_button("settings-help-bundle", tr("settings.help.create_bundle_button"))
514 .on_click(cx.listener(move |this, _, _, cx| {
515 create_app.update(cx, |state, _| {
516 match state.create_support_bundle() {
517 Ok(bundle) => AppState::reveal_support_bundle(&bundle),
518 Err(error) => app_base::diagnostics::record(format!(
519 "support bundle: {error}"
520 )),
521 }
522 });
523 this.reload_bundles();
524 cx.notify();
525 })),
517 text_button(
518 "settings-help-bundle",
519 tr("settings.help.create_bundle_button"),
520 )
521 .on_click(cx.listener(move |this, _, _, cx| {
522 create_app.update(cx, |state, _| match state.create_support_bundle() {
523 Ok(bundle) => AppState::reveal_support_bundle(&bundle),
524 Err(error) => {
525 app_base::diagnostics::record(format!("support bundle: {error}"))
526 }
527 });
528 this.reload_bundles();
529 cx.notify();
530 })),
526 531 ))
527 532 .child(control_row(
528 533 tr("settings.help.open_issue"),
@@ -206,9 +206,11 @@ impl HelpView {
206 .child(title),
206 .child(title),
207 )
207 )
208 .child(Self::copy_path_button(copy_id, path.clone()))
208 .child(Self::copy_path_button(copy_id, path.clone()))
209 .child(text_button(open_id, tr("common.open")).on_click(move |_, _, _| {
209 .child(
210 Self::reveal_path(&open_path);
210 text_button(open_id, tr("common.open")).on_click(move |_, _, _| {
211 })),
211 Self::reveal_path(&open_path);
212 }),
213 ),
212 )
214 )
213 .child(
215 .child(
214 div()
216 div()
@@ -376,9 +378,8 @@ impl HelpView {
376 .gap(px(8.))
378 .gap(px(8.))
377 .items_center()
379 .items_center()
378 .child(
380 .child(
379 text_button("settings-help-preview-back", tr("common.close")).on_click(
381 text_button("settings-help-preview-back", tr("common.close"))
380 cx.listener(|this, _, _, cx| this.close_preview(cx)),
382 .on_click(cx.listener(|this, _, _, cx| this.close_preview(cx))),
381 ),
382 )
383 )
383 .child(
384 .child(
384 div()
385 div()
@@ -475,11 +476,14 @@ impl HelpView {
475 control_row(
476 control_row(
476 tr("settings.help.clear_logs"),
477 tr("settings.help.clear_logs"),
477 tr("settings.help.clear_logs_detail"),
478 tr("settings.help.clear_logs_detail"),
478 text_button("settings-help-clear-logs", tr("settings.help.clear_logs_button"))
479 text_button(
479 .on_click(cx.listener(move |_, _, _, cx| {
480 "settings-help-clear-logs",
480 clear_app.update(cx, |state, cx| state.clear_diagnostic_logs(cx));
481 tr("settings.help.clear_logs_button"),
481 cx.notify();
482 )
482 })),
483 .on_click(cx.listener(move |_, _, _, cx| {
484 clear_app.update(cx, |state, cx| state.clear_diagnostic_logs(cx));
485 cx.notify();
486 })),
483 )
487 )
484 })
488 })
485 .child(caption(tr("settings.help.caption_paths")))
489 .child(caption(tr("settings.help.caption_paths")))
@@ -510,19 +514,20 @@ impl HelpView {
510 .child(control_row(
514 .child(control_row(
511 tr("settings.help.create_bundle"),
515 tr("settings.help.create_bundle"),
512 tr("settings.help.create_bundle_detail"),
516 tr("settings.help.create_bundle_detail"),
513 text_button("settings-help-bundle", tr("settings.help.create_bundle_button"))
517 text_button(
514 .on_click(cx.listener(move |this, _, _, cx| {
518 "settings-help-bundle",
515 create_app.update(cx, |state, _| {
519 tr("settings.help.create_bundle_button"),
516 match state.create_support_bundle() {
520 )
517 Ok(bundle) => AppState::reveal_support_bundle(&bundle),
521 .on_click(cx.listener(move |this, _, _, cx| {
518 Err(error) => app_base::diagnostics::record(format!(
522 create_app.update(cx, |state, _| match state.create_support_bundle() {
519 "support bundle: {error}"
523 Ok(bundle) => AppState::reveal_support_bundle(&bundle),
520 )),
524 Err(error) => {
521 }
525 app_base::diagnostics::record(format!("support bundle: {error}"))
522 });
526 }
523 this.reload_bundles();
527 });
524 cx.notify();
528 this.reload_bundles();
525 })),
529 cx.notify();
530 })),
526 ))
531 ))
527 .child(control_row(
532 .child(control_row(
528 tr("settings.help.open_issue"),
533 tr("settings.help.open_issue"),
docs/decisions/0013-local-diagnostic-data-and-upstream-issues.md +1 −1
@@ -13,7 +13,7 @@ Options on the table: rename the data directory away from `ms-teams-linux`, put
13 13
14 14 ## Decision
15 15
16 Diagnostic and support artifacts live under `ProjectDirs` **local** data for the product directory name `ms-teams-linux` (legacy name kept on every OS). Layout under that root: `diagnostics.log` (+ `.1` / `.2` ring), `crash.log` (+ `.1`), `call-dumps/`, `call-reports/`, `support-bundles/support-<UTC>/`. **Debug file logging is off by default** and is toggled from Help (store key `diagnostics_enabled`) or forced with `--debug-log` / `RUSTY_TEAMS_DEBUG_LOG=1`; `crash.log` still records panics when they happen. Help shows those absolute paths. Bug reports and support README text open or name only upstream `danieldaeschle/rusty-teams`; the app does not upload and does not open the file manager by itself when filing (a notice may offer Open folder). Store/Roaming migration is not part of this decision.
16 Diagnostic and support artifacts live under `ProjectDirs` **local** data for the product directory name `ms-teams-linux` (legacy name kept on every OS). Layout under that root: `diagnostics.log` (+ `.1` / `.2` ring), `crash.log` (+ `.1`), `call-dumps/`, `call-reports/`, `support-bundles/support-<UTC>/`. The diagnostics the app always wrote (`diagnostics::record`, WebRTC audio lines, call dumps) stay on. **Detailed logging of the app's own crates is off by default** and is toggled from Help (store key `diagnostics_enabled`) or forced with `--debug-log` / `RUSTY_TEAMS_DEBUG_LOG=1`; `crash.log` still records panics when they happen. Help shows those absolute paths. Bug reports and support README text open or name only upstream `danieldaeschle/rusty-teams`; the app does not upload and does not open the file manager by itself when filing (a notice may offer Open folder). Store/Roaming migration is not part of this decision.
17 17
18 18 ## Consequences
19 19
@@ -13,7 +13,7 @@ Options on the table: rename the data directory away from `ms-teams-linux`, put
13
13
14## Decision
14## Decision
15
15
16Diagnostic and support artifacts live under `ProjectDirs` **local** data for the product directory name `ms-teams-linux` (legacy name kept on every OS). Layout under that root: `diagnostics.log` (+ `.1` / `.2` ring), `crash.log` (+ `.1`), `call-dumps/`, `call-reports/`, `support-bundles/support-<UTC>/`. **Debug file logging is off by default** and is toggled from Help (store key `diagnostics_enabled`) or forced with `--debug-log` / `RUSTY_TEAMS_DEBUG_LOG=1`; `crash.log` still records panics when they happen. Help shows those absolute paths. Bug reports and support README text open or name only upstream `danieldaeschle/rusty-teams`; the app does not upload and does not open the file manager by itself when filing (a notice may offer Open folder). Store/Roaming migration is not part of this decision.
16Diagnostic and support artifacts live under `ProjectDirs` **local** data for the product directory name `ms-teams-linux` (legacy name kept on every OS). Layout under that root: `diagnostics.log` (+ `.1` / `.2` ring), `crash.log` (+ `.1`), `call-dumps/`, `call-reports/`, `support-bundles/support-<UTC>/`. The diagnostics the app always wrote (`diagnostics::record`, WebRTC audio lines, call dumps) stay on. **Detailed logging of the app's own crates is off by default** and is toggled from Help (store key `diagnostics_enabled`) or forced with `--debug-log` / `RUSTY_TEAMS_DEBUG_LOG=1`; `crash.log` still records panics when they happen. Help shows those absolute paths. Bug reports and support README text open or name only upstream `danieldaeschle/rusty-teams`; the app does not upload and does not open the file manager by itself when filing (a notice may offer Open folder). Store/Roaming migration is not part of this decision.
17
17
18## Consequences
18## Consequences
19
19