(1f1b321) Record a move's reason in its history entry, and bump to 0.31.2

This commit is contained in:
Ansho Rei
2026-08-25 10:38:04 +02:00
parent 60b43a682e
commit ab337ca7f8
10 changed files with 310 additions and 22 deletions
+28
View File
@@ -5167,6 +5167,34 @@ mod tests {
);
}
/// The board and `show` share one layout, so the reason a move carries renders
/// indented under the row it explains in the overlay too — attached to its
/// transition rather than sitting apart like a comment.
#[test]
fn the_detail_view_renders_a_reason_under_its_row() {
let dir = board_dir();
let uuid = "11111111-0000-4000-8000-000000000000";
write_ticket(&dir, "backlog", uuid, "First one", "");
let history = crate::history::history_dir(&dir, uuid);
std::fs::create_dir_all(&history).unwrap();
std::fs::write(
history.join("20260821_120000_000000_status.md"),
"**Status**\nreviewing → backlog\n\n**Author**: claude\n**Time**: 2026-08-21 \
12:00:00\n**Reason**: sent back, wrong approach\n",
)
.unwrap();
let mut board = one_board(&dir);
board.toggle_detail();
let plain = board.detail.as_ref().expect("no detail").plain();
let expected = "status reviewing → backlog claude (2026-08-21 12:00:00)\n sent back, wrong \
approach";
assert!(plain.contains(expected), "{plain}");
assert!(!plain.contains('\x1b'), "escapes reached the detail view: {plain:?}");
}
/// The reported bug: the modal showed a description, criteria and a metadata
/// table belonging to a ticket it never named.
#[test]