Commit cd0b4de
authored
perf: breathing timer optimization, chart caching, account switch UX (#114)
- Breathing animation: red band (≥95%) now ticks every 1s (step by 2)
instead of 500ms — halves CPU wakeups with imperceptible visual change.
Sparkle mode keeps 500ms for smooth twinkling. Timer auto-restarts on
mode transitions.
- Chart data caching: per-mode fingerprint tracks whether underlying data
changed. Toggling 24H→7D→24H skips recomputation if data is unchanged.
- Account switch: sets isLoading=true immediately so the spinner appears
during the refresh instead of showing stale data briefly.
- Specs updated (CONSTANTS.md, UI_SPEC.md)1 parent ecdf296 commit cd0b4de
File tree
5 files changed
+36
-10
lines changed- AIBattery
- ViewModels
- Views
- spec
5 files changed
+36
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | | - | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
47 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
| 58 | + | |
50 | 59 | | |
| 60 | + | |
51 | 61 | | |
| 62 | + | |
52 | 63 | | |
| 64 | + | |
53 | 65 | | |
| 66 | + | |
54 | 67 | | |
55 | 68 | | |
| 69 | + | |
56 | 70 | | |
57 | 71 | | |
58 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
313 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
314 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
315 | 325 | | |
| 326 | + | |
316 | 327 | | |
317 | 328 | | |
318 | 329 | | |
| |||
330 | 341 | | |
331 | 342 | | |
332 | 343 | | |
333 | | - | |
| 344 | + | |
334 | 345 | | |
335 | 346 | | |
336 | 347 | | |
337 | | - | |
| 348 | + | |
338 | 349 | | |
339 | 350 | | |
340 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | | - | |
| 236 | + | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| |||
0 commit comments