From 3acd499ffb1119e8032bbcba3f1f46d4ff5f3da9 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 31 May 2026 03:00:46 +0300 Subject: fix: keep codex visible approval review working --- src/detect/mod.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/detect/mod.rs') diff --git a/src/detect/mod.rs b/src/detect/mod.rs index 6173415b..cf600f51 100644 --- a/src/detect/mod.rs +++ b/src/detect/mod.rs @@ -1211,6 +1211,30 @@ mod tests { assert!(!detection.visible_idle); } + #[test] + fn codex_reviewing_approval_request_without_prompt_is_visible_working() { + let detection = detect_agent( + Some(Agent::Codex), + "• Running git push --force-with-lease origin codex/ci-flake-diagnostics\n\n• Reviewing approval request (2m 53s • esc to interrupt)\n └ /bin/zsh -lc 'git push --force-with-lease origin codex/ci-flake-diagnostics'", + ); + + assert_eq!(detection.state, AgentState::Working); + assert!(detection.visible_working); + assert!(!detection.visible_idle); + } + + #[test] + fn codex_reviewing_multiple_approval_requests_is_visible_working() { + let detection = detect_agent( + Some(Agent::Codex), + "• Reviewing 2 approval requests (0s • esc to interrupt)\n\n\n› Summarize recent commits\n\n ~/Projects/herdr · master", + ); + + assert_eq!(detection.state, AgentState::Working); + assert!(detection.visible_working); + assert!(!detection.visible_idle); + } + #[test] fn codex_booting_mcp_server_is_visible_working() { let detection = detect_agent( -- cgit v1.2.3