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-3483]): report absolute explode growth when every part starts on the centre

[._.]/ Adam Eivybdef95dc4526
diff --git a/client/src/lib/threejsExplode.js b/client/src/lib/threejsExplode.js
index 438f392ec8..82f3810ce3 100644
--- a/client/src/lib/threejsExplode.js
+++ b/client/src/lib/threejsExplode.js
@@ -143,7 +143,10 @@ export function computeExplodeLayout(parts, amount = 0) {
return {
offsets,
unitIds,
- growth: assembledRadius > EPSILON ? explodedRadius / assembledRadius : 1,
+ // Units stacked on one point have no assembled radius to grow FROM, but the
+ // clearance still moved them — report absolute growth there so the camera
+ // re-fit still fires instead of reading as "nothing changed".
+ growth: assembledRadius > EPSILON ? explodedRadius / assembledRadius : 1 + explodedRadius,
};
}
diff --git a/client/src/lib/threejsExplode.test.js b/client/src/lib/threejsExplode.test.js
index 222c7daf63..9954b4a8b6 100644
--- a/client/src/lib/threejsExplode.test.js
+++ b/client/src/lib/threejsExplode.test.js
@@ -160,6 +160,9 @@ describe('computeExplodeLayout', () => {
for (const id of ['stackA', 'stackB', 'stackC']) {
expect(magnitude(offsetOf(layout, id))).toBeGreaterThan(0);
}
+ // There is no assembled radius to divide by, but the parts DID move — a
+ // growth of exactly 1 would tell the camera nothing changed.
+ expect(layout.growth).toBeGreaterThan(1);
});
it('never moves relief off the part it rides', () => {