huskies: merge 872

This commit is contained in:
dave
2026-04-29 15:54:33 +00:00
parent 7505f7fdeb
commit 9bd3c10a09
10 changed files with 147 additions and 12 deletions
+9 -3
View File
@@ -81,6 +81,8 @@ pub(super) fn handle_depends(ctx: &CommandContext) -> Option<String> {
.map(|i| i.stage.dir_name().to_string())
.unwrap_or_else(|| stage_dir.clone());
crate::db::write_item_with_content(&story_id, &stage, &updated);
// Sync depends_on to the typed CRDT register.
crate::crdt_state::set_depends_on(&story_id, &deps);
if deps.is_empty() {
Some(format!(
"Cleared all dependencies for **{story_name}** ({story_id})."
@@ -94,10 +96,14 @@ pub(super) fn handle_depends(ctx: &CommandContext) -> Option<String> {
}
} else {
match write_depends_on(&path, &deps) {
Ok(()) if deps.is_empty() => Some(format!(
"Cleared all dependencies for **{story_name}** ({story_id})."
)),
Ok(()) if deps.is_empty() => {
crate::crdt_state::set_depends_on(&story_id, &[]);
Some(format!(
"Cleared all dependencies for **{story_name}** ({story_id})."
))
}
Ok(()) => {
crate::crdt_state::set_depends_on(&story_id, &deps);
let nums: Vec<String> = deps.iter().map(|n| n.to_string()).collect();
Some(format!(
"Set depends_on: [{}] for **{story_name}** ({story_id}).",