on main help sign in
fix(ui): adjust sessions dialog size

Use a more reasonable size for the sessions dialog.

commit9917b226e39863c3c053ea96ee64453cdfa9092c authorAyman Bagabas <ayman.bagabas@gmail.com> dateWed 11 Feb 2026, 13:32 (8 months ago) parentd1032ba
2 files changed+5−7
internal/ui/dialog/commands.go+3−5 internal/ui/dialog/dialog.go+2−2
internal/ui/dialog/commands.go+3−5
@@ -27,9 +27,7 @@ type CommandType uint
2727func (c CommandType) String() string { return []string{"System", "User", "MCP"}[c] }
2828
2929const (
30− sidebarCompactModeBreakpoint = 120
31− defaultCommandsDialogMaxHeight = 20
32− defaultCommandsDialogMaxWidth = 70
30+ sidebarCompactModeBreakpoint = 120
3331)
3432
3533const (
@@ -240,8 +238,8 @@ func commandsRadioView(sty *styles.Styles, selected CommandType, hasUserCmds boo
240238// Draw implements [Dialog].
241239func (c *Commands) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
242240 t := c.com.Styles
243− width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()-t.Dialog.View.GetHorizontalBorderSize()))
244− height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy()-t.Dialog.View.GetVerticalBorderSize()))
241+ width := max(0, min(defaultDialogMaxWidth, area.Dx()-t.Dialog.View.GetHorizontalBorderSize()))
242+ height := max(0, min(defaultDialogHeight, area.Dy()-t.Dialog.View.GetVerticalBorderSize()))
245243 if area.Dx() != c.windowWidth && c.selected == SystemCommands {
246244 c.windowWidth = area.Dx()
247245 // since some items in the list depend on width (e.g. toggle sidebar command),
internal/ui/dialog/dialog.go+2−2
@@ -11,9 +11,9 @@ import (
1111// Dialog sizing constants.
1212const (
1313 // defaultDialogMaxWidth is the maximum width for standard dialogs.
14− defaultDialogMaxWidth = 120
14+ defaultDialogMaxWidth = 70
1515 // defaultDialogHeight is the default height for standard dialogs.
16− defaultDialogHeight = 30
16+ defaultDialogHeight = 20
1717 // titleContentHeight is the height of the title content line.
1818 titleContentHeight = 1
1919 // inputContentHeight is the height of the input content line.