Formatting

This commit is contained in:
2026-04-19 15:35:10 +02:00
parent 041f9015ca
commit 0d5c2f5888
42 changed files with 612 additions and 357 deletions
+5 -14
View File
@@ -14,9 +14,9 @@ use std::sync::Arc;
use std::time::{Duration, Instant};
use doctate_client_core::{
pick_footer_status, run_startup_cleanup, write_sidecar, CaseMarker, CaseStore, FooterStatus,
CaseMarker, CaseStore, DEFAULT_MARKER_RETENTION, DEFAULT_ORPHAN_AUDIO_RETENTION, FooterStatus,
PendingUpload, ServerSync, SnapshotCache, SyncConfig, UploadEvent, WorkerSnapshot, WorkerState,
DEFAULT_MARKER_RETENTION, DEFAULT_ORPHAN_AUDIO_RETENTION,
pick_footer_status, run_startup_cleanup, write_sidecar,
};
use doctate_common::timestamp::{
extract_hhmm, now_rfc3339, parse_rfc3339, recorded_at_to_filename_stem,
@@ -157,10 +157,7 @@ impl DoctateApp {
.config
.as_ref()
.and_then(|c| c.oneliner_poll_interval_seconds),
oneliner_window_hours: self
.config
.as_ref()
.and_then(|c| c.oneliner_window_hours),
oneliner_window_hours: self.config.as_ref().and_then(|c| c.oneliner_window_hours),
};
if let Err(e) = crate::config::save(&cfg) {
error!(error = %e, "config save failed");
@@ -415,9 +412,7 @@ impl DoctateApp {
match &self.state {
AppState::NotConfigured => {
ui.label("Server URL:");
ui.add(
egui::TextEdit::singleline(&mut self.server_url_input).desired_width(280.0),
);
ui.add(egui::TextEdit::singleline(&mut self.server_url_input).desired_width(280.0));
ui.add_space(4.0);
ui.label("API Key:");
ui.add(
@@ -463,11 +458,7 @@ impl DoctateApp {
fn render_case_list(&self, ui: &mut egui::Ui) -> Option<UiAction> {
let snapshot = self.snapshot_rx.borrow().clone();
let window = self
.config
.as_ref()
.map(Config::window_hours)
.unwrap_or(72);
let window = self.config.as_ref().map(Config::window_hours).unwrap_or(72);
let cutoff = time::OffsetDateTime::now_utc() - time::Duration::hours(window as i64);
let visible: Vec<&CaseMarker> = snapshot
+4 -1
View File
@@ -39,6 +39,9 @@ mod tests {
// Sanity check on the ProjectDirs wiring — can't assert the
// exact path (varies per host), but the filename is deterministic.
let path = default_config_path().expect("config path available in test env");
assert_eq!(path.file_name().and_then(|s| s.to_str()), Some("client.toml"));
assert_eq!(
path.file_name().and_then(|s| s.to_str()),
Some("client.toml")
);
}
}
+3 -1
View File
@@ -168,7 +168,9 @@ async fn finalize(
// non-empty. Real corruption will surface server-side at decode.
let event = match timeout(STOP_GRACEFUL_TIMEOUT, child.wait()).await {
Ok(Ok(status)) => match tokio::fs::metadata(&output_path).await {
Ok(meta) if meta.len() > 0 => RecorderEvent::Finished { output: output_path },
Ok(meta) if meta.len() > 0 => RecorderEvent::Finished {
output: output_path,
},
Ok(_) => RecorderEvent::Failed {
error: format!("ffmpeg exit {status} and empty output"),
},
+1 -3
View File
@@ -23,9 +23,7 @@ pub enum AppState {
started_at: Instant,
},
/// Terminal error; user must dismiss or fix config.
Error {
message: String,
},
Error { message: String },
}
impl AppState {