on main help sign in
fix: ensure the commands and models dialogs render with borders (#2068)
commit552fa171bc6c0ed03b0121d6e98adb11697e8479 authorAndrey Nering <andreynering@users.noreply.github.com> dateMon 2 Feb 2026, 09:51 (9 months ago) parent7d9405f
2 files changed+4−4
internal/ui/dialog/commands.go+2−2 internal/ui/dialog/models.go+2−2
internal/ui/dialog/commands.go+2−2
@@ -240,8 +240,8 @@ func commandsRadioView(sty *styles.Styles, selected CommandType, hasUserCmds boo
240240// Draw implements [Dialog].
241241func (c *Commands) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
242242 t := c.com.Styles
243− width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()))
244− height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy()))
243+ width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()-t.Dialog.View.GetHorizontalBorderSize()))
244+ height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy()-t.Dialog.View.GetVerticalBorderSize()))
245245 if area.Dx() != c.windowWidth && c.selected == SystemCommands {
246246 c.windowWidth = area.Dx()
247247 // since some items in the list depend on width (e.g. toggle sidebar command),
internal/ui/dialog/models.go+2−2
@@ -251,8 +251,8 @@ func (m *Models) modelTypeRadioView() string {
251251// Draw implements [Dialog].
252252func (m *Models) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
253253 t := m.com.Styles
254− width := max(0, min(defaultModelsDialogMaxWidth, area.Dx()))
255− height := max(0, min(defaultDialogHeight, area.Dy()))
254+ width := max(0, min(defaultModelsDialogMaxWidth, area.Dx()-t.Dialog.View.GetHorizontalBorderSize()))
255+ height := max(0, min(defaultDialogHeight, area.Dy()-t.Dialog.View.GetVerticalBorderSize()))
256256 innerWidth := width - t.Dialog.View.GetHorizontalFrameSize()
257257 heightOffset := t.Dialog.Title.GetVerticalFrameSize() + titleContentHeight +
258258 t.Dialog.InputPrompt.GetVerticalFrameSize() + inputContentHeight +