From 130fc42c4556a2089e42ed2959879e3e75f3bc09 Mon Sep 17 00:00:00 2001 From: martbost Date: Thu, 13 Aug 2026 15:13:22 -0500 Subject: [PATCH] Teach spillover in the matrix views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tree nodes now carry referrerId, so positions placed by spillover (their referrer differs from their matrix parent) get a teal "spillover · ref #N" tag on cards in both the member dashboard and admin matrix, plus a legend entry. When a member is unqualified but has spillover positions under them — the classic "why do I have 2 under me but no checkmark?" state — a callout explains that spillover grows the matrix but only members joining with their own ID count toward 2/2, and points them at their share link. Co-Authored-By: Claude Fable 5 --- chain.js | 2 +- public/admin.js | 4 +++- public/my.html | 2 +- public/my.js | 17 +++++++++++++++-- public/styles.css | 2 ++ 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/chain.js b/chain.js index 86faafe..b6e6c7d 100644 --- a/chain.js +++ b/chain.js @@ -412,7 +412,7 @@ function getSubtree(id, showDepth = 3) { const l = node(m.l, depth + 1), r = node(m.r, depth + 1); const n = { id: nid, tier: m.tier, level: m.level, levelName: levelName(m.level || 1), - directCount: m.directCount || 0, earnedPol: m.earnedPol || 0, + directCount: m.directCount || 0, earnedPol: m.earnedPol || 0, referrerId: m.referrerId || 0, downCount: 0, downPol: 0 }; for (const c of [l, r]) if (c) { n.downCount += 1 + c.downCount; n.downPol = +(n.downPol + c.earnedPol + c.downPol).toFixed(2); } diff --git a/public/admin.js b/public/admin.js index 87f4a1d..ccb24ea 100644 --- a/public/admin.js +++ b/public/admin.js @@ -79,7 +79,9 @@ function mtCard(n){ if(!n)return '
open
slot
'; const down=n.downCount?`⬇ ${n.downCount} below · ${mtFmt(n.downPol)} POL`:'no downline yet'; const qmark=n.directCount>=2?'✓':''; - return ``; + const par=matrixUI.parent[n.id]; + const spill=par&&n.referrerId&&n.referrerId!==par?`↧ spillover · ref #${n.referrerId}`:''; + return ``; } function renderPyramid(){ const out=document.getElementById('matrixTree'),nav=document.getElementById('matrixNav'); diff --git a/public/my.html b/public/my.html index c034720..9005d90 100644 --- a/public/my.html +++ b/public/my.html @@ -6,7 +6,7 @@