Conversation
Made-with: Cursor
Crop Dirtberry generations before upload and storage so every surface uses the same dimensions, and add supporting tests/docs for the new pipeline behavior. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThis PR introduces Dirtberry image generation model support with specialized image cropping. It adds a new jimp-based cropping utility, integrates it into batch and single generation processors, registers the Dirtberry model in the configuration and pricing schemas, and updates generation hooks to handle dimension overrides from cropped outputs. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Delete temporary Dirtberry research/test files and revert incidental test-only changes so the branch only contains implementation code. Made-with: Cursor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db11a87d64
ℹ️ 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".
| } catch (cropError) { | ||
| console.error( | ||
| `${logger} Dirtberry crop failed, falling back to original image:`, | ||
| cropError | ||
| ) |
There was a problem hiding this comment.
Sync persisted dimensions when Dirtberry crop falls back
When cropDirtberryImageBuffer throws, this branch logs and keeps going with the original buffer, but outputWidth/outputHeight stay at the pre-crop request values (params.width/height, typically 832x1144 for Dirtberry). Because the upstream request is forced to source dimensions (832x1216), a crop failure stores metadata that no longer matches the uploaded asset, which can skew aspect-ratio-dependent rendering and downloaded dimension expectations; the same pattern is present in convex/batchProcessor.ts.
Useful? React with 👍 / 👎.
| inputMime && JIMP_ENCODABLE_MIME_TYPES.has(inputMime as JimpEncodableMime) | ||
| ? (inputMime as JimpEncodableMime) | ||
| : "image/jpeg" |
There was a problem hiding this comment.
Preserve output MIME when Dirtberry is re-encoded
This fallback forces outputMime to image/jpeg for any input MIME Jimp cannot encode, but the processors still upload with the original response content-type header and derive the file extension from it. If Dirtberry (or a future variant) returns something like image/webp, the code will upload JPEG bytes labeled as WebP, leading to incorrect metadata/content-type and potential decode issues for clients.
Useful? React with 👍 / 👎.
Summary by CodeRabbit
Release Notes