diff --git a/jam-ui/src/components/client/JKSessionMyTrack.js b/jam-ui/src/components/client/JKSessionMyTrack.js
index 4053f9c1c..75eea8f42 100644
--- a/jam-ui/src/components/client/JKSessionMyTrack.js
+++ b/jam-ui/src/components/client/JKSessionMyTrack.js
@@ -14,7 +14,7 @@ import { UncontrolledTooltip } from 'reactstrap';
import { getInstrumentName } from '../../helpers/utils';
import { getPersonById } from '../../helpers/rest';
import { ASSIGNMENT } from '../../helpers/globals';
-import { selectSessionId } from '../../store/features/activeSessionSlice';
+import { selectSessionId, updateParticipantTrackInstrument, updateUserTrack } from '../../store/features/activeSessionSlice';
import { syncTracksToServer } from '../../services/trackSyncService';
import './JKSessionMyTrack.css';
import pluginIcon from '../../assets/img/client/plugin.svg';
@@ -121,10 +121,25 @@ const JKSessionMyTrack = ({
// For user's own track, use TRACK1
await jamClient.TrackSetInstrument(ASSIGNMENT.TRACK1, instrumentId);
+ // Update Redux state immediately so UI reflects the change
+ if (clientId && track?.client_track_id) {
+ // Update participant track (for UI display)
+ dispatch(updateParticipantTrackInstrument({
+ clientId,
+ trackId: track.client_track_id,
+ instrumentId
+ }));
+ // Also update userTracks (for server sync payload)
+ dispatch(updateUserTrack({
+ id: track.client_track_id,
+ instrument_id: instrumentId
+ }));
+ }
+
// Sync tracks to server after instrument change
- if (sessionId && jamClient) {
+ if (sessionId && clientId) {
console.log('[Track Sync] Instrument changed, syncing tracks');
- dispatch(syncTracksToServer(sessionId, jamClient));
+ dispatch(syncTracksToServer(sessionId, clientId));
}
setShowInstrumentModal(false);
@@ -166,7 +181,7 @@ const JKSessionMyTrack = ({
}}
onClick={hideAvatar ? undefined : handleProfileClick}
>
-
+