Show a thumbnail on payout notifications#3341
Conversation
payouts carries img_url (the post that paid out) and the api has always sent it, but the type was missing from the image mapper. It is live and not rare: roughly 1,500 rows a day, about half of them with an image. It was missed because the sdk has no ApiPayoutNotification type at all, so the type list was derived from an incomplete source.
Greptile SummaryThis PR enables thumbnails for payout notifications.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "Show a thumbnail on payout notifications" | Re-trigger Greptile |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe notification image utility now recognizes ChangesNotification thumbnail handling
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) 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 |
Problem
payouts("your post paid out") carriesimg_urland the api has always sent it, but the type was missing from the image mapper, so those rows render text-only.It is live and not rare: roughly 1,500 rows a day, about half of them with an image.
Why it was missed
I derived the original type list from the sdk types, and there is no
ApiPayoutNotificationtype at all — even though the api emitspayoutsand the row already renders. An incomplete source produced an incomplete list.Verified against the backend instead this time:
endpoints.pyhas anACTIVITY_TYPE_PAYOUTbranch that serializesimg_url,convert_source_row_payoutspopulates it viaget_post(), and the live table confirms the rows carry real image urls.Change
Adds
payoutstoIMAGE_TYPES(theimg_urlgroup). Still gated on "Show Images", like the other notification thumbnails. Votes remain the only image-carrying type left text-only, as agreed: highest-volume, and every thumbnail would repeat the user's own post.The matching web change is ecency/vision-next#1144.
Tests
650 pass; lint and typecheck clean.
Summary by CodeRabbit