From abc76c47c8d77cde1438f56e2cdd09761bedb8ff Mon Sep 17 00:00:00 2001 From: martbost Date: Sat, 12 Sep 2026 07:42:24 -0500 Subject: [PATCH] Line tree: gold outline follows the chain's BuyerCounted events, plus a legend The Overview tree painted gold on the first N chips (N = buyer count) instead of the members the contract actually counted, so a non-buyer listed first showed as qualified (Hugh's line, 2026-09-12). /api/my/line now flags each member with qualified from BuyerCounted events for the account's ids; the tree uses that flag and shows a legend for gold / plain / open chips. Co-Authored-By: Claude Fable 5.1 --- public/assets/my.js | 4 ++-- public/my.html | 1 + server.js | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/assets/my.js b/public/assets/my.js index 012a76b..a0e8cfa 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -335,8 +335,8 @@ const chip = (m, q) => '' + esc(String(m.name || 'M').replace(/^@/, '').slice(0, 12)) + ''; const rowFor = lvl => { const L = levels.find(x => x.level === lvl); const members = L ? L.members : []; - const qn = lvl === 1 ? (buyerCount || 0) : 0; // highlight your qualified directs - let html = members.map((m, i) => chip(m, i < qn)).join(''); + // gold = the contract counted this member as one of your qualifying buyers (not "the first N chips") + let html = members.map(m => chip(m, !!m.qualified)).join(''); if (lvl <= 2 && members.length < (lvl === 1 ? 2 : 4)) html += '+ open'; if (!html) html = '+ open'; return '
L' + lvl + '
' + html + '
'; diff --git a/public/my.html b/public/my.html index 84dfbe3..62dadcd 100644 --- a/public/my.html +++ b/public/my.html @@ -234,6 +234,7 @@

Your line at a glance

Loading your line…

+

name qualifying buyer: bought a $20+ package, counts toward your levels  ·  name joined, no $20+ buy yet  ·  + open spot still open