@@ -163,14 +163,18 @@ export function NodeCard({ node, allNodes, allRelations, attributes, isActive, o
163163
164164 setIsChangingMorph ( true ) ;
165165 try {
166+ console . log ( `[NodeCard] Changing morph for node ${ node . id } to ${ morphId } ` ) ;
167+
166168 // Update the node's nbh property locally for immediate UI update
167169 node . nbh = morphId ;
168170
169171 // Notify parent component to handle the API call and refresh graph data
170172 await onMorphChange ( node . id , morphId ) ;
173+
174+ console . log ( `[NodeCard] Morph change completed successfully` ) ;
171175 } catch ( error ) {
172- console . error ( 'Error changing morph:' , error ) ;
173- alert ( ' Failed to change morph. See console for details.' ) ;
176+ console . error ( '[NodeCard] Error changing morph:' , error ) ;
177+ alert ( ` Failed to change morph: ${ error . message } ` ) ;
174178 } finally {
175179 setIsChangingMorph ( false ) ;
176180 }
@@ -273,6 +277,44 @@ export function NodeCard({ node, allNodes, allRelations, attributes, isActive, o
273277 />
274278 </ div >
275279
280+ { /* HTML display of relations and attributes for current morph */ }
281+ { ! isPublic && ( filteredRelations . length > 0 || filteredAttributes . length > 0 ) && (
282+ < div className = "node-morph-data" >
283+ < h4 > Current Morph Data</ h4 >
284+
285+ { filteredAttributes . length > 0 && (
286+ < div className = "morph-attributes" >
287+ < h5 > Attributes:</ h5 >
288+ < ul >
289+ { filteredAttributes . map ( attr => (
290+ < li key = { attr . id } >
291+ < strong > { attr . name } :</ strong > { attr . value }
292+ { attr . unit && < span > { attr . unit } </ span > }
293+ </ li >
294+ ) ) }
295+ </ ul >
296+ </ div >
297+ ) }
298+
299+ { filteredRelations . length > 0 && (
300+ < div className = "morph-relations" >
301+ < h5 > Relations:</ h5 >
302+ < ul >
303+ { filteredRelations . map ( rel => {
304+ const otherNodeId = rel . source_id === node . id ? rel . target_id : rel . source_id ;
305+ const otherNode = allNodes . find ( n => n . id === otherNodeId ) ;
306+ return (
307+ < li key = { rel . id } >
308+ < strong > { rel . name } </ strong > → { otherNode ?. name || otherNodeId }
309+ </ li >
310+ ) ;
311+ } ) }
312+ </ ul >
313+ </ div >
314+ ) }
315+ </ div >
316+ ) }
317+
276318 { node . description && (
277319 < div className = "node-description" >
278320 < ReactMarkdown remarkPlugins = { [ remarkGfm ] } > { node . description } </ ReactMarkdown >
0 commit comments