(1f1b321) Record a move's reason in its history entry, and bump to 0.31.2
This commit is contained in:
+28
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user