perf: resize R2 thumbnails in chat and galleries#17569
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
|
API preview: https://pr-17569-api.vm6.ai |
Contributor
⚡ Lighthouse — Web
Tested URL: https://pr-17569-www.vm6.ai/ · Full report |
e7h4n
commented
Jun 13, 2026
e7h4n
left a comment
Contributor
Author
There was a problem hiding this comment.
LGTM
Summary
This PR adds a shared R2 image transform URL helper for vm0/vm7 CDN assets and applies it to chat previews, composer template previews, selected chips, and web gallery preview images. It also extends the web Next image remote pattern list for cdn.vm7.io.
Findings
No P0 or P1 issues found.
Testing
- Coverage: Adequate for this performance-focused change. The helper has focused coverage for vm0/vm7 CDN URLs, query/hash preservation, already transformed URLs, and non-R2 fallbacks; the touched composer behavior also has an updated UI expectation.
- Conventions: Compliant. I did not find forbidden internal mocks, direct fetch mocking, fake timers, or mocked database usage in the changed tests.
- Verification: GitHub check rollup is green for the PR;
git diff --check origin/main...HEADpasses locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
r2ImageTransformUrlhelper forcdn.vm0.ioandcdn.vm7.ioR2 image transform URLs, while leaving non-CDN and already transformed URLs unchanged.cdn.vm7.ioto Next image remote patterns.Tests
pnpm exec prettier --write <changed files>git diff --checkpnpm --filter @vm0/core lintpnpm --filter web lintpnpm --filter @vm0/app lintpnpm --filter @vm0/core check-typespnpm --filter web check-typespnpm --filter @vm0/app check-typespnpm --filter @vm0/core test -- src/__tests__/r2-image-transform.spec.tspnpm exec vitest run src/views/zero-page/__tests__/chat-composer-models-and-templates.test.tsx -t "selects and removes an illustration style from the picker"Notes
src/views/zero-page/__tests__/chat-composer-models-and-templates.test.tsxhit two unrelated existing failures: the slash picker keyboard selection timeout and the/custom-skill-1visible picker expectation. The targeted thumbnail test passes.