diff --git a/lib/crates/fabro-cli/src/main.rs b/lib/crates/fabro-cli/src/main.rs index 2411ead71..4b639e793 100644 --- a/lib/crates/fabro-cli/src/main.rs +++ b/lib/crates/fabro-cli/src/main.rs @@ -218,6 +218,8 @@ fn detach_run(args: fabro_workflows::cli::RunArgs) -> Result<()> { )) }); std::fs::create_dir_all(&run_dir)?; + std::fs::write(run_dir.join("id.txt"), &run_id)?; + std::fs::File::create(run_dir.join("progress.jsonl"))?; let log_file = std::fs::File::create(run_dir.join("detach.log"))?; diff --git a/lib/crates/fabro-workflows/src/cli/runs.rs b/lib/crates/fabro-workflows/src/cli/runs.rs index 472684edd..dfd2e1301 100644 --- a/lib/crates/fabro-workflows/src/cli/runs.rs +++ b/lib/crates/fabro-workflows/src/cli/runs.rs @@ -161,8 +161,12 @@ pub fn scan_runs(base: &Path) -> Result> { .map(|t| -> DateTime { t.into() }); let mtime = mtime_dt.map(|dt| dt.to_rfc3339()).unwrap_or_default(); + let run_id = std::fs::read_to_string(path.join("id.txt")) + .map(|s| s.trim().to_string()) + .unwrap_or_else(|_| dir_name.clone()); + runs.push(RunInfo { - run_id: dir_name.clone(), + run_id, dir_name, workflow_name: "[no manifest]".to_string(), workflow_slug: None,