huskies: merge 891

This commit is contained in:
dave
2026-05-12 17:03:41 +00:00
parent b76633b79b
commit 148ce37beb
20 changed files with 418 additions and 262 deletions
+11 -6
View File
@@ -32,14 +32,19 @@ pub(crate) fn find_story_by_number(
// initialised (e.g. in unit tests or very early startup).
if let Some(items) = crate::crdt_state::read_all_items() {
for item in items {
if item.story_id.split('_').next().unwrap_or("") == number {
if item.story_id().split('_').next().unwrap_or("") == number {
let path = project_root
.join(".huskies")
.join("work")
.join(&item.stage)
.join(format!("{}.md", item.story_id));
let content = crate::db::read_content(&item.story_id);
return Some((item.story_id, item.stage, path, content));
.join(item.stage_str())
.join(format!("{}.md", item.story_id()));
let content = crate::db::read_content(item.story_id());
return Some((
item.story_id().to_string(),
item.stage_str().to_string(),
path,
content,
));
}
}
}
@@ -53,7 +58,7 @@ pub(crate) fn find_story_by_number(
continue;
}
let stage_dir = crate::crdt_state::read_item(&id)
.map(|v| v.stage)
.map(|v| v.stage_str().to_string())
.unwrap_or_else(|| "1_backlog".to_string());
let path = project_root
.join(".huskies")