@@ -459,7 +459,11 @@ func (p *permissionDialogCmp) render() string {
459459 contentFinal := p.getOrGenerateContent()
460460
461461 // Always set viewport content (the caching is handled in getOrGenerateContent)
462− contentHeight := min(p.height-9, lipgloss.Height(contentFinal))
462+ const minContentHeight = 9
463+ contentHeight := min(
464+ max(minContentHeight, p.height-minContentHeight),
465+ lipgloss.Height(contentFinal),
466+ )
463467 p.contentViewPort.SetHeight(contentHeight)
464468 p.contentViewPort.SetContent(contentFinal)
465469