Wait for the Even app host before choosing browser-preview mode
Found on the first real-phone run: the Even app's WebView provided window.flutter_inappwebview after the page's script had started, so the page wrongly fell back to browser-preview mode and never created the HUD page on the glasses. The page now waits (up to 6 s, polling and listening for the WebView's platform-ready event) and, if the host appears later still, reloads once into the real mode. Diagnostics show how long detection took and the browser's user agent. Tests: 205 passed (7 new); simulator 6 passed. Not reviewed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -196,6 +196,7 @@ export function mountPhoneUi(root: HTMLElement, controller: Controller, defaults
|
||||
rows(diagList, [
|
||||
['Runtime', defaults.runtime],
|
||||
['Page origin', location.origin],
|
||||
['Browser', navigator.userAgent],
|
||||
['HUD page', s.hudReady ? 'created' : 'not created'],
|
||||
['Device id', s.deviceId || 'none'],
|
||||
['Conversation id', s.state.conversationId ?? 'none'],
|
||||
|
||||
Reference in New Issue
Block a user