Conversation
- Item #1: Create toBatchJobSummary helper to strip generationParams (10-50KB) from getUserBatchJobs and getUserActiveBatches list views - Item #2: Fix ImageCard N+1 subscriptions by batch-fetching favorites in PaginatedImageGrid, reducing 50+ useQuery calls to 1 - Item #3: Optimize getFollowingFeed to use per-user indexed queries instead of scanning all public images (O(n*k) vs O(total_public)) - Items #4-5: Document enrichImages full-doc limitation and generationParams v.any() size concerns in schema comments
…lleries by adding `min-h-0` and `overflow-hidden` to the scroll container and introducing new tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughBatch-fetch favorite statuses in the gallery, add an optional Changes
Sequence Diagram(s)sequenceDiagram
participant Parent as PaginatedImageGrid
participant Convex as Convex API
participant Child as ImageCard
participant Auth as Auth (useUser)
Parent->>Auth: check isSignedIn
Parent->>Parent: compute imageIds (useMemo)
Parent->>Convex: useQuery(api.favorites.batchIsFavorited, {imageIds})
Convex-->>Parent: favoriteStatuses {id: boolean}
rect rgba(100,200,100,0.5)
Parent->>Child: render with isFavorited={favoriteStatuses[id]}
end
rect rgba(200,100,100,0.5)
Child->>Auth: check isSignedIn (if needed)
alt isFavorited prop provided or not signed in
Child-->>Child: skip per-item useQuery
else
Child->>Convex: useQuery(api.favorites.isFavorited, {imageId})
Convex-->>Child: isFavoritedQuery
end
Child-->>Child: displayFavorited = optimistic > prop > query > false
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
…standard resolution lookups and custom base scaling, adding tests for video models.
Summary by CodeRabbit
Performance Improvements
UX / Layout
Behavior
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.