Commit ad63e39
Fix duplicate upload notifications for collection track publishes (#14031)
## Summary
- Ensure collection (playlist/album) child tracks are explicitly marked
as playlist uploads before publish.
- Preserve `is_playlist_upload` through web upload metadata adaptation
and SDK upload schema parsing.
- Prevent backend `create` track notifications from fanning out for each
child track in collection upload retries.
## Changes
- `packages/common/src/api/tan-query/upload/usePublishCollection.ts`:
set `metadata.is_playlist_upload = true` when composing child track
metadata for collection uploads.
- `packages/common/src/adapters/track.ts`: include `is_playlist_upload`
in `trackMetadataForUploadToSdk()` output.
- `packages/sdk/src/sdk/api/tracks/types.ts`: add `isPlaylistUpload` to
`UploadTrackMetadataSchema` so strict parsing keeps the field.
## Notes
- Root cause traced to missing propagation of `is_playlist_upload`;
discovery-provider trigger logic only suppresses per-track create
notifications when this field is true.
- Targeted tests were not runnable in this environment because `vitest`
is not available in the package runtime path.
<div><a
href="https://cursor.com/agents/bc-2d121f4b-259a-5b96-9d0e-f1b7d29f50af"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/automations/c63aa103-66df-4558-b31d-675358e5c6a1"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a> </div>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ray Jacobson <raymondjacobson@users.noreply.github.com>1 parent 0a737dc commit ad63e39
3 files changed
Lines changed: 4 additions & 0 deletions
File tree
- packages
- common/src
- adapters
- api/tan-query/upload
- sdk/src/sdk/api/tracks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
0 commit comments