Skip to content

feat(mobile): milestone share cards for plays, trending and editorial playlists - #14727

Merged
dylanjeffers merged 2 commits into
mainfrom
feat/milestone-share-cards
Nov 2, 2026
Merged

dylanjeffers merged 2 commits into
mainfrom
feat/milestone-share-cards

Conversation

@dylanjeffers

@dylanjeffers dylanjeffers commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Artists who hit a milestone get a push that opens a branded card (stat + cover art), ready to post to their Instagram, TikTok or Snapchat story with a 10s clip of the song behind it. The card stays reachable from the Share button on the notification.

Supersedes #14720. Its commit is kept here, rebased onto current main, with a second commit on top.

Milestone Detected by (already live) Card
1k, 5k, 10k, 50k, 100k, 500k, 1M plays handle_play 1,000 / Plays
Top 10 Trending, Underground Trending handle_trending #3 / On Trending
Hot & New, All Things Bass handle_playlist Hot & New / Featured Playlist

No new detection was needed: all of these already create notifications. The server decides which pushes open a card, in the pedalboard PR (AudiusProject/pedalboard#108).

What changed from #14720

  • Hot & New and All Things Bass are in. feat(mobile): shareable stat cards for track milestones and trending #14720 left them out "per Michael", but the current spec lists them for v1. Please confirm. Dropping them means removing one map in milestones.ts and the matching one in pedalboard.
  • Cards only at the seven play thresholds. feat(mobile): shareable stat cards for track milestones and trending #14720 offered one for every milestone, including "10 reposts". Lower play counts, reposts and favorites keep the X button.
  • The stat now sits on the cover art. It was above the art, making the sticker taller, while Snapchat (264x365) and TikTok (396:548) hardcode its size, so it would have been squashed.
  • iOS milestone pushes. entityId arrives as a string on iOS and Id.parse only takes numbers, so the card's track fetch would throw. It's now parsed to a number, which also gives the Track screen a numeric id.
  • Copy Link toast says "Track", since that's what the link points to.

Decisions

  • Playlist ids are production ids (4281, 1795117483). Only those canonical Audius playlists count, not the weekly hotandnew ones.
  • A track re-added to the same playlist doesn't notify again, because the notification group_id has no timestamp.
  • Gated and unlisted tracks still get no story options. There's no still-image fallback.

Testing

  • Unit tests pass in packages/common (thresholds and playlist ids) and packages/mobile.
  • Mobile typecheck has no errors in changed files. The 9 it reports are in unbuilt workspace packages (@audius/eth, spl, harmony).
  • ESLint and Prettier are clean on changed files, except import-resolver errors because the SDK wasn't built locally. npm run verify was not run as a whole, and CI runs web jobs only (all green), so run npm run verify in packages/mobile before merging.
  • Not run on a device or simulator. Before merging, check:
    • how the card renders with the stat over bright and dark art, and with long values (1,000,000, All Things Bass)
    • the captured sticker on Instagram, TikTok and Snapchat
    • opening from a push, both warm and cold start, on iOS and Android
    • the Share button on each notification type

Merge order

Ship this first. The pedalboard PR must wait until this is live in production.

🤖 Generated with Claude Code

dylanjeffers and others added 2 commits November 2, 2026 09:47
Adds a 'milestone' share type that carries the track and the stat
(plays/reposts/favorites count or trending rank). It reuses the story
pipeline with a stat headline on the sticker, so artists can post the
card with a clip of the song to Instagram, TikTok or Snapchat.

- Track milestone and trending notifications get a Share button that
  opens the card (collection and follower milestones keep X)
- Pushes flagged with shareCard open the card over the track; trending
  underground pushes now navigate too
- Web treats milestone shares as track shares for now

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extends the milestone stat cards:

- Tracks added to Hot & New or All Things Bass get a stat card from the
  existing track_added_to_playlist notification and push.
- Play milestones only offer a card at 1k, 5k, 10k, 50k, 100k, 500k and 1M.
  Lower counts, reposts and favorites keep the X button.
- Overlay the stat on the cover art. A taller sticker was squashed by the
  sizes hardcoded for Snapchat and TikTok.
- Parse the milestone push's track id, which iOS delivers as a string and
  which made the card's track fetch throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3d4e2c8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers
dylanjeffers marked this pull request as ready for review November 2, 2026 18:47
@dylanjeffers
dylanjeffers merged commit 2c4a24a into main Nov 2, 2026
18 checks passed
@dylanjeffers
dylanjeffers deleted the feat/milestone-share-cards branch November 2, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant