|
516
|
516
|
summaries directly. Do not re-enable automatic full Core Data rebuild as a fix
|
|
517
|
517
|
for missing UI details.
|
|
518
|
518
|
|
|
|
519
|
+### 2026-06-03 Data Types Restored, Startup Shows False Empty State
|
|
|
520
|
+
|
|
|
521
|
+Commit context: after `2a82f67`. Source: user confirmation, screenshots, and
|
|
|
522
|
+two reports.
|
|
|
523
|
+
|
|
|
524
|
+The user confirmed that Snapshot detail data types reappeared. A follow-up
|
|
|
525
|
+snapshot at 14:10 was a true no-delta run:
|
|
|
526
|
+
|
|
|
527
|
+| Metric | Value |
|
|
|
528
|
+|--------|-------|
|
|
|
529
|
+| Total records | 1,579,611 |
|
|
|
530
|
+| Wall clock | 3.0s |
|
|
|
531
|
+| Summed fetch | 0.2s |
|
|
|
532
|
+| Summed processing | 0.0s |
|
|
|
533
|
+| Summed insert | 0.0s |
|
|
|
534
|
+| Summed finalize | 2.2s |
|
|
|
535
|
+
|
|
|
536
|
+Screenshots also showed a UI startup issue: the app briefly opened Dashboard /
|
|
|
537
|
+Snapshots as if there were no archive observations, then populated the real
|
|
|
538
|
+SQLite rows about three seconds later.
|
|
|
539
|
+
|
|
|
540
|
+Conclusion: this is a loading-state bug, not an archive loss. Main tabs must
|
|
|
541
|
+distinguish "SQLite rows are still loading" from "SQLite query completed and no
|
|
|
542
|
+rows exist".
|
|
|
543
|
+
|
|
519
|
544
|
## Optimization Iterations
|
|
520
|
545
|
|
|
521
|
546
|
| Date | Commit | Change | Result / Status |
|
|
546
|
571
|
| 2026-06-03 | `199d2ef` | Stop automatic Dashboard Core Data cache rebuild after snapshot; refresh latest rows from SQLite only. | Triggered by freeze after copying a successful diagnostic report. Expected signal: copying diagnostics and returning to Dashboard/Snapshots remains responsive; Core Data cache rebuild is no longer started automatically after snapshot completion. |
|
|
547
|
572
|
| 2026-06-03 | `3abf63d` | Run Core Data cache rebuild/delete on a dedicated background context. | Triggered by `EXC_BAD_ACCESS` inside Core Data object insertion during cache rebuild. Expected signal: manual Settings cache rebuild no longer crashes due to `NSManagedObjectContext` queue misuse. |
|
|
548
|
573
|
| 2026-06-03 | `2a82f67` | Load snapshot/type detail UI from SQLite materialized summaries instead of Core Data cache. | Triggered by successful snapshots whose detail screens showed no data types after automatic cache rebuild was disabled. Expected signal: Snapshot detail, Data Types, per-type drilldown, and evolution chart show current archive details without rebuilding Core Data cache. |
|
|
|
574
|
+| 2026-06-03 | `ec7ee29` | Add explicit loading states for Dashboard, Snapshots, and Data Types archive rows. | Triggered by false "no observations/no snapshots/not enough data" states during the first few seconds after app launch. Expected signal: startup shows loading state until SQLite rows are available, then shows real archive data without flicker. |
|
|
549
|
575
|
|
|
550
|
576
|
## Current Diagnosis
|
|
551
|
577
|
|
|
575
|
601
|
- Snapshot and Data Types UI must not rely on Core Data cache rows being present.
|
|
576
|
602
|
SQLite observation rows and type summaries are already materialized during
|
|
577
|
603
|
archive finalization and should be the primary UI source for fresh snapshots.
|
|
|
604
|
+- UI state should distinguish loading from empty results. A nil or empty in-memory
|
|
|
605
|
+ row list during app launch is not evidence that the archive is empty.
|
|
578
|
606
|
|
|
579
|
607
|
## Open Issues / Observations
|
|
580
|
608
|
|