Commit 2218a74
committed
refactor: clean up theme system per code review
- Remove generation artifact (IMPLEMENTATION_COMPLETE.md)
- Consolidate duplicate theme checks in settings page
- Simplify theme precedence logic (localStorage > backend)
- Remove all console.log statements from theme code
- Add debounced auto-save (500ms) to prevent API spam
- Centralize theme API with subscriptions and constants
- Improve error handling (silent fails for localStorage)
- Guard all localStorage access for SSR compatibility
Addresses all feedback from @scrrlt review:
- No more redundant theme logic
- Single source of truth for theme operations
- Proper error handling without console noise
- Debounced network calls for better performance1 parent 2b177e5 commit 2218a74
6 files changed
Lines changed: 74 additions & 239 deletions
File tree
- web
- app/settings
- components
- context
- lib
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
228 | 244 | | |
229 | 245 | | |
230 | 246 | | |
| |||
444 | 460 | | |
445 | 461 | | |
446 | 462 | | |
447 | | - | |
448 | 463 | | |
449 | 464 | | |
450 | 465 | | |
451 | 466 | | |
452 | | - | |
| 467 | + | |
453 | 468 | | |
454 | | - | |
455 | 469 | | |
456 | | - | |
457 | 470 | | |
458 | 471 | | |
459 | 472 | | |
460 | | - | |
| 473 | + | |
461 | 474 | | |
462 | | - | |
463 | 475 | | |
464 | 476 | | |
465 | 477 | | |
| |||
595 | 607 | | |
596 | 608 | | |
597 | 609 | | |
598 | | - | |
599 | | - | |
600 | 610 | | |
601 | 611 | | |
602 | 612 | | |
| |||
674 | 684 | | |
675 | 685 | | |
676 | 686 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
| 687 | + | |
| 688 | + | |
683 | 689 | | |
684 | 690 | | |
685 | 691 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
19 | 16 | | |
20 | 17 | | |
21 | | - | |
22 | 18 | | |
23 | 19 | | |
24 | | - | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
28 | | - | |
29 | 23 | | |
30 | 24 | | |
31 | 25 | | |
32 | 26 | | |
33 | | - | |
| 27 | + | |
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | 277 | | |
280 | 278 | | |
281 | 279 | | |
282 | 280 | | |
283 | | - | |
| 281 | + | |
284 | 282 | | |
285 | 283 | | |
286 | 284 | | |
287 | 285 | | |
288 | | - | |
289 | | - | |
| 286 | + | |
290 | 287 | | |
291 | 288 | | |
292 | | - | |
293 | 289 | | |
294 | 290 | | |
295 | 291 | | |
| |||
299 | 295 | | |
300 | 296 | | |
301 | 297 | | |
302 | | - | |
303 | 298 | | |
304 | 299 | | |
305 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments