From 75e79cf09aba850aef27efa126b3a9fa05cbb357 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Thu, 12 Feb 2026 14:47:09 -0800 Subject: [PATCH] docs: require insta snapshot coverage for UI changes (#10669) Adds an explicit requirement in AGENTS.md that any user-visible UI change includes corresponding insta snapshot coverage and that snapshots are reviewed/accepted in the PR. Tests: N/A (docs only) --- AGENTS.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 62f303769..fc545c508 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -60,7 +60,14 @@ See `codex-rs/tui/styles.md`. ### Snapshot tests -This repo uses snapshot tests (via `insta`), especially in `codex-rs/tui`, to validate rendered output. When UI or text output changes intentionally, update the snapshots as follows: +This repo uses snapshot tests (via `insta`), especially in `codex-rs/tui`, to validate rendered output. + +**Requirement:** any change that affects user-visible UI (including adding new UI) must include +corresponding `insta` snapshot coverage (add a new snapshot test if one doesn't exist yet, or +update the existing snapshot). Review and accept snapshot updates as part of the PR so UI impact +is easy to review and future diffs stay visual. + +When UI or text output changes intentionally, update the snapshots as follows: - Run tests to generate any updated snapshots: - `cargo test -p codex-tui`