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

Co-authored-by: jacob314 <jacob314@gmail.com>
This commit is contained in:
Adib234
2026-03-10 15:34:10 -04:00
committed by GitHub
parent bc75a61982
commit e5615f47c4
5 changed files with 18 additions and 11 deletions

View File

@@ -282,7 +282,10 @@ describe('ToolConfirmationQueue', () => {
// hideToolIdentity is true for ask_user -> subtracts 4 instead of 6
// availableContentHeight = 19 - 4 = 15
// ToolConfirmationMessage handlesOwnUI=true -> returns full 15
// AskUserDialog uses 15 lines to render its multi-line question and options.
// AskUserDialog allocates questionHeight = availableHeight - overhead - DIALOG_PADDING.
// listHeight = 15 - overhead (Header:0, Margin:1, Footer:2) = 12.
// maxQuestionHeight = listHeight - 4 = 8.
// 8 lines is enough for the 6-line question.
await waitFor(() => {
expect(lastFrame()).toContain('Line 6');
expect(lastFrame()).not.toContain('lines hidden');