fix: Resolve all audit issues from project readiness review

Blockers:
- IYmtgTests: replace ScannerViewModel() (no-arg init removed) with CollectionViewModel() in testViewModelFiltering and testPortfolioCalculation
- IYmtgTests: fix property access — scannedList, librarySearchText, filteredList, portfolioValue all live on CollectionViewModel, not ScannerViewModel; inject test data after async init settles

Major:
- ContentView: update .onChange(of:) to two-parameter closure syntax (iOS 17 deprecation)
- ModelManager: add missing import FirebaseCore so FirebaseApp.app() resolves explicitly
- CollectionViewModel.deleteCard: call CloudEngine.delete(card:) to remove Firebase entry when a card is deleted (prevents data accumulation)
- CloudEngine: remove never-called batchUpdatePrices() — full backup already handled by backupAllToFirebase()

Minor:
- CardDetailView: move to Features/CardDetail/CardDetailView.swift; remove from ContentView.swift
- Delete PersistenceActor.swift placeholder (superseded by PersistenceController.swift)
- AppConfig.validate(): broaden placeholder-email guard to catch empty strings and common fake domains
- ModelManager: document OTA restart requirement in code comment

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 20:22:45 -05:00
parent e18a1080de
commit 13753359b3
8 changed files with 125 additions and 145 deletions

View File

@@ -1,12 +0,0 @@
import Foundation
// MARK: - PERSISTENCE ACTOR (Superseded)
// This file is kept as a placeholder. The functionality has been replaced by:
// - BackgroundPersistenceActor (in Data/Persistence/PersistenceController.swift)
// - PersistenceController (in Data/Persistence/PersistenceController.swift)
//
// The new architecture uses SwiftData with automatic iCloud CloudKit synchronization,
// replacing the manual single-file JSON sync. One-time migration from the legacy
// user_collection.json is handled in BackgroundPersistenceActor.migrateFromJSONIfNeeded().
//
// ACTION: Remove this file from the Xcode project navigator once confirmed unused.