ReviewOS

also looking at this

craft-native/craft

fix(ios): preserve specific protocol errors during dispatch

#303
Merged glennmichael123 wants to merge codex/preserve-native-bridge-errors into main
3 files +51 -11
packages/zig/src/bridge_mobile_system.zigmodified+9-0
Changes to packages/zig/src/bridge_mobile_system.zig
@@ -822,6 +822,15 @@ test "an action the namespace does not serve is reported, not ignored" {
822822 }
823823}
824824
825test "both system presenter lookups report a missing webview explicitly" {
826 if (!is_darwin) return error.SkipZigTest;
827 const saved = ios_dispatch.getWebView();
828 defer ios_dispatch.setWebView(saved);
829 ios_dispatch.setWebView(null);
830 try testing.expectError(bridge_error.BridgeError.WebViewHandleNotSet, uikit.topmostViewController());
831 try testing.expectError(bridge_error.BridgeError.WebViewHandleNotSet, uikit.keyWindowScene());
832}
833
825834test "openURL without a url reports it rather than settling nothing" {
826835 // Swift's `if let` fell through here and never resolved or rejected the
827836 // callback, so the page waited out a 30-second timeout with no cause to