Staging test mode (Marty's rule: test apps never touch real people): TANK_MODE=iap with DRAFT_LIVE not 1 reads the pool + statuses from InstantAdPay but every pick (5 instant picks on a purchase, the Monday draft) and release is a preview kept here: no tank.adopt(), no sponsor change, no email. Yellow 'TEST MODE, nobody is adopted' strip on every page (/api/config testMode). Admin view: testMode, previewPicks, adoptionMailsSkipped. iap-tank 35/35 (new section 6 against the real draftpartner.js), unit 62/62, smoke 156/156. common.js/fx.css ?v=3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-15 08:42:22 -06:00
parent 1112a8c589
commit 3815965fc1
22 changed files with 101 additions and 50 deletions
+3
View File
@@ -29,6 +29,9 @@ window.FX = (function () {
+ links.map(l => '<a href="' + l[0] + '"' + (l[0] === active ? ' class="on" aria-current="page"' : '') + '>' + l[1] + '</a>').join('') + '</div></div>';
document.body.prepend(nav);
if (week) setWeek(week);
// staging test mode (DRAFT_LIVE not 1): say so on every page, plainly
getConfig().then(c => { if (!c || !c.testMode || $('testMode')) return; const b = document.createElement('div'); b.id = 'testMode'; b.className = 'testmode'; b.setAttribute('role', 'status');
b.innerHTML = '<div class="wrap"><b>TEST MODE, nobody is adopted.</b> Picks on this site are previews: no one gets a new sponsor and no email is sent.</div>'; nav.after(b); }).catch(() => {});
}
// ISO-ish week number of a Monday date (the mockup's "DRAFT WEEK 46")
function weekNo(monday) { const d = new Date(monday + 'T12:00:00Z'); const t = new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate() + 3)); const y = new Date(Date.UTC(t.getUTCFullYear(), 0, 4)); return 1 + Math.round(((t - y) / 86400000 - 3 + ((y.getUTCDay() + 6) % 7)) / 7); }