@atolis-hq/corum 0.1.38 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/web/app.jsx CHANGED
@@ -843,8 +843,12 @@ function NodePage({ nodeId, templates, onNavigate, refreshToken, viewingRef, ove
843
843
  const childDisplayEntries = [...displayChildren.entries()]
844
844
  .filter(([templateName]) => templateName !== 'Field' && templateName !== 'EnumValue' && templateName !== 'Mapping');
845
845
  const displayEntries = [...rootSpecializedNodes, ...childDisplayEntries];
846
- const includedSchemaNodes = includedNodes.filter(n => n.template === 'Schema');
847
- const includedEnumNodes = includedNodes.filter(n => n.template === 'EnumDefinition');
846
+ // includedNodes now contains only directly-connected external nodes:
847
+ // - Schema / EnumDefinition: with structural children (fields/values) and referenced types
848
+ // - All other templates (DomainEvent, Command, etc.): root metadata only for connectivity panel
849
+ // This is computed server-side via expandExternalNodes, so no client-side filtering is needed.
850
+ const includedSchemaNodes = includedNodes.filter(n => n.template === 'Schema' && !n.parentId);
851
+ const includedEnumNodes = includedNodes.filter(n => n.template === 'EnumDefinition' && !n.parentId);
848
852
 
849
853
  function handlePropertyNavigate(targetNodeId) {
850
854
  if (displayedNodeIds.has(targetNodeId)) {
@@ -472,7 +472,8 @@ function SchemaFieldRows({ schemaNodeId, model, prefix = '', depth = 0, visited
472
472
  const childSchemaNode = !canExpandMapping
473
473
  ? (refNodeId ? (model.schemasById?.get(refNodeId) ?? null) : (localRef ? (model.schemasByName.get(localRef) ?? null) : null))
474
474
  : null;
475
- const canExpand = !!childSchemaNode && !visited.has(childSchemaNode.id);
475
+ const childHasFields = childSchemaNode ? (model.fieldsBySchema.get(childSchemaNode.id) ?? []).length > 0 : false;
476
+ const canExpand = !!childSchemaNode && !visited.has(childSchemaNode.id) && childHasFields;
476
477
  const isExpandable = canExpand || canExpandMapping;
477
478
  const childGhostFields = childSchemaNode ? overlayFieldsForSchema(overlayFields, childSchemaNode.id) : [];
478
479
  const c = field.properties?.collection;