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 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-12 07:42:24 -05:00
parent e46780f872
commit abc76c47c8
3 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -335,8 +335,8 @@
const chip = (m, q) => '<span class="lt-node' + (q ? ' qualified' : (m.email ? '' : ' deep')) + '" title="' + esc(m.name || 'member') + (q ? ' · qualified buyer' : '') + '">' + esc(String(m.name || 'M').replace(/^@/, '').slice(0, 12)) + '</span>';
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 += '<span class="lt-node open">+ open</span>';
if (!html) html = '<span class="lt-node open">+ open</span>';
return '<div class="lt-row"><span class="lt-cap">L' + lvl + '</span><div class="lt-nodes">' + html + '</div></div>';