huskies: merge 1141 story Convert work-item type between spike/story/bug/refactor (or at least spike→story)

This commit is contained in:
dave
2026-05-18 14:50:00 +00:00
parent 5062e008c6
commit 95c0aafb68
12 changed files with 487 additions and 7 deletions
+7
View File
@@ -33,6 +33,8 @@ pub struct CrdtItemDump {
pub is_deleted: bool,
/// Origin JSON string, or `None` for items that pre-date story 1088.
pub origin: Option<String>,
/// Explicit item type register, or `None` when unset (infer from story_id prefix).
pub item_type: Option<String>,
}
/// Top-level debug dump of the in-memory CRDT state.
@@ -162,6 +164,10 @@ pub fn dump_crdt_state(story_id_filter: Option<&str>) -> CrdtStateDump {
JsonValue::String(s) if !s.is_empty() => Some(s),
_ => None,
};
let item_type = match item_crdt.item_type.view() {
JsonValue::String(s) if !s.is_empty() => Some(s),
_ => None,
};
let content_index = op.id.iter().map(|b| format!("{b:02x}")).collect::<String>();
@@ -177,6 +183,7 @@ pub fn dump_crdt_state(story_id_filter: Option<&str>) -> CrdtStateDump {
content_index,
is_deleted: op.is_deleted,
origin,
item_type,
});
}