From e4e8b0b8617033e2d255427ba471e8dd48178a3a Mon Sep 17 00:00:00 2001 From: mallae-rpi Date: Thu, 16 Apr 2026 23:05:17 -0400 Subject: [PATCH] Implement pop-up after user clicks shuffle button to warn them that transitions may be discarded --- src/components/SetList.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/SetList.tsx b/src/components/SetList.tsx index cf5bd64..570de52 100644 --- a/src/components/SetList.tsx +++ b/src/components/SetList.tsx @@ -161,6 +161,15 @@ export default function SetList({ }; const handleShuffleToggle = () => { + // Warn the user if shuffling will discard existing transitions. + if (engine.playlist.getTransitions().length > 0) { + const confirmed = window.confirm( + (!isShuffled ? 'Shuffling' : 'Restoring original order') + + ' will discard all transitions between tracks. Continue?', + ); + if (!confirmed) return; + } + // Capture current playback position before reordering changes the timeline. const currentEntry = engine.getCurrentEntry(); const offsetWithinSong = currentEntry