Repository navigation
feat(trending-challenge-rewards): add winning track titles + URLs to the digest - #91
Merged
Merged
Conversation
…the digest The Slack digest in #trending-challenge-reward-notifications only listed handles, so an artist with several trending tracks gave no way to tell which track actually won. Resolve each winner's track via `trending_results.id` (the numeric track id as text) joined to the current `track_routes` row, and post a linked list under the existing tweet block: rank, handle, and the track title linking to its audius.co permalink. The tweet code block is unchanged byte-for-byte so the copy-paste-to- Twitter flow still works; the links ride along in the same message, outside the fence, so Slack renders them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Requested by Michael in #eng-support: the digest in
#trending-challenge-reward-notificationsonly lists handles, so an artist with several trending tracks gives no way to tell which track actually won — especially now that trending fall-off moved from 7 to 10 days.What
queryTrackLinks()resolves each winner's track fromtrending_results.id(the numeric track id stored as text — seehandle_trending.sql) joined to the currenttrack_routesrow plus the owner's handle. Permalink shape/{handle}/{slug}matches how the API buildsTrack.permalink(api/dbv1/tracks.go).composeTrackLinks()renders a rank / handle / linked-title list, posted in the same Slack message directly under the existing block.Sample output
Top 10 Trending Tracks 🔥
(Rank 3 shows the Twitter handle
@mizterbonezz_92next to the Audius handlemizterbonezzmusicin the URL — different namespaces, working as intended.)Testing
trending.test.tscovering permalink construction, the missing-route fallback, the empty-id short circuit, entry assembly, and rank ordering. All 10 pass.tsc --noEmitclean (the ~1,748viemtype errors are pre-existing on main)./v1/full/tracks/trending/winners.🤖 Generated with Claude Code