Files
pipelines/docs/notes/artifact-browser-handoff.md
T

33 lines
2.0 KiB
Markdown

# Artifact browser hand-off
Artifact URLs are within the PWA's root scope. Android can therefore capture
same-origin `_blank` links back into the installed app, even though the source
requested a new window. The artifact document has no app navigation shell, so
Back can close that activity instead of returning to the run.
Every artifact type now opens in the browser by default; optional in-app media
and Markdown previews have an explicitly named secondary action. The shared web
navigation helper requests a browser-specific Android VIEW intent
only in an Android installed/fullscreen app. Chrome, Edge, Samsung Internet,
Opera and Firefox families have fixed browser package identifiers; unknown
Chromium-family hosts use Chrome with the original HTTP(S) URL as browser fallback.
The app's own URL/history are not replaced. Normal browser/iOS links retain
native `_blank` navigation. Copy and Share never receive an intent URI.
Only validated HTTP(S) URLs without credentials are accepted. Intent fields are
fixed or encoded; original document fragments remain data before the final
`#Intent` marker, so they cannot inject actions/packages. Existing artifact CSP,
authentication, sandboxing and no-store headers are unchanged. No new artifact
origin, public endpoint, credential in a URL or relaxed permission is introduced.
Sources: [Chrome Android Intents](https://developer.chrome.com/docs/android/intents),
[Android PWA capture issue](https://issues.chromium.org/issues/364623620).
Chrome requires a user gesture and sanitizes component/selector overrides, so
the helper runs synchronously from native actions and never uses a timer.
Regression evidence: real desktop new-tab creation with original app URL/history
preserved; inspected installed-Android intent actions from all main artifact
surfaces; ordinary copy URLs; mobile footer bounds at 390/420px. Actual Android
intent dispatch/default-browser/channel availability and hardware Back remain a
phone verification, not something these desktop captures prove.