on main help sign in
fix(tui): permissions: set a maximum width for the dialog

The dialog won't exceed 160 characters in width, ensuring it fits well within a wide terminal window.

commit7b219b166b14f7171926f29fd6bbc8aa2aad32e2 authorAyman Bagabas <ayman.bagabas@gmail.com> dateTue 15 Jul 2025, 14:20 (1 year ago) parent9423d10
1 file changed+3
internal/tui/components/dialogs/permissions/permissions.go+3
internal/tui/components/dialogs/permissions/permissions.go+3
@@ -529,6 +529,9 @@ func (p *permissionDialogCmp) SetSize() tea.Cmd {
529529 // Default to diff split mode when dialog is wide enough.
530530 p.defaultDiffSplitMode = p.width >= 140
531531
532+ // Set a maximum width for the dialog
533+ p.width = min(p.width, 180)
534+
532535 // Mark content as dirty if size changed
533536 if oldWidth != p.width || oldHeight != p.height {
534537 p.contentDirty = true