Skip to content

fix: avoid iOS 17 filter sheet crash#741

Merged
everpcpc merged 1 commit intomainfrom
codex/fix-ios17-filter-sort-crash
Apr 25, 2026
Merged

fix: avoid iOS 17 filter sheet crash#741
everpcpc merged 1 commit intomainfrom
codex/fix-ios17-filter-sort-crash

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

Problem

Opening Filter & Sort on iOS 17 could crash inside SwiftUI AttributeGraph while it inspected Swift 6 function metadata for stored async loader closures in the metadata filter sheet. Newer systems did not reproduce the same runtime failure, which made the issue easy to miss outside iOS 17 validation.

Approach

Replace the reusable metadata filter sheet's stored async and transform closures with concrete source and display-style enums. The sheet still loads the same publishers, authors, genres, tags, and languages, but the SwiftUI view value no longer exposes async closure fields to AttributeGraph. The compatibility rule is also documented in AGENTS.md so future reusable SwiftUI views avoid this pattern.

Scope

  • Add metadata filter source and display-style enums.
  • Update MetadataFilterSection to use concrete source/display values instead of stored closures.
  • Document the iOS 17 SwiftUI closure storage compatibility rule.

Validation

  • make format
  • make build-ios
  • Launched on iOS 17.5 iPhone 13 mini simulator and opened Browse > Filter & Sort without a new crash report
  • make build-macos
  • make build-tvos
  • git diff --check

Replace stored async and transform closures in the metadata filter sheet with concrete source and display-style enums so SwiftUI does not ask AttributeGraph to inspect Swift 6 concurrency function metadata on iOS 17.

Document the SwiftUI closure storage compatibility rule in AGENTS.md to keep similar reusable views from reintroducing the crash pattern.
@everpcpc everpcpc merged commit 7e60a66 into main Apr 25, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/fix-ios17-filter-sort-crash branch April 25, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant