From 4ffd632506e30550e05eae24b5c26a54730b0214 Mon Sep 17 00:00:00 2001 From: archipelago Date: Sun, 9 Aug 2026 17:53:40 -0400 Subject: [PATCH] =?UTF-8?q?refactor(federation):=20keyed=20diff-reconciled?= =?UTF-8?q?=20map=20scene=20=E2=80=94=20stable=20intro,=20smooth=20revisit?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root causes of the flaky intro / janky revisits, all fixed structurally: - Graph updates now RECONCILE against the live scene by identity (peer DID / request id) instead of wiping the SVG: in-place updates for label/online/ trust changes, animated arrivals for new nodes, animated departures for removed ones, and short-way-around slot glides when the ring layout shifts. The old wipe-and-rebuild orphaned every in-flight intro tween whenever the 5s poll or the async self-DID fetch landed mid-intro — that was the 'sometimes parts don't show'. - The intro is gated on readiness: first real container measurement (post- layout, via ResizeObserver) AND the self node being present, with a 1.2s fallback. Graph changes during the intro queue and apply on completion. - Layout is deterministic per node: peers sort by DID for slot assignment and jitter/phase hash from the DID, so backend response order can't shuffle the map between polls. - The long cinematic intro plays once per browser session; revisits get a shorter, lighter entrance that doesn't fight the route transition. - selfDid seeds from the cached localStorage value (re-cached on fetch) so the centre node and links exist from the first frame. - Requests' waiting-room orbit pushed clearly outside the peer rings (+1.0) with loose per-request hover jitter — outside until accepted, then the join animation glides them in. - Full unmount hygiene: every tween killed by target (incl. the repeating sonar pulse), fallback timer cleared, window listeners removed. Co-Authored-By: Claude Fable 5 --- .../components/federation/NetworkMap3D.vue | 925 ++++++++++++------ neode-ui/src/views/Federation.vue | 9 +- 2 files changed, 617 insertions(+), 317 deletions(-) diff --git a/neode-ui/src/components/federation/NetworkMap3D.vue b/neode-ui/src/components/federation/NetworkMap3D.vue index 31834fac..d0d1ac31 100644 --- a/neode-ui/src/components/federation/NetworkMap3D.vue +++ b/neode-ui/src/components/federation/NetworkMap3D.vue @@ -51,6 +51,28 @@