fix(web): share artifact files instead of URLs
This commit is contained in:
@@ -8,6 +8,25 @@ test, or a code change without a capture, is `partial` at best.
|
||||
|
||||
Status legend: `todo` · `partial` (some of it works) · `done` (working + captured).
|
||||
|
||||
### Share artifact files, not links (2026-10-21)
|
||||
|
||||
Gallery/list/visit and viewer Share actions now fetch the artifact and pass a
|
||||
named, MIME-typed `File` to `navigator.share({files})`. No URL is substituted.
|
||||
Copy link remains separate. Browsers without file-sharing APIs disable Share;
|
||||
unsupported types, failed fetches, cancellation and blocked sharing have truthful
|
||||
feedback. A slow download that outlasts user activation asks for a fresh Share
|
||||
tap using the prepared file, rather than silently failing or sharing a URL.
|
||||
Preparation is deduplicated per button and canceled if its view goes away.
|
||||
|
||||
`test/artifactSharing.test.mjs` checks exact binary bytes, filename/MIME, file-only
|
||||
payloads, HTTP/network failures, unsupported types/APIs, cancellation/denial,
|
||||
expired activation, navigation away and concurrent clicks. The real Chrome
|
||||
`test/artifact-browser-probe.mjs` drives gallery/list/viewer Share and feedback
|
||||
states with a stubbed native Share API; captures at 390/420/1100px are in approved
|
||||
OpenCode temporary `artifact-file-share-captures/`. Native OS chooser/recipient
|
||||
delivery is **not tested**. Shell cache is v16. This supersedes earlier URL-share
|
||||
behavior without changing the artifact's external-open action or authentication.
|
||||
|
||||
### Image artifact primary preview (2026-10-21)
|
||||
|
||||
Image thumbnails and image list rows now open the existing in-app viewer. The
|
||||
|
||||
Reference in New Issue
Block a user