fix(neode-ui): companion app opens every app in the native WebView, never an iframe
Demo images / Build & push demo images (push) Failing after 1m42s
Demo images / Build & push demo images (push) Failing after 1m42s
Regression: only X-Frame-Options apps were routed to the companion's in-app WebView; iframeable apps fell through to the iframe session, which is slower on the phone and loses the native back/forward/reload controls. Now any launch inside the companion (ArchipelagoNative.openInApp bridge present) goes to the WebView — both openSession and the legacy open() overlay fallback. Mobile web/PWA keeps the iframe session. With regression tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
97fbaf8818
commit
cc2c06c6dc
@@ -18,6 +18,16 @@ function nativeBridge(): ArchipelagoNativeBridge | undefined {
|
||||
return (window as unknown as { ArchipelagoNative?: ArchipelagoNativeBridge }).ArchipelagoNative
|
||||
}
|
||||
|
||||
/**
|
||||
* True when running inside the Android companion app (native WebView shell).
|
||||
* The shell injects `window.ArchipelagoNative`; a plain mobile browser / PWA
|
||||
* never has it.
|
||||
*/
|
||||
export function isCompanionApp(): boolean {
|
||||
const native = nativeBridge()
|
||||
return !!native && typeof native.openInApp === 'function'
|
||||
}
|
||||
|
||||
export function openExternalUrl(url: string): void {
|
||||
if (!url) return
|
||||
const native = nativeBridge()
|
||||
|
||||
Reference in New Issue
Block a user