Commit a3dce66
committed
fix: resolve background rendering bug in viewport whitespace regions
## Root Cause
Whitespace regions were showing terminal default background instead of app
background color due to incomplete viewport filling in rendering pipeline.
## Changes
1. **detail/model.go**: Added `.Background()` to container style in View() method.
- Ensures detail view fills entire allocated height with app background color.
- Fixes visual gap when content is shorter than viewport.
2. **tasklist/model.go**:
- Wrapped JoinVertical result with Width/Height/Background container.
- Ensures entire task list viewport fills with app background.
- Empty state now uses Place() with WithWhitespaceBackground().
3. **app/model.go (renderMainUI)**:
- Wrapped final JoinVertical result with Width/Height/Background.
- Ensures header+body+footer composition fills entire viewport.
- Background color now propagates through component joins.
4. **help/model.go**: Enhanced header styling to ensure proper background fill.
## How It Works
- Every container now has explicit `.Background(m.styles.Theme.Bg)`
- Full-screen content uses Place() with WithWhitespaceBackground()
- Component Views fill their allocated dimensions completely
- No transparent/unset background states remain
## Testing
✅ Build verification: go build -v ./... (no errors)
✅ Runtime test: go run ./cmd/kairo (renders correctly)
✅ All components render with consistent background across viewport
✅ Whitespace regions now show app background, not terminal default1 parent ae8cbc0 commit a3dce66
4 files changed
Lines changed: 140 additions & 67 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
605 | 611 | | |
606 | 612 | | |
607 | 613 | | |
| |||
630 | 636 | | |
631 | 637 | | |
632 | 638 | | |
633 | | - | |
634 | | - | |
| 639 | + | |
635 | 640 | | |
636 | 641 | | |
637 | | - | |
| 642 | + | |
638 | 643 | | |
639 | 644 | | |
640 | 645 | | |
641 | 646 | | |
642 | 647 | | |
643 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
644 | 651 | | |
645 | 652 | | |
646 | 653 | | |
647 | 654 | | |
648 | 655 | | |
649 | | - | |
| 656 | + | |
650 | 657 | | |
651 | | - | |
| 658 | + | |
652 | 659 | | |
653 | 660 | | |
654 | 661 | | |
| |||
721 | 728 | | |
722 | 729 | | |
723 | 730 | | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
730 | 737 | | |
731 | 738 | | |
732 | 739 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
79 | 84 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
92 | 101 | | |
93 | | - | |
| 102 | + | |
94 | 103 | | |
95 | | - | |
96 | | - | |
| 104 | + | |
| 105 | + | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
101 | 110 | | |
102 | 111 | | |
103 | | - | |
| 112 | + | |
104 | 113 | | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 117 | + | |
112 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
113 | 134 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
117 | 140 | | |
118 | 141 | | |
119 | 142 | | |
120 | 143 | | |
121 | | - | |
122 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
123 | 149 | | |
124 | | - | |
125 | | - | |
126 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
127 | 155 | | |
128 | 156 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 157 | + | |
134 | 158 | | |
135 | 159 | | |
136 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
122 | 128 | | |
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
127 | | - | |
| 133 | + | |
| 134 | + | |
128 | 135 | | |
129 | | - | |
| 136 | + | |
130 | 137 | | |
131 | 138 | | |
132 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
133 | 146 | | |
134 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
135 | 152 | | |
136 | 153 | | |
137 | 154 | | |
138 | | - | |
139 | | - | |
| 155 | + | |
| 156 | + | |
140 | 157 | | |
141 | 158 | | |
142 | 159 | | |
143 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
144 | 164 | | |
145 | 165 | | |
146 | 166 | | |
147 | | - | |
148 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
149 | 178 | | |
150 | 179 | | |
151 | 180 | | |
| |||
161 | 190 | | |
162 | 191 | | |
163 | 192 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 193 | + | |
169 | 194 | | |
170 | | - | |
| 195 | + | |
| 196 | + | |
171 | 197 | | |
172 | 198 | | |
173 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
174 | 204 | | |
175 | 205 | | |
176 | 206 | | |
177 | 207 | | |
178 | 208 | | |
179 | | - | |
| 209 | + | |
180 | 210 | | |
181 | 211 | | |
182 | 212 | | |
183 | 213 | | |
184 | 214 | | |
185 | 215 | | |
186 | 216 | | |
187 | | - | |
188 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
189 | 222 | | |
190 | | - | |
| 223 | + | |
191 | 224 | | |
192 | 225 | | |
193 | 226 | | |
194 | 227 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
198 | 234 | | |
199 | 235 | | |
200 | | - | |
| 236 | + | |
201 | 237 | | |
202 | 238 | | |
203 | 239 | | |
| |||
0 commit comments