wip(929): stage 2 — migrate chat/transport/matrix/* off yaml_legacy
delete.rs, start.rs, assign.rs all looked up the story name by reading
the content from disk/store and parsing the front matter. Replaced with
`crdt_state::read_item(&story_id).and_then(|w| w.name())`. Each callsite's
fallback chain ("CRDT → content store → filesystem") still locates the
story_id; only the name extraction moved off YAML.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,7 @@ pub async fn handle_delete(
|
||||
agents: &AgentPool,
|
||||
) -> String {
|
||||
// Find the story by numeric prefix: CRDT → content store → filesystem.
|
||||
let (story_id, stage, _path, content) =
|
||||
let (story_id, stage, _path, _content) =
|
||||
match crate::chat::lookup::find_story_by_number(project_root, story_number) {
|
||||
Some(found) => found,
|
||||
None => {
|
||||
@@ -69,12 +69,9 @@ pub async fn handle_delete(
|
||||
}
|
||||
};
|
||||
|
||||
let story_name = content
|
||||
.and_then(|contents| {
|
||||
crate::db::yaml_legacy::parse_front_matter(&contents)
|
||||
.ok()
|
||||
.and_then(|m| m.name)
|
||||
})
|
||||
// Story name comes from the CRDT name register (story 929).
|
||||
let story_name = crate::crdt_state::read_item(&story_id)
|
||||
.and_then(|w| w.name().map(str::to_string))
|
||||
.unwrap_or_else(|| story_id.clone());
|
||||
|
||||
let outcome = match crate::service::work_item::delete::delete_work_item(
|
||||
|
||||
Reference in New Issue
Block a user