Commit 315134a
authored
fix(lifecycle): remove dead q.Style write, keep cache invalidation (#495)
* fix(lifecycle): remove dead q.Style write, keep cache invalidation
- Remove dead q.Style assignment in RecursiveGridComponent.UpdateConfig
(q.Style was never read - renderer holds its own copy)
- Keep SetConfig call to invalidate C caches for theme changes
- Reorder calls: modes.UpdateConfig first (updates renderer style),
then recursiveGridComponent.UpdateConfig (frees overlay caches)
- Eliminates theoretical data race on q.Style during config reload
* fix(lifecycle): restore cache-invalidation-before-draw ordering in handleThemeChange
* refactor(components): remove stale Style and ThemeProvider fields from RecursiveGridComponent
These fields were only set at construction time and read once during
renderer initialization. After the first config reload they silently
became stale because UpdateConfig no longer rebuilds the Style. All
runtime style updates flow through modes.UpdateConfig →
renderer.UpdateConfig, so the fields are unnecessary.
Remove both fields and build the initial renderer style directly from
config at initialization time.
* refactor(init): build all overlay styles on-demand from live config
Apply the same on-demand style building pattern to hints and grid
that was already applied to recursive_grid. This eliminates the
architectural inconsistency where two of three components carried
a Style field read at renderer init time while the third did not.
* docs(lifecycle): fix handleThemeChange comment to match actual call chain1 parent 972181b commit 315134a
File tree
5 files changed
+19
-44
lines changed- internal/app
- components
- modes
5 files changed
+19
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
182 | 177 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 178 | + | |
| 179 | + | |
189 | 180 | | |
190 | 181 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
201 | 185 | | |
202 | 186 | | |
203 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 246 | + | |
| 247 | + | |
250 | 248 | | |
251 | 249 | | |
252 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
114 | 112 | | |
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 116 | + | |
| 117 | + | |
123 | 118 | | |
124 | 119 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
547 | 549 | | |
548 | 550 | | |
549 | 551 | | |
550 | 552 | | |
| 553 | + | |
551 | 554 | | |
552 | 555 | | |
553 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 90 | | |
96 | 91 | | |
97 | 92 | | |
| |||
0 commit comments