diff --git a/src/auto_task/app_generator.rs b/src/auto_task/app_generator.rs index e0bf5c1dc..5d5804694 100644 --- a/src/auto_task/app_generator.rs +++ b/src/auto_task/app_generator.rs @@ -701,6 +701,16 @@ impl AppGenerator { item.duration_seconds = Some((Utc::now() - started).num_seconds() as u64); } child.current_step += 1; + + // Check if all items in child are completed, then mark child as completed + let all_completed = child.items.iter().all(|i| i.status == crate::auto_task::ItemStatus::Completed); + if all_completed && !child.items.is_empty() { + child.status = SectionStatus::Completed; + child.completed_at = Some(Utc::now()); + if let Some(started) = child.started_at { + child.duration_seconds = Some((Utc::now() - started).num_seconds() as u64); + } + } } found = true; break; diff --git a/src/tasks/mod.rs b/src/tasks/mod.rs index fedb7b1e7..72ab8609f 100644 --- a/src/tasks/mod.rs +++ b/src/tasks/mod.rs @@ -922,7 +922,7 @@ fn build_progress_log_from_web_json(manifest: &serde_json::Value) -> String { html } -fn build_status_section_html(manifest: &TaskManifest, title: &str, runtime: &str) -> String { +fn build_status_section_html(manifest: &TaskManifest, _title: &str, runtime: &str) -> String { let mut html = String::new(); let current_action = manifest.current_status.current_action.as_deref().unwrap_or("Processing...");