huskies: merge 487_story_display_story_dependencies_in_web_ui_and_chat_commands

This commit is contained in:
dave
2026-04-07 11:46:25 +00:00
parent 05eb13eab3
commit 4e082009c2
8 changed files with 140 additions and 4 deletions
+23
View File
@@ -111,6 +111,12 @@ fn build_triage_dump(
if let Some(ref mf) = m.merge_failure {
fields.push(format!("**merge_failure:** {mf}"));
}
if let Some(ref deps) = m.depends_on
&& !deps.is_empty()
{
let nums: Vec<String> = deps.iter().map(|n| format!("#{n}")).collect();
fields.push(format!("**depends_on:** {}", nums.join(", ")));
}
if !fields.is_empty() {
out.push_str("**Front matter:**\n");
for f in &fields {
@@ -445,6 +451,23 @@ mod tests {
);
}
#[test]
fn whatsup_shows_depends_on_field() {
let tmp = tempfile::TempDir::new().unwrap();
write_story_file(
tmp.path(),
"2_current",
"55_story_depends_story.md",
"---\nname: Depends Story\ndepends_on: [477, 478]\n---\n",
);
let output = status_triage_cmd(tmp.path(), "55").unwrap();
assert!(
output.contains("depends_on") || output.contains("#477"),
"should show depends_on field: {output}"
);
assert!(output.contains("478"), "should list all dependency numbers: {output}");
}
#[test]
fn whatsup_no_worktree_shows_not_created() {
let tmp = tempfile::TempDir::new().unwrap();