Skip to content

feat(shared): establish canonical WebP screenshot pipeline - #2851

Closed
quanruzhuoxiu wants to merge 1 commit into
mainfrom
feat/webp-screenshot-foundation
Closed

feat(shared): establish canonical WebP screenshot pipeline#2851
quanruzhuoxiu wants to merge 1 commit into
mainfrom
feat/webp-screenshot-foundation

Conversation

@quanruzhuoxiu

Copy link
Copy Markdown
Collaborator

Summary

  • add a shared PNG/JPEG/WebP format contract and canonicalize static screenshots to WebP
  • use Sharp in Node.js and Canvas/OffscreenCanvas in browsers while preserving native WebP and explicitly preserved JPEG streams
  • propagate MIME type and file extension through screenshot identity, storage, HTML reports, split reports, Markdown export, Report App, and Visualizer
  • retain the exact post-processing image bytes sent to the model and associate them with report evidence by SHA-256
  • document WebP input support in both English and Chinese API references

PR stack

This is PR 1 of 3 and targets main.

The browser-producer and device-producer PRs will target this branch. The original PR #2826 and feat/chrome-extension-default-webp branch remain unchanged as a rollback option.

Validation

  • pnpm --filter @midscene/shared test (33 files, 433 tests)
  • pnpm --filter @midscene/core test (125 files, 1357 passed, 8 skipped)
  • pnpm --filter @midscene/report test (16 files, 87 tests)
  • pnpm --filter @midscene/visualizer test (21 files, 104 tests)
  • pnpm exec nx run-many -t build -p @midscene/shared @midscene/core @midscene/report @midscene/visualizer
  • pnpm exec nx run-many -t build -p @midscene/android-playground @midscene/computer-playground @midscene/ios @midscene/harmony
  • pnpm run type-check:tests
  • pnpm run lint

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying midscene with  Cloudflare Pages  Cloudflare Pages

Latest commit: 46daa47
Status: ✅  Deploy successful!
Preview URL: https://d757d766.midscene.pages.dev
Branch Preview URL: https://feat-webp-screenshot-foundat.midscene.pages.dev

View logs

@quanruzhuoxiu

Copy link
Copy Markdown
Collaborator Author

Closing this superseded WebP stack PR. The replacement stack is #3012#3013#3014 and incorporates the latest main branch plus the follow-up architecture, format-validation, and CI fixes. PR #2856 remains open because it is an independent model-input evidence change.

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