From 5fd80ae0071b293aa6b036da22a4b2d2efb1d61e Mon Sep 17 00:00:00 2001 From: Nuwan Date: Thu, 15 Jan 2026 14:32:28 +0530 Subject: [PATCH] fix: render instrument description in tooltip instead of object Error: "Objects are not valid as a React child (found: object with keys {id, description, created_at, updated_at, popularity})" Root cause: - JKSessionMyTrack.js line 191 was rendering {track?.instrument} directly - track.instrument is an object, not a string - React cannot render objects as children - they must be primitives This error appeared when JamTrack stems were displayed on the session screen after selecting a JamTrack. The stems use JKSessionMyTrack components which have instrument tooltips. Solution: Changed tooltip content from: {track?.instrument} To: {track?.instrument?.description || track?.instrument?.name || 'Unknown Instrument'} This extracts the description string from the instrument object, with fallbacks to name or a default string. Fixes crash when hovering over JamTrack stem instruments. Co-Authored-By: Claude Sonnet 4.5 --- jam-ui/src/components/client/JKSessionMyTrack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jam-ui/src/components/client/JKSessionMyTrack.js b/jam-ui/src/components/client/JKSessionMyTrack.js index 7503fb22d..e70e0318d 100644 --- a/jam-ui/src/components/client/JKSessionMyTrack.js +++ b/jam-ui/src/components/client/JKSessionMyTrack.js @@ -188,7 +188,7 @@ const JKSessionMyTrack = ({ target={`instrument-tooltip-${clientId}-${track?.client_track_id || 'chat'}`} trigger="hover click" > - {track?.instrument} + {track?.instrument?.description || track?.instrument?.name || 'Unknown Instrument'} )}