Skip to content

feat(artists): prioritize preferred artists in Discover suggestions - #739

Merged
LucasSantana-Dev merged 4 commits into
mainfrom
feat/preferred-artists-priority-in-suggestions
Apr 20, 2026
Merged

LucasSantana-Dev merged 4 commits into
mainfrom
feat/preferred-artists-priority-in-suggestions

Conversation

@LucasSantana-Dev

Copy link
Copy Markdown
Owner

Reads user's saved preferred artists (Musical Taste) and prepends to /api/artists/suggestions response so Discover always surfaces what the user explicitly favorited, regardless of Spotify state. Non-fatal on DB error.

The /api/artists/suggestions endpoint now reads UserArtistPreference
rows where preference='prefer' for the requesting user and prepends
them to the response BEFORE Spotify top-artists or the popular cache.

This ensures the Discover tab always surfaces what the user has
explicitly favorited via the Musical Taste page, regardless of
Spotify availability or OAuth scope state.

Errors loading from DB are non-fatal — the route falls through to
the existing Spotify + cache flow.
@vercel

vercel Bot commented Apr 20, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment Apr 20, 2026 4:18am

Request Review

@LucasSantana-Dev
LucasSantana-Dev enabled auto-merge (squash) April 20, 2026 03:16
@coderabbitai

coderabbitai Bot commented Apr 20, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@LucasSantana-Dev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 23 minutes and 14 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 23 minutes and 14 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 635895c2-3be2-46a4-a977-69aab7807b86

📥 Commits

Reviewing files that changed from the base of the PR and between fd0378e and 333bdb5.

📒 Files selected for processing (1)
  • packages/backend/src/routes/artists.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/preferred-artists-priority-in-suggestions

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 010547c into main Apr 20, 2026
12 checks passed
LucasSantana-Dev added a commit that referenced this pull request May 13, 2026
The /api/artists/suggestions endpoint now reads UserArtistPreference
rows where preference='prefer' for the requesting user and prepends
them to the response BEFORE Spotify top-artists or the popular cache.

This ensures the Discover tab always surfaces what the user has
explicitly favorited via the Musical Taste page, regardless of
Spotify availability or OAuth scope state.

Errors loading from DB are non-fatal — the route falls through to
the existing Spotify + cache flow.
@LucasSantana-Dev
LucasSantana-Dev deleted the feat/preferred-artists-priority-in-suggestions branch May 23, 2026 02:21

This branch was successfully deployed

1 active deployment
Preview — 333bdb5c Deployed Apr 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant