diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index e229f49295..cf69fb5ec2 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -2302,6 +2302,22 @@ mod tests { insta::assert_snapshot!(rendered); } + #[test] + fn context_compaction_active_snapshot() { + let cell = new_active_context_compaction("compaction-1".to_string(), false); + let rendered = render_lines(&cell.display_lines(64)).join("\n"); + + insta::assert_snapshot!(rendered); + } + + #[test] + fn context_compaction_completed_snapshot() { + let cell = new_context_compaction_completed("compaction-1".to_string()); + let rendered = render_lines(&cell.display_lines(64)).join("\n"); + + insta::assert_snapshot!(rendered); + } + #[test] fn active_mcp_tool_call_snapshot() { let invocation = McpInvocation { diff --git a/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__context_compaction_active_snapshot.snap b/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__context_compaction_active_snapshot.snap new file mode 100644 index 0000000000..653b159df3 --- /dev/null +++ b/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__context_compaction_active_snapshot.snap @@ -0,0 +1,5 @@ +--- +source: tui/src/history_cell.rs +expression: rendered +--- +• Compacting context diff --git a/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__context_compaction_completed_snapshot.snap b/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__context_compaction_completed_snapshot.snap new file mode 100644 index 0000000000..ea14cbf989 --- /dev/null +++ b/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__context_compaction_completed_snapshot.snap @@ -0,0 +1,5 @@ +--- +source: tui/src/history_cell.rs +expression: rendered +--- +• Context compacted.