on main help sign in
fix(tui): chat: adjust padding for message list

The gap between the message list and the editor was too large. 3 lines of padding can be too much. 1 line gets added after each message list item as a "gap", there's the padding at the bottom of the message list, and there's the editor top padding. In this commit, we removed the bottom padding of the message list, keeping both the gap that gets added after each message list item and the padding at the top of the editor.

commit8a16b8e38536d94119183985e49bdb4f5f752cdb authorAyman Bagabas <ayman.bagabas@gmail.com> dateThu 17 Jul 2025, 15:43 (1 year ago) parent3196bb3
1 file changed+2−2
internal/tui/components/chat/chat.go+2−2
internal/tui/components/chat/chat.go+2−2
@@ -107,7 +107,7 @@ func (m *messageListCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
107107func (m *messageListCmp) View() string {
108108 t := styles.CurrentTheme()
109109 return t.S().Base.
110− Padding(1).
110+ Padding(1, 1, 0, 1).
111111 Width(m.width).
112112 Height(m.height).
113113 Render(
@@ -508,7 +508,7 @@ func (m *messageListCmp) GetSize() (int, int) {
508508func (m *messageListCmp) SetSize(width int, height int) tea.Cmd {
509509 m.width = width
510510 m.height = height
511− return m.listCmp.SetSize(width-2, height-2) // for padding
511+ return m.listCmp.SetSize(width-2, height-1) // for padding
512512}
513513
514514// Blur implements MessageListCmp.