From 0f88ddb73eaa09e8beaf72bb82d1c42afd5a38ed Mon Sep 17 00:00:00 2001 From: "A.K.M. Adib" Date: Wed, 4 Mar 2026 12:56:31 -0500 Subject: [PATCH] address bot comments --- packages/cli/src/ui/components/AskUserDialog.tsx | 2 +- packages/cli/src/ui/components/ToolConfirmationQueue.test.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/ui/components/AskUserDialog.tsx b/packages/cli/src/ui/components/AskUserDialog.tsx index d81cbca09c..b5651f79bb 100644 --- a/packages/cli/src/ui/components/AskUserDialog.tsx +++ b/packages/cli/src/ui/components/AskUserDialog.tsx @@ -795,7 +795,7 @@ const ChoiceQuestionView: React.FC = ({ // The options list will take the remaining space and scroll if necessary. // This is more robust than calculating based on `selectionItems.length`, // which can incorrectly shrink the question if there are many options. - Math.max(1, Math.floor(listHeight * 0.7)) + Math.max(5, Math.floor(listHeight * 0.7)) : 15; const questionHeight = listHeight && !isAlternateBuffer diff --git a/packages/cli/src/ui/components/ToolConfirmationQueue.test.tsx b/packages/cli/src/ui/components/ToolConfirmationQueue.test.tsx index 26d3baeca6..adf631bfff 100644 --- a/packages/cli/src/ui/components/ToolConfirmationQueue.test.tsx +++ b/packages/cli/src/ui/components/ToolConfirmationQueue.test.tsx @@ -282,7 +282,8 @@ describe('ToolConfirmationQueue', () => { // hideToolIdentity is true for ask_user -> subtracts 4 instead of 6 // availableContentHeight = 19 - 4 = 15 // ToolConfirmationMessage handlesOwnUI=true -> returns full 15 - // AskUserDialog allocates maxQuestionHeight = floor(15 * 0.7) = 10. + // AskUserDialog allocates questionHeight = Math.min(maxQuestionHeight, Math.max(5, listHeight - DIALOG_PADDING)). + // maxQuestionHeight = floor(15 * 0.7) = 10. // 10 lines is enough for the 6-line question + padding. await waitFor(() => { expect(lastFrame()).toContain('Line 6');