Skip to content

Conversation

@samholmes
Copy link
Contributor

@samholmes samholmes commented Jan 21, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

Note

Introduces NYM mixnet networking and cross-origin isolation support across platforms.

  • Adds privacy option to EdgeFetchOptions and routes privacy: 'nym' requests through queuedMixFetch; implements initMixFetch/queuedMixFetch using @nymproject/mix-fetch
  • React Native: Reworks asset loading
    • New BundleHTTPServer on Android (BundleHTTPServer.java) and iOS (BundleHTTPServer.swift) serving index.html, edge-core.js, and plugin files at http://localhost:3993/ with COOP/COEP headers
    • Updates EdgeCoreWebView (Android/iOS) to start/stop the server and load index.html; RN worker converts plugin URIs to /plugin/... paths
  • Browser: browser-io supports privacy: 'nym'
  • Build/system updates
    • Adds @nymproject/mix-fetch dependency
    • Webpack: enable async WASM, copy mix-fetch *.wasm and web-worker-*.js, serve src/index.html, set COOP/COEP dev headers, and proxy /plugin to localhost:3993
    • Podspec bundles all assets under android/src/main/assets/edge-core-js/*
  • Docs/metadata: CHANGELOG update; adds src/index.html; tsconfig skipLibCheck

Written by Cursor Bugbot for commit c5d1a9e. This will update automatically on new commits. Configure here.


Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

console.error('mixFetch error:', error)
throw error
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Development code routes all traffic through mixFetch

High Severity

The code contains a block explicitly marked "temporarily enable mixFetch always for development purposes" that checks privacy === 'none' (the default) to route ALL non-login network traffic through the NYM mixnet. This is inverted from the intended opt-in behavior—compare with browser-io.ts which correctly checks privacy === 'nym'. This will slow down all network requests and could cause failures if mixFetch initialization fails.

Fix in Cursor Fix in Web

</head><body></body></html>
""",
baseURL: Bundle.main.bundleURL
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source prop ignored, breaking custom script loading

Medium Severity

The visitPage() function now ignores the source prop except when it contains localhost:8080. On Android, mSource is completely ignored—it always loads from the bundle server. On iOS, custom sources not matching localhost:8080 are silently discarded. Previously, the source prop allowed loading custom scripts, which this change breaks.

Additional Locations (1)

Fix in Cursor Fix in Web

...opts,
mode: 'unsafe-ignore-cors' as RequestMode
})
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Browser mixFetch missing required initialization call

High Severity

The browser implementation calls queuedMixFetch without first calling initMixFetch(). The React Native implementation explicitly calls await initMixFetch() with a comment "Ensure mixFetch is initialized before use" before calling queuedMixFetch. The browser code only imports queuedMixFetch but not initMixFetch. When a browser user sets privacy: 'nym', the request will fail because createMixFetch() was never called to set up the mixFetch client.

Fix in Cursor Fix in Web

let server = BundleHTTPServer(port: 3993)
server.start()
self.httpServer = server

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS race condition between server start and page load

Medium Severity

In iOS init(), server.start() is called followed immediately by visitPage() on line 59. However, BundleHTTPServer.start() is asynchronous—it calls listener?.start(queue: queue) and returns before the server is actually ready to accept connections. The server is only ready when the state handler receives .ready. The WebView may attempt to load from localhost:3993 before the server is listening, causing the page load to fail. Android avoids this by only calling visitPage() from setSource(), which is invoked later by React Native.

Fix in Cursor Fix in Web

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.

2 participants