on main help sign in
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.

commit56769bb10c336332d0f950218da7e6c3b9bf967b authorAndrey Nering <andreynering@users.noreply.github.com> dateMon 2 Feb 2026, 16:22 (9 months ago) parent019a9a1
1 file changed+2−1
internal/ui/dialog/permissions.go+2−1
internal/ui/dialog/permissions.go+2−1
@@ -48,7 +48,7 @@ const (
4848 // layoutSpacingLines is the number of empty lines used for layout spacing.
4949 layoutSpacingLines = 4
5050 // minWindowWidth is the minimum window width before forcing fullscreen.
51− minWindowWidth = 60
51+ minWindowWidth = 77
5252 // minWindowHeight is the minimum window height before forcing fullscreen.
5353 minWindowHeight = 20
5454)
@@ -392,6 +392,7 @@ func (p *Permissions) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
392392 } else {
393393 availableHeight = maxHeight - fixedHeight
394394 }
395+ availableHeight = max(availableHeight, 3)
395396 } else {
396397 availableHeight = maxHeight - headerHeight - buttonsHeight - helpHeight - frameHeight
397398 }