on main help sign in
fix(ui): prevent panic when session is nil
commitece936a9bfa80b7ede2d8f09ee9a6c2cb55a6e0d authorAyman Bagabas <ayman.bagabas@gmail.com> dateWed 26 Nov 2025, 10:10 (1 year ago) parent0c772aa
1 file changed+4
internal/ui/model/sidebar.go+4
internal/ui/model/sidebar.go+4
@@ -96,6 +96,10 @@ func getDynamicHeightLimits(availableHeight int) (maxFiles, maxLSPs, maxMCPs int
9696// sidebar renders the chat sidebar containing session title, working
9797// directory, model info, file list, LSP status, and MCP status.
9898func (m *UI) drawSidebar(scr uv.Screen, area uv.Rectangle) {
99+ if m.session == nil {
100+ return
101+ }
102+
99103 const logoHeightBreakpoint = 30
100104
101105 t := m.com.Styles