oficina / sheets Public

Native: say why the grid layout's == may assume the main actor

Review #72 delta 2, finding 5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 7b7dadda8f022b2692d8da9d96bc7e38c04359a9 parent 5eab196
1 file changed, +3 −0
  • native/apple/Sources/SheetsKit/SheetGrid.swift +3 −0
diff --git a/native/apple/Sources/SheetsKit/SheetGrid.swift b/native/apple/Sources/SheetsKit/SheetGrid.swift
index d26fb49..f7c3b61 100644
--- a/native/apple/Sources/SheetsKit/SheetGrid.swift
+++ b/native/apple/Sources/SheetsKit/SheetGrid.swift
@@ -305,6 +305,9 @@ struct SheetGridContent: View, Equatable {
let actions: SheetGridActions
@GestureState private var draggingResize = false
+ /// SwiftUI compares views on the main thread, where they are built: `==`
+ /// is nonisolated only because Equatable requires it, and the stored
+ /// references (main-actor objects) are compared by identity, nothing more.
nonisolated static func == (a: Self, b: Self) -> Bool {
MainActor.assumeIsolated {
#if os(macOS)