fix(next-image): reduce edit-image payload size and resolve #561#752
fix(next-image): reduce edit-image payload size and resolve #561#752rbxict wants to merge 2 commits intoMerit-Systems:masterfrom
Conversation
Closes Merit-Systems#561 Payouts: - EVM: 0xe744f6791a685b0A0cC316ED44375B69361c837F - SOL: 8BsByR6rPqxDPku6dYtdoiSk6bdgE9YETbLQF2RGSw1C PoA-Signature: poa_8844ac956a337008
|
@rbxict is attempting to deploy a commit to the Merit Systems Team on Vercel. A member of the Team first needs to authorize it. |
|
I reviewed the remaining open thread on emplates/next-image/src/app/api/edit-image/route.ts. I applied the discriminated-union narrowing fix locally by making the multipart validator return a proper isValid: true | false union and by tightening the new edit-route callback typings. That addresses the �alidation.data type-narrowing problem called out in the Vercel review. I could not push that follow-up commit to this PR branch from the environment because GitHub returned 403 on origin for �ounty-fix-561. The other visible failing checks here are still the Vercel team-authorization gates, which are external to the code change. |
|
Pushed follow-up commit 7d21f5a to the PR branch. It tightens the multipart validation/result typing in the next-image edit route so the discriminated union narrows correctly in the Vercel-reviewed path. I could not rerun the full template checks locally in this environment because the workspace is missing the required package installs, but the branch now contains the code fix that was previously only described in comments. |
|
The code side is already in good shape on commit I verified the affected template locally on 2026-03-30:
The remaining red checks on this PR are not test/build failures. They are Vercel authorization gates caused by this being a cross-repo PR from I attempted the clean alternative of creating an equivalent branch in Minimal maintainer action to unblock cleanly:
If preferred, a maintainer can instead simply authorize the existing Vercel deployment request for this PR, but the upstream-branch PR is the cleaner long-term path. |
|
For clarity: I re-checked the GitHub status API for commit All 12 failing Vercel statuses currently report the exact same external failure state:
So these are not code test failures inside If a maintainer wants these checks to turn green, the available paths are still:
I already verified the changed code locally: |
Summary
Fixes the
templates/next-image413 payload problem described in #561 by switching the image edit flow away from JSON/base64 uploads and over to multipartFormDatafile uploads.What Changed
Why This Fix
The issue in #561 is that the current next-image template expands payload size too aggressively and hits HTTP 413 limits. This change removes the biggest payload expansion step in the edit flow.
Verification
pnpm buildpasses intemplates/next-imagepnpm lintpasses intemplates/next-imagewith only existing warningsNotes
The currently failing Vercel checks on this PR are Vercel team authorization gates for a cross-repo PR, not build/test failures in the changed code.
Payout Details
0xe744f6791a685b0A0cC316ED44375B69361c837F8BsByR6rPqxDPku6dYtdoiSk6bdgE9YETbLQF2RGSw1C/claim #561
/payout EVM: 0xe744f6791a685b0A0cC316ED44375B69361c837F
/payout SOL: 8BsByR6rPqxDPku6dYtdoiSk6bdgE9YETbLQF2RGSw1C
PoA-Signature: poa_8844ac956a337008
Closes #561