on main help sign in
fix(tui): permissions: ensure content viewport has a minimum height
40d53feAyman Bagabas
internal/tui/components/dialogs/permissions/permissions.go+5−1
@@ -445,7 +445,11 @@ func (p *permissionDialogCmp) render() string {
445 contentFinal := p.getOrGenerateContent()
445 contentFinal := p.getOrGenerateContent()
446
446
447 // Always set viewport content (the caching is handled in getOrGenerateContent)
447 // Always set viewport content (the caching is handled in getOrGenerateContent)
448+ const minContentHeight = 9
449+ contentHeight := min(
450+ max(minContentHeight, p.height-minContentHeight),
448− contentHeight := min(p.height-9, lipgloss.Height(contentFinal))
451+ lipgloss.Height(contentFinal),
452+ )
449 p.contentViewPort.SetHeight(contentHeight)
453 p.contentViewPort.SetHeight(contentHeight)
450 p.contentViewPort.SetContent(contentFinal)
454 p.contentViewPort.SetContent(contentFinal)
451
455