Add session-authorized Storage images for React - #518
Merged
Merged
Conversation
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.
Why
Dynamic albums need to pass canonical Storage receipts to React while checking current application permissions on every image and download request. This adds
@transloadit/viewer/reactand a Web-standard@transloadit/viewer/serverroute, without proxying image bytes through the application or making Viewer own gallery/auth state.Contract
placeholder="blur"uses the receipt's ThumbHash through a bounded decoder shared with Next. No native dependencies, new runtime dependencies or load handlers. Transparent and letterboxed images stay empty; crop placeholders preserve proportions.object-fitthrough the explicitobjectFitprop for SSR safety.ok: null, retain their failure code. Utils stays dependency-free.Validation
Target:
e521c0010618cbe3379a2af78b97dbc2dbc5044a.yarn checkandverify:fullpass: 456 Viewer tests and 863 Node tests (one existing skip), plus Zod v3/v4 and the other workspace/script checks.Release and follow-up
Released through Changesets #519: Viewer 0.0.3 (alpha), Node/Types/Zod/legacy 5.0.1, MCP 0.4.1. The release workflow and release-commit CI are green. npm's
alphatag points to Viewer 0.0.3; its legacylatesttag remains 0.0.1, and the GitHub release is explicitly a prerelease.A clean npm-registry consumer passes five additional smoke tests for blur, current authorization, exact-version delivery and Zod v3/v4 extraction, without Next or Sharp installed. Publication needed one same-commit retry after npm accepted but temporarily hid staged versions; no version bump or tag workaround was used. Convex #33 now switches to exact registry versions and removes its preview tarballs/overrides.
The finish checklist records ownership and evidence. No production deployment, new Storage canary or credential changes are included. API2 #9253 remains a separate deferred follow-up.