Positions tab: show 8 generations for everyone, nothing deeper

Marty: the earlier cap by level was not what he meant. Every position now
shows Gen 1-8 in the generations list, pyramid, list view and org bar. Gen 8
is labelled as pass-up only, since there is no 9th level to pay at.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-26 08:56:59 -05:00
parent bfbd6a7a60
commit ed78aeb4a1
+5 -4
View File
@@ -36,9 +36,10 @@
function pathId(){const m=location.pathname.match(/^\/my\/(\d+)$/);if(m)return m[1];const q=new URLSearchParams(location.search).get('id');if(q&&/^\d+$/.test(q))return q;try{return localStorage.getItem('ctb.myId')||''}catch(e){return ''}}
const treeUI={byId:{},parent:{},depth:{},reach:7,homeId:0,rootId:0,mode:'pyramid',zoom:null,_applied:1};
// Marty 2026-09-26: show only the generations this position can be paid from. A member at
// level L catches upgrades from generations 1..L (7 at most); deeper ones only confused people.
const reachOf=d=>Math.max(1,Math.min(7,Number(d&&d.level)||1));
// Marty 2026-09-26: show 8 generations for every position and nothing deeper. Gen 1-7 pay at
// their Ascensus..Corona upgrades; gen 8 has no 9th level, so it reaches you only as a pass-up.
// Anything below gen 8 only confused people.
const reachOf=d=>8;
// Zoom the matrix so it fits small screens. treeUI.zoom: null = auto-fit (shrink
// to fit width, never enlarge), or a manual factor. Uses CSS `zoom` so the layout
// reflows cleanly (no leftover box, centering + scroll keep working).
@@ -210,7 +211,7 @@
const reach=reachOf(d);
const rows=gens.slice(0,reach).map((c,i)=>{
const cap=Math.pow(2,i+1);
const pays=i<7?`pays you at their <strong style="color:var(--text)">${LEVELS[i+1]}</strong> upgrade`:'beyond the 8 pay levels';
const pays=i<7?`pays you at their <strong style="color:var(--text)">${LEVELS[i+1]}</strong> upgrade`:'reaches you only as a pass-up (there is no 9th level)';
return `<div style="display:flex;align-items:center;gap:10px;margin:5px 0;font-size:13px;flex-wrap:wrap"><span style="width:46px;color:var(--muted)">Gen ${i+1}</span><div class="progress-line" style="flex:1;min-width:90px;height:9px"><span style="width:${Math.min(100,Math.round(100*c/cap))}%"></span></div><span style="width:88px;text-align:right"><strong>${c}</strong><span style="color:var(--muted)">${cap<=1024?' of '+cap:''}</span></span><span class="micro" style="color:var(--muted);width:230px">${pays}</span></div>`;
}).join('');
el.innerHTML=`<div style="border-top:1px solid var(--line);padding-top:12px"><small style="text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-size:11px">Team depth — members per generation</small><div style="margin-top:8px">${rows}</div><p class="micro" style="margin:8px 0 0">Full generations duplicate: each one can hold twice the last. A generation pays this position at exactly one level — stay qualified and at that level to catch it.</p></div>`;