Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix([issue-2106]): fall back to the layer's own label for custom layer ids on apply

Adam Eivy62477e9eadc1
diff --git a/client/src/components/songs/ReferenceAnalysis.jsx b/client/src/components/songs/ReferenceAnalysis.jsx
index 2ebf6a88d2..dc9a0cd812 100644
--- a/client/src/components/songs/ReferenceAnalysis.jsx
+++ b/client/src/components/songs/ReferenceAnalysis.jsx
@@ -367,11 +367,14 @@ export default function ReferenceAnalysis({
}
onApplyPart?.({
id: comparePart?.id || '',
- label: comparePart?.label || (proposal.layerId ? harmonyPartLabel(proposal.layerId) : 'Extracted part'),
+ // Prefer the harmony-part vocabulary label; a custom layer id falls back
+ // to the layer's own label (harmonyPartLabel returns '' for unknown ids).
+ label: comparePart?.label
+ || (proposal.layerId ? (harmonyPartLabel(proposal.layerId) || layerLabel(proposal.layerId)) : 'Extracted part'),
role: comparePart?.role ?? (proposal.layerId || ''),
score: proposal.text,
});
- }, [proposal, comparePart, onApplyPart]);
+ }, [proposal, comparePart, onApplyPart, layerLabel]);
// Deep-link fallbacks: stale ?analyze= id, or a reference with no audio yet.
if (!reference) {