Skip to content

fix(web): show Stems & Downloads section for stem-only tracks#14523

Merged
dylanjeffers merged 1 commit into
mainfrom
fix/show-stems-section-for-stem-only-tracks
Jul 16, 2026
Merged

fix(web): show Stems & Downloads section for stem-only tracks#14523
dylanjeffers merged 1 commit into
mainfrom
fix/show-stems-section-for-stem-only-tracks

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Problem

Reported in Slack: after purchasing a premium sample pack on web, the extras (downloadable files) never appear. Michael could see them on the native mobile app but not on web.

Repro track: Sounds For The People Vol. 2 | ATMO & TEXTURES

Root cause

This is not a post-purchase access-gate problem — the section never renders for this track regardless of purchase state.

The web track page gated the Stems & Downloads section on is_downloadable alone:

// GiantTrackTile.tsx
const shouldShowDownloadSection = !!track?.is_downloadable

Sample packs have is_downloadable === false — the purchased content is entirely stems. Confirmed against the reported track via the API:

is_downloadable   = false
is_download_gated = true
stem count        = 12

So the gate evaluated to false and the section was never mounted. Native mobile gates on is_downloadable || stems.length > 0, which is why it worked there.

The mobile-web TrackHeader looked correct (is_downloadable || (_stems?.length ?? 0) > 0), but _stems is a vestigial field on the Track model that nothing ever assigns — it's only ever read. That check silently degraded to the same broken condition.

Fix

Match native mobile's gate on both web surfaces by sourcing stems from the useStems query:

  • GiantTrackTile.tsx (desktop) — add the stems check.
  • TrackHeader.tsx (mobile web) — use useStems and drop the dead _stems read.

Verification

Ran the web client against production and loaded the reported track logged out, toggling the fix via git stash to isolate cause and effect:

  • Before: no Stems & Downloads section at all.
  • After: section renders and lists all 12 stems.

The purchase gate itself was already correct — once the section mounts, useDownloadableContentAccess drives the locked/unlocked state as expected.

tsc --noEmit and eslint pass clean on both changed files.

Notes for reviewers

  • Adds a useStems query to the desktop track tile. It's the same query the DownloadSection already issues, so it's a cache hit rather than an extra request.
  • _stems is now unread on the track page but still referenced by the purchase modals (PurchaseContentPage, GuestCheckoutPage, PremiumContentPurchaseDrawer, PurchaseSuccess), where it looks equally dead — those show a stem count in the purchase UI and are likely rendering 0. Left alone here to keep this fix scoped; worth a follow-up.

🤖 Generated with Claude Code

The track page on web gated the Stems & Downloads section on
`is_downloadable` alone, so a track that ships stems but has the
original file download disabled never rendered the section — even
after the user purchased it.

Sample packs are exactly this shape: `is_downloadable` is false and
the purchased content lives entirely in the stems. Native mobile
already gates on `is_downloadable || stems.length > 0`, which is why
the section appeared there but not on web.

Match the native mobile gate on both web surfaces:

- GiantTrackTile (desktop) gated only on `is_downloadable`.
- Mobile-web TrackHeader also checked `_stems`, but nothing ever
  populates that field, so it degraded to the same broken check.
  Use the `useStems` query instead and drop the dead `_stems` read.

Verified against Full Crate's "Sounds For The People Vol. 2 | ATMO &
TEXTURES" (is_downloadable=false, 12 stems): the section is absent
before the change and lists all 12 stems after.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a318216

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 merged commit a05ed4d into main Jul 16, 2026
13 checks passed
@dylanjeffers
dylanjeffers deleted the fix/show-stems-section-for-stem-only-tracks branch July 16, 2026 17:51
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