fix: fixed the image array to JSON error.#1087
Conversation
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughPost image storage changes from comma-delimited serialization to JSON, with migration support for existing rows. Pictique UI components now render provided image URI arrays directly, and the inlang project ignore rules were updated. ChangesPost image encoding
Inlang project ignore rules
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@platforms/pictique/api/src/database/migrations/1784133148233-ReencodePostImages.ts`:
- Around line 21-66: Update the up migration to process posts in bounded
keyset-paginated batches rather than loading all image rows at once; order and
fetch each batch using the post id, and continue until no rows remain. Replace
the per-row sequential updates inside each batch with a bulk update where
practical, while preserving the existing empty-string, valid-JSON, and legacy
comma-splitting conversion behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: aac31aac-8131-4fc2-a735-e692eea8eedc
📒 Files selected for processing (5)
infrastructure/control-panel/project.inlang/.gitignoreplatforms/pictique/api/src/database/entities/Post.tsplatforms/pictique/api/src/database/migrations/1784133148233-ReencodePostImages.tsplatforms/pictique/client/src/lib/fragments/Post/Post.svelteplatforms/pictique/client/src/lib/fragments/PostModal/PostModal.svelte
703e2bd to
cfd7942
Compare
…used OOM during update.
Description of change
Image array to JSON error fixed.
The migration doesn't update any table rather just fixes the previous image data urls and converts it into proper array so that the previous data remains intact and we do not have to flush the whole DB to fix the error.
Issue Number
Closes #1075
Type of change
How the change has been tested
Manually.
Change checklist
Summary by CodeRabbit
Bug Fixes
Chores