Skip to content

fix(trace-viewer): play videos inline and download real attachment - #30

Merged
joris-gallot merged 1 commit into
mainfrom
fix/trace-viewer-attachments
Aug 11, 2026
Merged

fix(trace-viewer): play videos inline and download real attachment#30
joris-gallot merged 1 commit into
mainfrom
fix/trace-viewer-attachments

Conversation

@joris-gallot

@joris-gallot joris-gallot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Fixes the two symptoms from the last comment on #18: a video attachment stuck on No preview, and a download that saved a ~1 kB .htm file.

Chromium never routes an <a download> request through the service worker, so the sha1 url reached the static server and saved its SPA fallback (try_files ... /trace/index.html) instead of the attachment. Downloads now fetch in-page, where the service worker does answer, and save a blob typed from the attachment's contentType. Measured on a real trace: video.webm, 8121 bytes, EBML magic, where the old link gave 482 bytes starting with <!DOCTYPE. It affected every attachment type, not just video. Videos also render inline with <video controls>.

Attachment badges on the run page now open the viewer's attachments tab, via a new ?tab= param. Nothing extra is uploaded for that: Playwright already embeds screenshots and videos in the trace zip (resources/<sha1>, worker/testTracing.ts), so those bytes are stored today whenever tracing is on.

Refs #18

@joris-gallot
joris-gallot force-pushed the fix/trace-viewer-attachments branch from 7a6c94f to 8f48d7f Compare August 11, 2026 12:31
@joris-gallot
joris-gallot merged commit 626feb9 into main Aug 11, 2026
8 checks passed
@joris-gallot
joris-gallot deleted the fix/trace-viewer-attachments branch August 11, 2026 12:36
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.

1 participant