From 20d4b1d9f4750d79b40d6feada71e1020731c294 Mon Sep 17 00:00:00 2001 From: Jarrod Whelan <150866123+jwhelangoog@users.noreply.github.com> Date: Tue, 10 Mar 2026 12:29:53 -0700 Subject: [PATCH] fix(ui): fix DialogFooter layout within ToolConfirmationMessage and update snapshots --- .../src/ui/__snapshots__/App.test.tsx.snap | 6 +- .../ToolConfirmationQueue.test.tsx.snap | 24 ++++-- .../messages/ToolConfirmationMessage.tsx | 2 +- .../RedirectionConfirmation.test.tsx.snap | 6 +- ...syntax-highlighting-SVG-snapshot-.snap.svg | 8 +- .../ToolConfirmationMessage.test.tsx.snap | 82 +++++++++++++------ 6 files changed, 83 insertions(+), 45 deletions(-) diff --git a/packages/cli/src/ui/__snapshots__/App.test.tsx.snap b/packages/cli/src/ui/__snapshots__/App.test.tsx.snap index a5cd6993b4..ec15357df2 100644 --- a/packages/cli/src/ui/__snapshots__/App.test.tsx.snap +++ b/packages/cli/src/ui/__snapshots__/App.test.tsx.snap @@ -130,9 +130,11 @@ HistoryItemDisplay │ Allow execution of: 'ls'? │ │ │ │ ● 1. Allow once │ -│ 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to cancel │ +│ 2. Allow for this session │ │ 3. No, suggest changes (esc) │ │ │ +│ Enter to select · ↑/↓ to navigate · Esc to cancel │ +│ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ @@ -144,8 +146,6 @@ HistoryItemDisplay - - Notifications Composer " diff --git a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue.test.tsx.snap index 7dac9b6606..f752c1da65 100644 --- a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue.test.tsx.snap @@ -11,10 +11,12 @@ exports[`ToolConfirmationQueue > calculates availableContentHeight based on avai │ Apply this change? │ │ │ │ ● 1. Allow once │ -│ 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to │ -│ 3. Modify with external edi…cancel │ +│ 2. Allow for this session │ +│ 3. Modify with external editor │ │ 4. No, suggest changes (esc) │ │ │ +│ Enter to select · ↑/↓ to navigate · Esc to cancel │ +│ │ ╰──────────────────────────────────────────────────────────────────────────────╯ Press Ctrl+O to show more lines " @@ -34,10 +36,12 @@ exports[`ToolConfirmationQueue > does not render expansion hint when constrainHe │ Apply this change? │ │ │ │ ● 1. Allow once │ -│ 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to │ -│ 3. Modify with external edi…cancel │ +│ 2. Allow for this session │ +│ 3. Modify with external editor │ │ 4. No, suggest changes (esc) │ │ │ +│ Enter to select · ↑/↓ to navigate · Esc to cancel │ +│ │ ╰──────────────────────────────────────────────────────────────────────────────╯ " `; @@ -102,10 +106,12 @@ exports[`ToolConfirmationQueue > renders expansion hint when content is long and │ Apply this change? │ │ │ │ ● 1. Allow once │ -│ 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to │ -│ 3. Modify with external edi…cancel │ +│ 2. Allow for this session │ +│ 3. Modify with external editor │ │ 4. No, suggest changes (esc) │ │ │ +│ Enter to select · ↑/↓ to navigate · Esc to cancel │ +│ │ ╰──────────────────────────────────────────────────────────────────────────────╯ Press Ctrl+O to show more lines " @@ -121,8 +127,10 @@ exports[`ToolConfirmationQueue > renders the confirming tool with progress indic │ Allow execution of: 'ls'? │ │ │ │ ● 1. Allow once │ -│ 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to │ -│ 3. No, suggest changes (e… cancel │ +│ 2. Allow for this session │ +│ 3. No, suggest changes (esc) │ +│ │ +│ Enter to select · ↑/↓ to navigate · Esc to cancel │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ " diff --git a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx index 2811c9d997..26e36e86d3 100644 --- a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx @@ -741,7 +741,7 @@ export const ToolConfirmationMessage: React.FC< {question} - + )'? -● 1. Allow once - 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow for this session 3. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; diff --git a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-should-render-multiline-shell-scripts-with-correct-newlines-and-syntax-highlighting-SVG-snapshot-.snap.svg b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-should-render-multiline-shell-scripts-with-correct-newlines-and-syntax-highlighting-SVG-snapshot-.snap.svg index 8c3ae1e187..18b7d6eda1 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-should-render-multiline-shell-scripts-with-correct-newlines-and-syntax-highlighting-SVG-snapshot-.snap.svg +++ b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-should-render-multiline-shell-scripts-with-correct-newlines-and-syntax-highlighting-SVG-snapshot-.snap.svg @@ -1,8 +1,8 @@ - + - + echo "hello" @@ -23,11 +23,11 @@ Allow once - + 2. Allow for this session - Enter to select · ↑/↓ to navigate · Esc to cancel 3. No, suggest changes (esc) + Enter to select · ↑/↓ to navigate · Esc to cancel \ No newline at end of file diff --git a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage.test.tsx.snap b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage.test.tsx.snap index f4fd650e85..0406b6be78 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage.test.tsx.snap +++ b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage.test.tsx.snap @@ -8,11 +8,13 @@ exports[`ToolConfirmationMessage > enablePermanentToolApproval setting > should ╰──────────────────────────────────────────────────────────────────────────────╯ Apply this change? -● 1. Allow once +● 1. Allow once 2. Allow for this session 3. Allow for this file in all future sessions 4. Modify with external editor 5. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -24,9 +26,11 @@ ls -la whoami Allow execution of 3 commands? -● 1. Allow once - 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow for this session 3. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -37,9 +41,11 @@ URLs to fetch: - https://raw.githubusercontent.com/google/gemini-react/main/README.md Do you want to proceed? -● 1. Allow once - 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow for this session 3. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -47,9 +53,11 @@ exports[`ToolConfirmationMessage > should not display urls if prompt and url are "https://example.com Do you want to proceed? -● 1. Allow once - 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow for this session 3. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -60,9 +68,11 @@ for i in 1 2 3; do done Allow execution of: 'echo'? -● 1. Allow once - 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow for this session 3. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -71,10 +81,12 @@ exports[`ToolConfirmationMessage > should strip BiDi characters from MCP tool an Tool: testtool Allow execution of MCP tool "testtool" from server "testserver"? -● 1. Allow once - 2. Allow tool for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow tool for this session 3. Allow all server tools for this session 4. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -86,9 +98,11 @@ exports[`ToolConfirmationMessage > with folder trust > 'for edit confirmations' ╰──────────────────────────────────────────────────────────────────────────────╯ Apply this change? -● 1. Allow once - 2. Modify with external editorEnter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Modify with external editor 3. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -100,10 +114,12 @@ exports[`ToolConfirmationMessage > with folder trust > 'for edit confirmations' ╰──────────────────────────────────────────────────────────────────────────────╯ Apply this change? -● 1. Allow once - 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow for this session 3. Modify with external editor 4. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -111,8 +127,10 @@ exports[`ToolConfirmationMessage > with folder trust > 'for exec confirmations' "echo "hello" Allow execution of: 'echo'? -● 1. Allow once - 2. No, suggest changes (esc)Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -120,9 +138,11 @@ exports[`ToolConfirmationMessage > with folder trust > 'for exec confirmations' "echo "hello" Allow execution of: 'echo'? -● 1. Allow once - 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow for this session 3. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -130,8 +150,10 @@ exports[`ToolConfirmationMessage > with folder trust > 'for info confirmations' "https://example.com Do you want to proceed? -● 1. Allow once - 2. No, suggest changes (esc)Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -139,9 +161,11 @@ exports[`ToolConfirmationMessage > with folder trust > 'for info confirmations' "https://example.com Do you want to proceed? -● 1. Allow once - 2. Allow for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow for this session 3. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -150,8 +174,10 @@ exports[`ToolConfirmationMessage > with folder trust > 'for mcp confirmations' > Tool: test-tool Allow execution of MCP tool "test-tool" from server "test-server"? -● 1. Allow once - 2. No, suggest changes (esc)Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `; @@ -160,9 +186,11 @@ exports[`ToolConfirmationMessage > with folder trust > 'for mcp confirmations' > Tool: test-tool Allow execution of MCP tool "test-tool" from server "test-server"? -● 1. Allow once - 2. Allow tool for this session Enter to select · ↑/↓ to navigate · Esc to cancel +● 1. Allow once + 2. Allow tool for this session 3. Allow all server tools for this session 4. No, suggest changes (esc) + +Enter to select · ↑/↓ to navigate · Esc to cancel " `;