fix(tui): permissions: set a maximum width for the dialog
Ayman Bagabas
created
The dialog won't exceed 160 characters in width, ensuring it fits well
within a wide terminal window.
Change summary
internal/tui/components/dialogs/permissions/permissions.go | 3 +++
1 file changed, 3 insertions(+)
Detailed changes
@@ -529,6 +529,9 @@ func (p *permissionDialogCmp) SetSize() tea.Cmd {
// Default to diff split mode when dialog is wide enough.
p.defaultDiffSplitMode = p.width >= 140
+ // Set a maximum width for the dialog
+ p.width = min(p.width, 180)
+
// Mark content as dirty if size changed
if oldWidth != p.width || oldHeight != p.height {
p.contentDirty = true