diff --git a/crates/arc-workflows/src/cli/progress.rs b/crates/arc-workflows/src/cli/progress.rs index 4501023a8..5af9c3e17 100644 --- a/crates/arc-workflows/src/cli/progress.rs +++ b/crates/arc-workflows/src/cli/progress.rs @@ -695,6 +695,24 @@ impl ProgressUI { } } + pub fn show_base_info(&mut self, branch: Option<&str>, sha: &str) { + let short_sha = &sha[..sha.len().min(12)]; + let text = match branch { + Some(b) => format!("Base: {b} ({short_sha})"), + None => format!("Base: {short_sha}"), + }; + match &self.renderer { + ProgressRenderer::Tty(tty) => { + let bar = tty.multi.add(ProgressBar::new_spinner()); + bar.set_style(style_static_dim()); + bar.finish_with_message(text); + } + ProgressRenderer::Plain => { + eprintln!(" {text}"); + } + } + } + // ── Stages ────────────────────────────────────────────────────────── fn on_stage_started(&mut self, node_id: &str, name: &str, script: Option<&str>) { diff --git a/crates/arc-workflows/src/cli/run.rs b/crates/arc-workflows/src/cli/run.rs index ef1727cdd..3bf2fcb72 100644 --- a/crates/arc-workflows/src/cli/run.rs +++ b/crates/arc-workflows/src/cli/run.rs @@ -550,6 +550,13 @@ pub async fn run_command( .show_worktree(wt); } + if let Some(ref sha) = worktree_base_sha { + progress_ui + .lock() + .expect("progress lock poisoned") + .show_base_info(detected_base_branch.as_deref(), sha); + } + let cwd = std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")); let daytona_config = resolve_daytona_config(run_cfg.as_ref(), &run_defaults); let exe_config = resolve_exe_config(run_cfg.as_ref(), &run_defaults); @@ -715,6 +722,18 @@ pub async fn run_command( (None, None, None) }; + if worktree_base_sha.is_none() { + if let Some(ref sha) = remote_base_sha { + let branch = detected_base_branch + .as_deref() + .or(remote_base_branch.as_deref()); + progress_ui + .lock() + .expect("progress lock poisoned") + .show_base_info(branch, sha); + } + } + // Create SSH access if requested if args.ssh { match sandbox.ssh_access_command().await {