Free check partly gated behind joining the network (Marty 2026-11-16)

Not signed in: grade, verdict, first finding and the opinion line; the rest (scores, findings,
chain facts, screenshot, evidence) stays on the server. Join or sign in by one-time email link
(hub /v1/join with the wwi.ref sponsor when HUB_JOIN=1; staging reads only). 1 free check a day
without an account, 3 for members. Red flags deduped (deterministic VERIFIED one kept), grade
recomputed on read. Privacy: joining and emails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-16 11:36:29 -06:00
parent 5f1a8239f5
commit 47de249a8b
20 changed files with 317 additions and 56 deletions
+29 -1
View File
@@ -80,6 +80,34 @@ var Render = (function () {
var deep = v.kind === 'deep' && v.report ? '<div style="display:flex;flex-direction:column;gap:16px">' + deepSections(v.report, ex) + '<span class="opinion">' + OPINION + '</span></div>' : '';
return head + '<div class="res-body"><div class="res-main">' + main + '</div><div class="res-side">' + side + '</div></div>' + deep;
}
function draw(el, v) { el.innerHTML = v.status === 'done' ? done(v) : steps(v); }
// not signed in: the server sent only the grade, the verdict, the first finding and counts of what is locked
function gated(v) {
var ex = v.explorer, g = v.grade || {}, L = v.locked || {};
var title = v.address ? WWI.short(v.address) : (v.website || 'Check');
var head = '<div class="res-head"><div style="display:flex;flex-direction:column;gap:6px"><span class="eyebrow">Free check</span>'
+ '<h2 class="sec">' + esc(title) + (v.chainName ? ' <span style="font-weight:500;color:var(--mut)">on ' + esc(v.chainName) + '</span>' : '') + '</h2>'
+ '<span class="mono" style="font-size:14px;color:var(--ink2)">' + (v.address && ex ? '<a class="src" href="' + ex + '/address/' + esc(v.address) + '" target="_blank" rel="noopener nofollow">' + esc(WWI.short(v.address)) + '</a>' : '') + (v.readAt ? ' &middot; read ' + esc(v.readAt.time) + ' &middot; block ' + Number(v.readAt.block).toLocaleString('en-US') : '') + '</span></div>'
+ (g.grade ? '<div class="gradebox ' + gradeCls(g.grade) + '"><div class="g">' + esc(g.grade) + '</div><div class="n">' + (g.forced_by_flag ? 'One critical flag caps the grade at High, whatever the other scores. ' : '') + 'Our opinion, from the published rubric applied to the public facts.</div></div>' : '') + '</div>';
var f = v.report && v.report.top_findings && v.report.top_findings[0];
var first = f ? '<div class="find"><span class="tag ' + esc(f.tag) + '">' + esc(f.tag) + '</span><span>' + link(f.text, ex) + '</span></div>'
: v.firstFact ? '<div class="find"><span class="tag ' + esc(v.firstFact.tag) + '">' + esc(v.firstFact.tag) + '</span><span>' + link(v.firstFact.text, ex) + (v.firstFact.source ? ' <a class="src" style="font-size:13px" href="' + esc(v.firstFact.source) + '" target="_blank" rel="noopener nofollow">source</a>' : '') + '</span></div>' : '';
var items = [];
if (L.scores) items.push(L.scores + ' category scores');
if (L.findings) items.push(L.findings + ' more finding' + (L.findings === 1 ? '' : 's'));
if (L.flags) items.push(L.flags + ' critical flag' + (L.flags === 1 ? '' : 's') + ' explained');
if (L.facts) items.push(L.facts + ' facts read straight from the chain, with sources');
if (L.screenshot) items.push('the website screenshot');
if (L.siteVsCode) items.push('website claims vs code');
var to = '/c/' + v.id;
var main = (v.report && v.report.verdict ? '<div><b>Our verdict (opinion):</b> ' + link(v.report.verdict, ex) + '</div>' : '')
+ (first ? '<div class="finds"><span class="disp" style="font-weight:700;font-size:17px">First finding (public fact)</span>' + first + '</div>' : '')
+ '<span class="opinion">' + OPINION.replace('below', 'in this report') + '</span>';
var lock = '<div class="card dk" style="gap:12px"><span class="disp" style="font-weight:700;font-size:20px">Join free to see the full report: one account across the network</span>'
+ (items.length ? '<span class="b">Still locked: ' + esc(items.join(', ')) + '.</span>' : '')
+ '<span class="b" style="font-size:14px">Joining is free and never asks you to connect a wallet. Members get 3 free checks a day.</span>'
+ '<div style="display:flex;gap:10px;flex-wrap:wrap"><a class="btn org" href="/join?to=' + encodeURIComponent(to) + '">Join free</a><a class="btn line" style="background:transparent;color:var(--on);border-color:var(--on3)" href="/sso/start?mode=go&amp;to=' + encodeURIComponent(to) + '">I am a member: sign in</a></div></div>';
return head + '<div class="res-body"><div class="res-main">' + main + '</div><div class="res-side">' + lock + '</div></div>';
}
function draw(el, v) { el.innerHTML = v.status === 'done' ? (v.gated ? gated(v) : done(v)) : steps(v); }
return { draw: draw, OPINION: OPINION, link: link };
})();