ReviewOS

also looking at this

craft-native/craft

fix(native): retain keyed controls and correct map and tab chrome

#368
Merged chris wants to merge codex/native-repeated-selector-identity into main
32 files +449 -100

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

packages/ios/templates/CraftApp.swiftmodified+0-4
Changes to packages/ios/templates/CraftApp.swift
@@ -783,10 +783,6 @@ final class CraftChrome: ObservableObject {
783783 } else {
784784 next = nil
785785 }
786 #if DEBUG
787 NSLog("[craft chrome trace] accessory present=%d owner=%@", next != nil ? 1 : 0,
788 owner.map { String(describing: ObjectIdentifier($0)) } ?? "none")
789 #endif
790786 tabAccessoryOwner = owner
791787 guard tabAccessory != next else { return }
792788 tabAccessory = next
packages/ios/templates/CraftNativeScreen.swiftmodified+0-11
Changes to packages/ios/templates/CraftNativeScreen.swift
@@ -4693,12 +4693,6 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
46934693
46944694 private func restoreShellChrome() {
46954695 guard !isAppScript else { return }
4696 #if DEBUG
4697 NSLog("[craft chrome trace] restore route=%@ controller=%@ top=%d hidden=%d accessory=%d",
4698 routeName ?? "none", String(describing: ObjectIdentifier(self)),
4699 navigationController?.topViewController === self ? 1 : 0,
4700 navigationController?.view.isHidden == true ? 1 : 0, tabAccessory != nil ? 1 : 0)
4701 #endif
47024696 CraftChrome.shared.setHiddenByScreen(tabBarHidden)
47034697 CraftChrome.shared.updateTabAccessory(tabAccessory, owner: self)
47044698 }
@@ -5370,11 +5364,6 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
53705364 guard !isAppScript else { return }
53715365 if options.keys.contains("tabAccessory") {
53725366 tabAccessory = options["tabAccessory"] as? [String: Any]
5373 #if DEBUG
5374 NSLog("[craft chrome trace] options route=%@ controller=%@ accessory=%d top=%d window=%d",
5375 routeName ?? "none", String(describing: ObjectIdentifier(self)), tabAccessory != nil ? 1 : 0,
5376 navigationController?.topViewController === self ? 1 : 0, view.window != nil ? 1 : 0)
5377 #endif
53785367 if navigationController?.topViewController === self, view.window != nil {
53795368 CraftChrome.shared.updateTabAccessory(tabAccessory, owner: self)
53805369 }