Land release blocker fixes and workspace cleanup
This commit is contained in:
@@ -19,6 +19,7 @@ use kon_storage::{
|
||||
app_data_dir, crashes_dir, list_recent_errors, log_error, logs_dir, ErrorLogRow,
|
||||
};
|
||||
|
||||
use crate::commands::power::active_assertions_snapshot;
|
||||
use crate::AppState;
|
||||
|
||||
const DEFAULT_RECENT_ERRORS: i64 = 50;
|
||||
@@ -290,6 +291,20 @@ pub async fn generate_diagnostic_report(
|
||||
}
|
||||
}
|
||||
|
||||
out.push_str("## Power assertions\n\n");
|
||||
let power_assertions = active_assertions_snapshot();
|
||||
if power_assertions.is_empty() {
|
||||
out.push_str("_(no active power assertions at report time)_\n\n");
|
||||
} else {
|
||||
for assertion in power_assertions {
|
||||
out.push_str(&format!(
|
||||
"- `#{}` reason=`{}` backend=`{}` acquired=`{}`\n",
|
||||
assertion.id, assertion.reason, assertion.backend, assertion.acquired
|
||||
));
|
||||
}
|
||||
out.push('\n');
|
||||
}
|
||||
|
||||
if opts.include_crashes {
|
||||
out.push_str("## Crash dumps\n\n");
|
||||
let crashes = list_crash_files().await.unwrap_or_default();
|
||||
|
||||
Reference in New Issue
Block a user