huskies: merge 1076

This commit is contained in:
dave
2026-05-15 00:02:04 +00:00
parent da83fcb78d
commit 5f08573db8
+10 -9
View File
@@ -215,11 +215,12 @@ pub(crate) fn build_status_from_items(
out out
} }
/// Render the one-line working tree summary for a story with uncommitted changes. /// Return an inline working-tree suffix for a story with uncommitted changes.
/// ///
/// Returns an empty string when the working tree is clean. File paths are not /// Returns an empty string when the working tree is clean. The suffix is
/// listed here; use `status N` (triage) for the per-file breakdown. /// appended directly to the coder line, e.g. `, Working tree: 3 modified (uncommitted)`.
fn render_working_tree_lines(info: &crate::service::git_ops::DirtyFiles) -> String { /// File paths are not listed here; use `status N` (triage) for the per-file breakdown.
fn working_tree_suffix(info: &crate::service::git_ops::DirtyFiles) -> String {
if info.is_clean() { if info.is_clean() {
return String::new(); return String::new();
} }
@@ -228,7 +229,7 @@ fn render_working_tree_lines(info: &crate::service::git_ops::DirtyFiles) -> Stri
(0, n) => format!("{n} new"), (0, n) => format!("{n} new"),
(m, n) => format!("{m} modified, {n} new"), (m, n) => format!("{m} modified, {n} new"),
}; };
format!(" Working tree: {summary} (uncommitted)\n") format!(", Working tree: {summary} (uncommitted)")
} }
/// Shared lookup tables passed to [`render_item_line`] to keep the argument count manageable. /// Shared lookup tables passed to [`render_item_line`] to keep the argument count manageable.
@@ -378,9 +379,9 @@ fn render_item_line(
.and_then(|a| a.throttled) .and_then(|a| a.throttled)
.is_some_and(|until| until > chrono::Utc::now()); .is_some_and(|until| until > chrono::Utc::now());
let dot = super::traffic_light_dot(blocked, throttled, agent.is_some()); let dot = super::traffic_light_dot(blocked, throttled, agent.is_some());
let wt_lines = dirty_files_by_story let wt_suffix = dirty_files_by_story
.get(story_id) .get(story_id)
.map(render_working_tree_lines) .map(working_tree_suffix)
.unwrap_or_default(); .unwrap_or_default();
if let Some(agent) = agent { if let Some(agent) = agent {
let model_str = config let model_str = config
@@ -389,10 +390,10 @@ fn render_item_line(
.and_then(|ac| ac.model.as_ref().map(|m| m.as_str())) .and_then(|ac| ac.model.as_ref().map(|m| m.as_str()))
.unwrap_or("?"); .unwrap_or("?");
format!( format!(
" {dot}{display}{cost_suffix}{dep_suffix}{} ({model_str})\n{wt_lines}", " {dot}{display}{cost_suffix}{dep_suffix}{} ({model_str}){wt_suffix}\n",
agent.agent_name agent.agent_name
) )
} else { } else {
format!(" {dot}{display}{cost_suffix}{dep_suffix}\n{wt_lines}") format!(" {dot}{display}{cost_suffix}{dep_suffix}{wt_suffix}\n")
} }
} }