From 56769bb10c336332d0f950218da7e6c3b9bf967b Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Mon, 2 Feb 2026 16:22:58 -0300 Subject: [PATCH] fix(ui): fix permissions dialog rendering on small windows (#2093) * Ensure the viewport content is at least 3 cells tall, to always be able to render at least 1 line of content + 1 top and 1 bottom margin. * Render in fullscreen as soon as we don't have enough space to render buttons without wrapping. --- internal/ui/dialog/permissions.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/ui/dialog/permissions.go b/internal/ui/dialog/permissions.go index d877d7085afbe8920c96898ce029e059dfa59e46..daabc10b1aea0ee9db6c4e3608be62e7cfcbfd39 100644 --- a/internal/ui/dialog/permissions.go +++ b/internal/ui/dialog/permissions.go @@ -48,7 +48,7 @@ const ( // layoutSpacingLines is the number of empty lines used for layout spacing. layoutSpacingLines = 4 // minWindowWidth is the minimum window width before forcing fullscreen. - minWindowWidth = 60 + minWindowWidth = 77 // minWindowHeight is the minimum window height before forcing fullscreen. minWindowHeight = 20 ) @@ -392,6 +392,7 @@ func (p *Permissions) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor { } else { availableHeight = maxHeight - fixedHeight } + availableHeight = max(availableHeight, 3) } else { availableHeight = maxHeight - headerHeight - buttonsHeight - helpHeight - frameHeight }