huskies: merge 984
This commit is contained in:
@@ -69,6 +69,20 @@ pub fn apply_transition(
|
||||
// Write the new stage to the CRDT (with optional content transform).
|
||||
crate::db::move_item_stage(story_id, new_dir, content_transform);
|
||||
|
||||
// Write stage-specific metadata into the shared `resume_to` register.
|
||||
// Story 984: Superseded and Rejected stages reuse `resume_to` to carry
|
||||
// their metadata (superseded_by ID and rejection reason respectively),
|
||||
// since these stages never have a resume target.
|
||||
match &after {
|
||||
super::Stage::Superseded { superseded_by, .. } => {
|
||||
crate::crdt_state::set_resume_to_raw(story_id, &superseded_by.0);
|
||||
}
|
||||
super::Stage::Rejected { reason, .. } => {
|
||||
crate::crdt_state::set_resume_to_raw(story_id, reason);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
let fired = TransitionFired {
|
||||
story_id: StoryId(story_id.to_string()),
|
||||
before,
|
||||
|
||||
Reference in New Issue
Block a user