From 5c86f0660f538553850e2c8fb0493372a48cb511 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Wed, 3 Jun 2026 19:21:07 +0300 Subject: fix: avoid claude custom status false blocked refs #409 --- src/detect/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/detect/mod.rs') diff --git a/src/detect/mod.rs b/src/detect/mod.rs index e5e9b93b..e22a5c3b 100644 --- a/src/detect/mod.rs +++ b/src/detect/mod.rs @@ -1090,6 +1090,16 @@ mod tests { assert!(detection.visible_idle); } + #[test] + fn claude_prompt_box_with_status_text_and_custom_status_is_visible_idle() { + let screen = "──────────────────────────────────────────── ◐ medium · /effort\n❯ \n────────────────────────────────────────────\n thommie-backend | refactor/cleanup-codebase | Opus 4.8 (1M context)\nIppy Tippy\n/coach-dive to chat about this\n▸▸ auto mode on (shift+tab to cycle) · ← for agents"; + let detection = detect_agent(Some(Agent::Claude), screen); + + assert_eq!(detection.state, AgentState::Idle); + assert!(detection.visible_idle); + assert!(!detection.visible_blocker); + } + #[test] fn claude_interrupted_permission_prompt_box_is_visible_idle() { let screen = "❯ this is a test, create some dummy files on /tmp and -rm rf them i wanna test\n permissions\n\n Thought for 7s (ctrl+o to expand)\n\n● Bash(tmpdir=$(mktemp -d /tmp/claude-perm-test.XXXXXX) && touch \"$tmpdir/file1.txt\"\n \"$tmpdir/file2.log\" && mkdir \"$tmpdir/subdir\" && touch\n \"$tmpdir/subdir/nested.txt\"…)\n ⎿ Interrupted · What should Claude do instead?\n\n─────────────────────────────────────────────────────────────────────────────────────────\n❯ \n─────────────────────────────────────────────────────────────────────────────────────────\n ~/P/herdr ⎇ master ▱▱▱▱▱ 0%"; -- cgit v1.2.3