feat(report): support WebP screenshot consumers - #2857
Conversation
47b7135 to
1c2eced
Compare
88e097e to
675a785
Compare
Deploying midscene with
|
| Latest commit: |
ebfa101
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7cb2662f.midscene.pages.dev |
| Branch Preview URL: | https://feat-webp-report-consumers.midscene.pages.dev |
1c2eced to
74937f8
Compare
675a785 to
92530ad
Compare
74937f8 to
eb26577
Compare
92530ad to
ebfa101
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebfa101363
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| const extension = screenshotImageExtension(format); | ||
| return new URL( | ||
| `screenshots/${encodeURIComponent(ref.id)}.${extension}`, |
There was a problem hiding this comment.
Serve the WebP replay URLs generated here
In the server-backed playground flow, a WebP reference now resolves to screenshots/<id>.webp, but the corresponding route in packages/playground/src/server.ts:3098-3102 accepts only png|jpe?g assets and therefore returns HTTP 400. Consequently, replay dumps load but every lazily rendered WebP screenshot is broken in both playground consumers; extend that route and its response MIME mapping to support WebP.
Useful? React with 👍 / 👎.
Summary
Stack
This is PR 4 of 4 for the WebP foundation split.
Validation
pnpm exec nx run-many -t build -p @midscene/shared @midscene/core @midscene/report @midscene/visualizerpnpm --filter @midscene/shared test(33 files, 433 tests passed)pnpm --filter @midscene/core test(124 files, 1,352 passed, 8 skipped)pnpm --filter @midscene/report test(16 files, 87 tests passed)pnpm --filter @midscene/visualizer test(21 files, 104 tests passed)pnpm run type-check:testspnpm run lint