You need to fix a SwiftUI screen that shows a summary of the selected collection and reacts to data snapshot updates. Right now, after some updates, the interface keeps showing an old summary or shows it for the wrong collection.
CollectionSummaryView screen works in Swift 6 under the iOS 18 SDK.CollectionSnapshotProviding protocol with an asynchronous snapshot(for:) method.collectionID changes.collectionID arrives, the result of the old request must not be written into the current state.accessibilityLabel of the status text.CollectionSummaryView with collectionID = "alpha".collectionID to "beta".alpha arriving later than the response for beta.collectionID, the screen should show data only for the current collection.@MainActor for the view model and view stateUse line comments to explain the problem, its impact, the fix and how to test it.