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: cap parent scale audit names in feedback (#4629)

[._.]/ Adam Eivy6a1b20b10bef
diff --git a/server/lib/threejsModelPhysicalAudit.js b/server/lib/threejsModelPhysicalAudit.js
index ce855d9937..6c36e8dc7a 100644
--- a/server/lib/threejsModelPhysicalAudit.js
+++ b/server/lib/threejsModelPhysicalAudit.js
@@ -341,7 +341,7 @@ const getScaleAnisotropy = (scale) => {
const formatScale = (scale) => `[${scale.map((value) => Number(value.toFixed(4))).join(', ')}]`;
-const formatNames = (names) => names.map((name) => `"${name}"`).join(', ');
+const formatNames = (names) => listSpecNames(names.map((name) => `"${name}"`));
const collectNonReliefDescendants = (part) => {
const descendants = [];
diff --git a/server/lib/threejsModelPhysicalAudit.test.js b/server/lib/threejsModelPhysicalAudit.test.js
index 51d1eecc73..aa817b71db 100644
--- a/server/lib/threejsModelPhysicalAudit.test.js
+++ b/server/lib/threejsModelPhysicalAudit.test.js
@@ -138,6 +138,27 @@ describe('threejsModelPhysicalAudit', () => {
expect(finding.message).not.toContain('Rig');
});
+ it('caps descendant names in feedback-sized finding messages', () => {
+ const res = evaluateThreejsPhysicalAudit({
+ name: 'Many Descendants Spec',
+ parts: [{
+ id: 'root',
+ name: 'Root',
+ geometry: { type: 'box', width: 2, height: 1, depth: 1 },
+ scale: [3, 1, 0.2],
+ children: Array.from({ length: 9 }, (_, index) => ({
+ id: `child-${index + 1}`,
+ name: `Child ${index + 1}`,
+ geometry: { type: 'sphere', radius: 0.1 },
+ })),
+ }],
+ });
+
+ const finding = res.findings.find((item) => item.code === 'nonuniform-parent-scale');
+ expect(finding.message).toContain('(+1 more)');
+ expect(finding.message).not.toContain('Child 9');
+ });
+
it('checks animated scale channel endpoints against nested parts', () => {
const res = evaluateThreejsPhysicalAudit({
name: 'Animated Scale Spec',