From e73458efef6eec38ca0ce2b0e0274f8772377076 Mon Sep 17 00:00:00 2001 From: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 Date: Tue, 4 Aug 2026 02:06:54 -0400 Subject: [PATCH] fix(desktop): resolve clippy empty_line_after_doc_comments in file-size extractions Two extraction sites had doc comment blocks adjacent with blank lines, triggering clippy::empty_line_after_doc_comments: - team_snapshot.rs: moved mod/use declarations before the doc block of confirm_team_snapshot_import (no longer adjacent to the doc comment). - runtime_commands.rs: inserted a non-doc // separator line directly between the compensate_drain and compensate_drain_for doc blocks (no blank line between // and /// so clippy treats them as connected). Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- .../src/commands/personas/snapshot/import.rs | 2 -- desktop/src-tauri/src/commands/team_snapshot.rs | 16 ++++++---------- .../src/managed_agents/runtime_commands.rs | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/desktop/src-tauri/src/commands/personas/snapshot/import.rs b/desktop/src-tauri/src/commands/personas/snapshot/import.rs index da29c251e..a06fc61e9 100644 --- a/desktop/src-tauri/src/commands/personas/snapshot/import.rs +++ b/desktop/src-tauri/src/commands/personas/snapshot/import.rs @@ -404,8 +404,6 @@ pub(crate) fn build_agent_snapshot_import_preview( #[path = "import_entry.rs"] mod import_entry; pub(crate) use import_entry::capture_agent_snapshot_import_entry; -#[cfg(test)] -pub(crate) use import_entry::AgentSnapshotImportEntry; // ── `confirm_agent_snapshot_import` ────────────────────────────────────────── diff --git a/desktop/src-tauri/src/commands/team_snapshot.rs b/desktop/src-tauri/src/commands/team_snapshot.rs index bbbd4bd2e..1963f92c0 100644 --- a/desktop/src-tauri/src/commands/team_snapshot.rs +++ b/desktop/src-tauri/src/commands/team_snapshot.rs @@ -476,6 +476,12 @@ pub async fn preview_team_snapshot_import( .map_err(|e| format!("spawn_blocking failed: {e}"))? } +// Entry guard helper for `confirm_team_snapshot_import` — extracted to a +// separate file to keep `team_snapshot.rs` within the line-count ratchet. +#[path = "team_snapshot_entry.rs"] +mod team_snapshot_entry; +pub(crate) use team_snapshot_entry::capture_team_snapshot_import_entry; + /// Import a team snapshot, minting full agent instances for every member. /// /// Phase sequence: @@ -498,16 +504,6 @@ pub async fn preview_team_snapshot_import( /// /// Importing the same file twice yields two distinct teams with different /// agent keypairs (same as individual agent import). - -// ── `confirm_team_snapshot_import` entry guards ─────────────────────────────── -// -// Extracted to `team_snapshot_entry.rs` to keep this file within the size ratchet. -#[path = "team_snapshot_entry.rs"] -mod team_snapshot_entry; -pub(crate) use team_snapshot_entry::capture_team_snapshot_import_entry; -#[cfg(test)] -pub(crate) use team_snapshot_entry::TeamSnapshotImportEntry; - #[tauri::command] pub async fn confirm_team_snapshot_import( input: TeamSnapshotImportConfirm, diff --git a/desktop/src-tauri/src/managed_agents/runtime_commands.rs b/desktop/src-tauri/src/managed_agents/runtime_commands.rs index d2ddeae82..9d1140e8b 100644 --- a/desktop/src-tauri/src/managed_agents/runtime_commands.rs +++ b/desktop/src-tauri/src/managed_agents/runtime_commands.rs @@ -839,7 +839,7 @@ pub(crate) fn drain_scope_runtimes( /// The journal-restore loop is implemented in [`compensate_drain_for`] with an /// injected start function, allowing the generation-validation + iteration /// contract to be unit-tested without an `AppHandle`. - +// ──────────────────────────────────────────────────────────────────────────── /// Testable core of [`compensate_drain`]: re-acquires the store lock, validates /// the captured scope generation, then calls `start_fn` for each stopped entry. ///