Commit 0a737dc
Fix track overflow menu showing delete action in playlist edit context (#14098)
## Summary
- hide `Delete Track` from the track overflow menu when the menu is
being used in collection page remove-flow context (`onRemove` present)
- keep `Delete Track` available in other contexts
## Root Cause
- the table overflow menu for collection pages injects a contextual
"Remove from this playlist/album" item, but still relied on `TrackMenu`
default `includeDelete=true`
- this caused owners to see both remove and delete in the same menu,
making accidental destructive deletes possible
## Testing
- attempted focused web test run: `npm run -w packages/web test --
--runInBand OverflowMenuButton`
- environment limitation: `vitest: not found` in this workspace
<div><a
href="https://cursor.com/agents/bc-4f76c0ca-43e3-5b6e-b530-cc675a842cbd"><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 45ce680 commit 0a737dc
1 file changed
Lines changed: 8 additions & 1 deletion
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
0 commit comments