From 9ae8f7f3aca92554d79c12c649b056eedf65518c Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Tue, 10 Feb 2026 12:00:30 -0800 Subject: [PATCH] refactor: Update Card snapshots to improve formatting and add new card states --- .../shared/__snapshots__/Card.test.tsx.snap | 53 +++++++++++-------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/packages/cli/src/ui/components/shared/__snapshots__/Card.test.tsx.snap b/packages/cli/src/ui/components/shared/__snapshots__/Card.test.tsx.snap index c49e8bad33..460420f936 100644 --- a/packages/cli/src/ui/components/shared/__snapshots__/Card.test.tsx.snap +++ b/packages/cli/src/ui/components/shared/__snapshots__/Card.test.tsx.snap @@ -1,40 +1,51 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Card > renders ''Delegate to agent'' card with status='Canceled' and showStatusIndicator=true 1`] = ` -"╭ - Delegate to agent Delegating to agent 'cli_help' ──────────────────────────────────────────────╮ -│ 🤖💭 Execution limit reached (ERROR_NO_COMPLETE_TASK_CALL). Attempting one final recovery turn │ -│ with a grace period. │ -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +"╭ - Delegate to agent Delegating to agent 'cli_help' ──────────────────────────────────────────────────────────────────╮ +│ 🤖💭 Execution limit reached (ERROR_NO_COMPLETE_TASK_CALL). Attempting one final recovery turn with a grace period. │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯" `; exports[`Card > renders ''Error'' card with status='Error' and showStatusIndicator=true 1`] = ` -"╭ x Error 429 You exceeded your current quota ─────────────────────────────────────────────────────╮ -│ Go to https://aistudio.google.com/apikey to upgrade your quota tier, or submit a quota increase │ -│ request in https://ai.google.dev/gemini-api/docs/rate-limits │ -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +"╭ x Error 429 You exceeded your current quota ─────────────────────────────────────────────────────────────────────────╮ +│ Go to https://aistudio.google.com/apikey to upgrade your quota tier, or submit a quota increase request in │ +│ https://ai.google.dev/gemini-api/docs/rate-limits │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯" `; exports[`Card > renders ''Fixed Width Card'' card with status='Pending' and showStatusIndicator=true 1`] = ` -"╭ o Fixed Width Card ──────────────────╮ -│ This card has a fixed width of 40 │ -│ characters. │ -╰──────────────────────────────────────╯" +"╭ o Fixed Width Card ──────────────────╮ +│ This card has a fixed width of 40 │ +│ characters. │ +╰──────────────────────────────────────╯" `; exports[`Card > renders ''Gemini CLI update available'' card with status='Pending' and showStatusIndicator=true 1`] = ` -"╭ o Gemini CLI update available 0.26.0 → 0.27.0 ───────────────────────────────────────────────────╮ -│ Installed via Homebrew. Please update with "brew upgrade gemini-cli". │ -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +"╭ o Gemini CLI update available 0.26.0 → 0.27.0 ───────────────────────────────────────────────────────────────────────╮ +│ Installed via Homebrew. Please update with "brew upgrade gemini-cli". │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`Card > renders ''No Status Indicator'' card with status='Pending' and showStatusIndicator=false 1`] = ` +"╭ No Status Indicator Hidden ──────────────────────────────────────────────────────────────────────────────────────────╮ +│ The status indicator should be hidden. │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯" `; exports[`Card > renders ''ReadFolder'' card with status='Success' and showStatusIndicator=true 1`] = ` -"╭ ✓ ReadFolder /usr/local/bin ─────────────────────────────────────────────────────────────────────╮ -│ Listed 39 item(s). │ -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +"╭ ✓ ReadFolder /usr/local/bin ─────────────────────────────────────────────────────────────────────────────────────────╮ +│ Listed 39 item(s). │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`Card > renders ''Searching'' card with status='Executing' and showStatusIndicator=true 1`] = ` +"╭ ⊶ Searching ripgrep ─────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ Searching for pattern in directory... │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯" `; exports[`Card > renders ''Shell'' card with status='Confirming' and showStatusIndicator=true 1`] = ` -"╭ ? Shell node -v && which gemini ─────────────────────────────────────────────────────────────────╮ -│ ls /usr/local/bin | grep 'xattr' │ -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +"╭ ? Shell node -v && which gemini ─────────────────────────────────────────────────────────────────────────────────────╮ +│ ls /usr/local/bin | grep 'xattr' │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯" `;