fix(ui): adjust sessions dialog size

Ayman Bagabas created

Use a more reasonable size for the sessions dialog.

Change summary

internal/ui/dialog/commands.go | 8 +++-----
internal/ui/dialog/dialog.go   | 4 ++--
2 files changed, 5 insertions(+), 7 deletions(-)

Detailed changes

internal/ui/dialog/commands.go 🔗

@@ -27,9 +27,7 @@ type CommandType uint
 func (c CommandType) String() string { return []string{"System", "User", "MCP"}[c] }
 
 const (
-	sidebarCompactModeBreakpoint   = 120
-	defaultCommandsDialogMaxHeight = 20
-	defaultCommandsDialogMaxWidth  = 70
+	sidebarCompactModeBreakpoint = 120
 )
 
 const (
@@ -240,8 +238,8 @@ func commandsRadioView(sty *styles.Styles, selected CommandType, hasUserCmds boo
 // Draw implements [Dialog].
 func (c *Commands) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
 	t := c.com.Styles
-	width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()-t.Dialog.View.GetHorizontalBorderSize()))
-	height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy()-t.Dialog.View.GetVerticalBorderSize()))
+	width := max(0, min(defaultDialogMaxWidth, area.Dx()-t.Dialog.View.GetHorizontalBorderSize()))
+	height := max(0, min(defaultDialogHeight, area.Dy()-t.Dialog.View.GetVerticalBorderSize()))
 	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),

internal/ui/dialog/dialog.go 🔗

@@ -11,9 +11,9 @@ import (
 // Dialog sizing constants.
 const (
 	// defaultDialogMaxWidth is the maximum width for standard dialogs.
-	defaultDialogMaxWidth = 120
+	defaultDialogMaxWidth = 70
 	// defaultDialogHeight is the default height for standard dialogs.
-	defaultDialogHeight = 30
+	defaultDialogHeight = 20
 	// titleContentHeight is the height of the title content line.
 	titleContentHeight = 1
 	// inputContentHeight is the height of the input content line.