on main help sign in
fix: make the commands dialog less taller (#2035)
commit87fad188fca6f37acea2bc6e6dcdab7ccf8e606d authorAndrey Nering <andreynering@users.noreply.github.com> dateThu 29 Jan 2026, 10:29 (9 months ago) parent3a929ff
1 file changed+4−3
internal/ui/dialog/commands.go+4−3
internal/ui/dialog/commands.go+4−3
@@ -27,8 +27,9 @@ type CommandType uint
2727func (c CommandType) String() string { return []string{"System", "User", "MCP"}[c] }
2828
2929const (
30− sidebarCompactModeBreakpoint = 120
31− defaultCommandsDialogMaxWidth = 70
30+ sidebarCompactModeBreakpoint = 120
31+ defaultCommandsDialogMaxHeight = 20
32+ defaultCommandsDialogMaxWidth = 70
3233)
3334
3435const (
@@ -240,7 +241,7 @@ func commandsRadioView(sty *styles.Styles, selected CommandType, hasUserCmds boo
240241func (c *Commands) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
241242 t := c.com.Styles
242243 width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()))
243− height := max(0, min(defaultDialogHeight, area.Dy()))
244+ height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy()))
244245 if area.Dx() != c.windowWidth && c.selected == SystemCommands {
245246 c.windowWidth = area.Dx()
246247 // since some items in the list depend on width (e.g. toggle sidebar command),