fix: strip www. prefix in normalizeProfileUrl to fix Instagram social linking#151
Conversation
… linking When URLs with www. prefix (e.g., www.instagram.com/user) were passed to updateArtistSocials, they wouldn't match existing socials in the database that were stored without the www. prefix. This caused Instagram socials to not be added when the AI provided URLs with www. prefix. The fix normalizes all URLs by stripping the www. prefix, ensuring consistent URL matching regardless of input format. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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 |
Braintrust eval reportCatalog Opportunity Analysis Evaluation (HEAD-1769103938)
Catalog Songs Count Evaluation (HEAD-1769103938)
First Week Album Sales Evaluation (HEAD-1769103938)
Memory & Storage Tools Evaluation (HEAD-1769103938)
Monthly Listeners Tracking Evaluation (HEAD-1769103938)
Search Web Tool Evaluation (HEAD-1769103938)
Social Scraping Evaluation (HEAD-1769103938)
Spotify Followers Evaluation (HEAD-1769103938)
Spotify Tools Evaluation (HEAD-1769103938)
TikTok Analytics Questions Evaluation (HEAD-1769103938)
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
www.prefixnormalizeProfileUrlto stripwww.prefix for consistent URL matchingnormalizeProfileUrl.test.tsandupdateArtistSocials.test.tsRoot Cause
When the AI passes URLs like
https://www.instagram.com/goosebytheway/, the normalized URL becomeswww.instagram.com/goosebytheway. If the database already has the social stored asinstagram.com/goosebytheway(without www.), the lookup fails and the social fails to be linked.Test plan
normalizeProfileUrlto strip www. prefix (GREEN)normalizeProfileUrl.test.ts🤖 Generated with Claude Code