From 6d1cf489d751c428581511101e53a24a5095deb9 Mon Sep 17 00:00:00 2001 From: Nuwan Date: Thu, 5 Feb 2026 19:43:36 +0530 Subject: [PATCH] feat(14-01): extend WebSocket message transformation for attachment fields - Add attachment fields to CHAT_MESSAGE handler transformation - Include attachmentId, attachmentName, attachmentType, purpose, attachmentSize - Fields null/undefined for regular text messages - WebSocket payload maps to Redux format with attachment metadata --- jam-ui/src/components/client/JKSessionScreen.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jam-ui/src/components/client/JKSessionScreen.js b/jam-ui/src/components/client/JKSessionScreen.js index 829a00e53..d6d2e07fb 100644 --- a/jam-ui/src/components/client/JKSessionScreen.js +++ b/jam-ui/src/components/client/JKSessionScreen.js @@ -583,7 +583,13 @@ const JKSessionScreen = () => { message: payload.msg, createdAt: payload.created_at, channel: payload.channel || 'session', - sessionId: currentSession.id + sessionId: currentSession.id, + // Attachment fields (null/undefined if not an attachment) + purpose: payload.purpose, // 'Notation File', 'Audio File', or undefined + attachmentId: payload.attachment_id, // MusicNotation UUID + attachmentType: payload.attachment_type, // 'notation' or 'audio' + attachmentName: payload.attachment_name, // filename + attachmentSize: payload.attachment_size // file size in bytes (may be null) }; console.log('[CHAT DEBUG] Dispatching to Redux:', message); dispatch(addMessageFromWebSocket(message));