fix(cli): prevent plan truncation in approval dialog by supporting unconstrained heights

Fixes #20716
This commit is contained in:
A.K.M. Adib
2026-03-03 17:16:12 -05:00
parent 5575c5ff66
commit 128dc99927
4 changed files with 12 additions and 21 deletions

View File

@@ -789,9 +789,13 @@ const ChoiceQuestionView: React.FC<ChoiceQuestionViewProps> = ({
const listHeight = availableHeight
? Math.max(1, availableHeight - overhead)
: undefined;
const maxQuestionHeight =
question.unconstrainedHeight && listHeight
? Math.max(1, listHeight - DIALOG_PADDING - selectionItems.length * 2)
: 15;
const questionHeight =
listHeight && !isAlternateBuffer
? Math.min(15, Math.max(1, listHeight - DIALOG_PADDING))
? Math.min(maxQuestionHeight, Math.max(1, listHeight - DIALOG_PADDING))
: undefined;
const maxItemsToShow =
listHeight && questionHeight

View File

@@ -247,6 +247,7 @@ export const ExitPlanModeDialog: React.FC<ExitPlanModeDialogProps> = ({
],
placeholder: 'Type your feedback...',
multiSelect: false,
unconstrainedHeight: true,
},
]}
onSubmit={(answers) => {

View File

@@ -11,11 +11,7 @@ Implementation Steps
2. Add session storage in src/storage/SessionStore.ts
3. Update src/commands/index.ts to check auth status
4. Add tests in src/auth/__tests__/
Files to Modify
- src/index.ts - Add auth middleware
- src/config.ts - Add auth configuration options
... last 5 lines hidden (Ctrl+O to show) ...
1. Yes, automatically accept edits
Approves plan and allows tools to run automatically
@@ -38,11 +34,7 @@ Implementation Steps
2. Add session storage in src/storage/SessionStore.ts
3. Update src/commands/index.ts to check auth status
4. Add tests in src/auth/__tests__/
Files to Modify
- src/index.ts - Add auth middleware
- src/config.ts - Add auth configuration options
... last 5 lines hidden (Ctrl+O to show) ...
● 1. Yes, automatically accept edits
Approves plan and allows tools to run automatically
@@ -70,11 +62,7 @@ Implementation Steps
2. Add session storage in src/storage/SessionStore.ts
3. Update src/commands/index.ts to check auth status
4. Add OAuth2 provider support in src/auth/providers/OAuth2Provider.ts
5. Add SAML provider support in src/auth/providers/SAMLProvider.ts
6. Add LDAP provider support in src/auth/providers/LDAPProvider.ts
7. Create token refresh mechanism in src/auth/TokenManager.ts
8. Add multi-factor authentication in src/auth/MFAService.ts
... last 22 lines hidden (Ctrl+O to show) ...
... last 26 lines hidden (Ctrl+O to show) ...
● 1. Yes, automatically accept edits
Approves plan and allows tools to run automatically
@@ -97,11 +85,7 @@ Implementation Steps
2. Add session storage in src/storage/SessionStore.ts
3. Update src/commands/index.ts to check auth status
4. Add tests in src/auth/__tests__/
Files to Modify
- src/index.ts - Add auth middleware
- src/config.ts - Add auth configuration options
... last 5 lines hidden (Ctrl+O to show) ...
● 1. Yes, automatically accept edits
Approves plan and allows tools to run automatically

View File

@@ -162,6 +162,8 @@ export interface Question {
multiSelect?: boolean;
/** Placeholder hint text. For type='text', shown in the input field. For type='choice', shown in the "Other" custom input. */
placeholder?: string;
/** Allow the question to consume more vertical space instead of being strictly capped. */
unconstrainedHeight?: boolean;
}
export interface AskUserRequest {