@@ -770,7 +770,14 @@ func (m *Model) renderMainUI() string {
770770 Background (m .s .Theme .Bg ).
771771 Render (body )
772772
773- return lipgloss .JoinVertical (lipgloss .Left , head , body , foot )
773+ mainContent := lipgloss .JoinVertical (lipgloss .Left , head , body , foot )
774+
775+ // Wrap the entire vertical layout to ensure background fills the complete viewport
776+ return lipgloss .NewStyle ().
777+ Width (m .width ).
778+ Height (m .height ).
779+ Background (m .s .Theme .Bg ).
780+ Render (mainContent )
774781}
775782
776783func (m * Model ) rebuildComponentSizes () {
@@ -935,26 +942,6 @@ func (m *Model) renderFooter() string {
935942
936943// renderTagFilterOverlay renders the tag filter input modal
937944func (m * Model ) renderTagFilterOverlay () string {
938- head := m .renderHeader ()
939- foot := m .renderFooter ()
940-
941- hHeight := lipgloss .Height (head )
942- fHeight := lipgloss .Height (foot )
943- availableHeight := m .height - hHeight - fHeight
944- if availableHeight < 0 {
945- availableHeight = 0
946- }
947-
948- // Render the body (tasklist) in the background
949- body := m .list .View ()
950- body = lipgloss .NewStyle ().
951- Height (availableHeight ).
952- Width (m .width ).
953- Background (m .s .Theme .Bg ).
954- Render (body )
955-
956- mainUI := lipgloss .JoinVertical (lipgloss .Left , head , body , foot )
957-
958945 // Create filter input modal
959946 inputLabel := m .s .Title .Render ("Filter by Tag" )
960947 input := lipgloss .NewStyle ().Padding (0 , 1 ).Render (m .tagFilterInput .View ())
@@ -972,10 +959,11 @@ func (m *Model) renderTagFilterOverlay() string {
972959 cardStyle := m .s .Overlay .Width (60 )
973960 card := cardStyle .Render (modal )
974961
975- // Overlay the modal on top of the main UI
962+ // Overlay the modal on top of the screen with proper background
976963 return lipgloss .Place (m .width , m .height , lipgloss .Center , lipgloss .Center , card ,
964+ lipgloss .WithWhitespaceChars (" " ),
977965 lipgloss .WithWhitespaceBackground (m .s .Theme .Bg ),
978- ) + " \n " + mainUI
966+ )
979967}
980968
981969func (m * Model ) setActiveView (id core.ViewID ) {
0 commit comments