From 87fad188fca6f37acea2bc6e6dcdab7ccf8e606d Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Thu, 29 Jan 2026 10:29:01 -0300 Subject: [PATCH] fix: make the commands dialog less taller (#2035) --- internal/ui/dialog/commands.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/ui/dialog/commands.go b/internal/ui/dialog/commands.go index 2422c39cc79b9ce1b71b5891ad55c2f4107c9295..416f5a0131e2dc7cf36561f118daed248ceebd08 100644 --- a/internal/ui/dialog/commands.go +++ b/internal/ui/dialog/commands.go @@ -27,8 +27,9 @@ type CommandType uint func (c CommandType) String() string { return []string{"System", "User", "MCP"}[c] } const ( - sidebarCompactModeBreakpoint = 120 - defaultCommandsDialogMaxWidth = 70 + sidebarCompactModeBreakpoint = 120 + defaultCommandsDialogMaxHeight = 20 + defaultCommandsDialogMaxWidth = 70 ) const ( @@ -240,7 +241,7 @@ func commandsRadioView(sty *styles.Styles, selected CommandType, hasUserCmds boo func (c *Commands) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor { t := c.com.Styles width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx())) - height := max(0, min(defaultDialogHeight, area.Dy())) + height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy())) if area.Dx() != c.windowWidth && c.selected == SystemCommands { c.windowWidth = area.Dx() // since some items in the list depend on width (e.g. toggle sidebar command),