networksso.js now also answers every site in the hub's GET /v1/sso-sites (the hand-written list
missed sites, the ViralAdSource bug), ?return=<site>&to=/path links remember the way back and
/sso/resume finishes it after the sign-in, and the deliberate-tap state lives 1 hour. Every
/go/<site> and ?return= request goes to networksso (no per-site line in server.js any more).
qa/networksso-return.e2e.mjs: a hub-only site, silent check, tap, wallet step, return links,
no open redirect. All network sign-in suites pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/api/partner/vas/links serves ViralAdSource the same way as vab: ensure / stats / spins, tagged vas:<ad id>, on the member's own
"ViralAdSource" network source (new catalog template viraladsource, NET_SRC vas + viraladsource). qa/partner-vaslinks.test.mjs
(16 checks, incl. account by network username and vab/vas/dh kept apart); vab, dh, spins, netsrc, netconv, housespins green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pages, footers and the site assistant now name only TrustClickz; the footer
reads "(c) 2026 TrustClickz". Contact stays the network support link.
QA checks updated to assert no street address is shown.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page-load ping (networksso.page) only fires on a full top-level navigation with Sec-Fetch-Dest: document and a
member session that carries an email. It never fired for a Control Room tab kept open (client-side moves and the
/api/my/ping heartbeat), browsers that send no Sec-Fetch headers, wallet-only sessions, or the owner working in the
admin portal. Live finding: Marty has had no LinkSpin member session since 2026-11-15 20:20 UTC, before the ping
shipped (b2669cf, 21:36 UTC); 16 other members already had linkspin rows.
- networksso.seen(s): the same once-a-day ping for any signed-in request; called from /api/me (email or wallet),
the dashboard heartbeat /api/my/ping and the admin portal page (/admin, the owner's email; hub activity only,
the admin session is never shared).
- qa/networksso-activity.test.mjs (13 checks, real hub, in run.sh sso + member): a signed-in page load records
site linkspin, once a day, never API/assets/bots/fetches/signed-out, seen() for an open tab and a wallet session.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chatbot (chatbot.js + netkb.js route): a hand-off pattern still answers first; then the hub's POST /v1/kb/match answers with
this site's entry when it is sure, keeps or overrules the CANNED regex hit, and picks the AI prompt context, this site's own
entries first. 1.5 s timeout, then the hub is skipped for 30 s and the old pattern + BM25 path answers (NETKB_MATCH=0 = off).
Support desk: while a signed-in member types a new ticket, POST /api/my/support/suggest shows the closest help answers (KB
entries only, incl. ones written from past tickets, never another member's ticket; BM25 when the hub is down); Send is never
blocked. help-screen.js?v=20261116sg.
Tests: qa/netkb-semantic.test.mjs (route/suggest decisions, fail soft, shared-file parity; run.sh kb) and
qa/support-suggest.mjs (run.sh member). netkb.js is the same file in all eight network sites.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stand-in wallet partner now runs the real wallet-site hubevents.js (from ../../5xyourteam/app, skipped when absent) behind
POST /api/hub/events, and the hub hooks it (HUB_HOOK_EVERY_MS 1 s). New cases: the partner session open in the browser ends after
Sign out everywhere on LinkSpin (member.signedout, matched by the member wallet), and a partner session opened before a hub
block ends after it (member.blocked). Same file in InstantAdPay and LinkSpin: ALL PASSED from both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
POST /api/admin/house-spins creates or updates Banner Spins on a house account (ADMIN_EMAIL or NETWORK_LINKS_OWNER) for house ads
such as the Network Ad Space rows, through the same bannerspin.js calls the member Links screen uses (create, update, addBanner,
updateBanner). Admin auth only (portal session or the admin key); no member session is read or minted. Every call, denied ones
too, goes to the new admin action log (adminaudit.js: MySQL table admin_audit, JSONL without a database) with who, what and when;
GET /api/admin/house-spins/log reads it. qa/housespins.test.mjs (in run.sh netsrc) covers auth, house-account only, member
checks, idempotent repeat, prune, serving + click attribution, the log and no session minted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
networksso.js (the same file on every network site): with HUB_SSO=on /sso/start asks the network hub, /sso/in takes the hub's h1. token (this site's HUB_SECRET, iss hub, aud linkspin, 60 s, single use, state cookie) and falls back once to the pairwise InstantAdPay check when the hub has nobody. networksso.page() on every GET of the main host: a signed-in member's page load tells the hub once (nsso.hp) and pings /v1/activity once a day, only while the hub answers /health.
Sessions: SESSION_TTL_HOURS (168 = 7 days in production), renewed on use at most hourly; cookie 30 days, the server's sliding expiry decides. auth.endSessions.
Sign out everywhere: POST /api/auth/logout-everywhere; the account menu's Sign out asks "Only LinkSpin or every network site"; cr-shell.js?v=20261115hub. hubsync: member.blocked and member.signedout end every session of that member here.
Chatbot: a sign-in lasts 7 days and renews; the silent check is every 2 minutes.
Tests: qa/networksso-hub.e2e.mjs (same file as InstantAdPay, in run.sh). qa sso: ALL PASSED; qa member: ALL PASSED (known warnings).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Login ad: every Control Room page asks (cr-shell.js loginAd, the per-tab sessionStorage guard is gone); the server answers with an ad only when the member's last finished view on LinkSpin is older than loginAdEveryHours (site setting, default 3). loginadclock.js (the same file as InstantAdPay), MySQL table login_ad_views through DOCSTORE_URL. POST /api/ads/login/seen at the end of the countdown restarts the clock only if the serve was dwell-2 s earlier. Member erase forgets the row. Admin site setting label.
Signed out: /api/ads/slot?type=login draws nothing and counts no view (bots, probes, previews cannot run up an advertiser's numbers).
Hop: a member who signed in here because another network site asked ("Sign in with LinkSpin", nsso.back) goes back there after the login ad (/sso/resume), from every Control Room screen, not only the retired /my.
networksso.js: the network-wide copy (loop guard 120 s, fivex, unknown r refused); fivex added to the wallets map (FIVEX_URL, default https://5xyourteam.com).
Tests: qa/networksso-partner.e2e.mjs (same file as InstantAdPay, in run.sh): partner via LinkSpin, LinkSpin clock, signed-out slot; networksso e2e retries a keep-alive ECONNRESET. qa sso: ALL PASSED; qa member: ALL PASSED (2 known warnings; networksso e2e flaked on ECONNRESET once, passes with the retry).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
erase.js runs inside the app so the documents modules keep in memory and the MySQL docs rows stay consistent. Refused
unless force: a main wallet, an on-chain member number, positions, a team here, ads running or queued. Removes the
account, their spin links with every click row in rot_hits and conversions (rotator.eraseOwner, docstore.rowsWhere),
and scrubs every document that mentions them with scrub.js (same file as InstantAdPay) through the owning module's live
copy: accounts, audiences, coach, convtrack, earned (unspent credits go away), hubsync, iapsync, mail-intro, postbacks,
registry, rotator, sponsorfollow; others (updates-log, ...) through docstore. A 30-day email-hash tombstone (erase.json)
stops the InstantAdPay registry sync and hub events from bringing them back; the log keeps hashes and counts only.
hubsync handles member.erased {emailHash}. qa/erase.test.cjs 6 pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1. Top-up across positions: an ad burns from ONE position, and topUpCampaign only looked at the ad's
own position (or the main one when the list row had no memberId), so credits bought on a linked
position could never top up the ad. Ported from InstantAdPay 2026-09-27 (Jim Watts): the ad's real
member id is read from the campaign row; when it cannot cover, the refusal names where the free
credits are and offers switchOptions; with the member's yes (switchTo, only a position on the
account) moveFunding settles what the ad already ran up on the OLD position, moves the ad, then
tops up. Ads screen asks in-page (own dialog) and retries. Create already had the largest-position guard.
2. Toasts: errors stay until closed (close button, role=alert), other notes 3.5 to 9 s by length.
3. Banner Spin per-banner clicks: his 3 clicks were all unmatched (no view on record for that browser),
so they landed on the fallback row and every banner said 0. Click matching now also tries the same
connection (daily-salted IP-only hash) when the browser key finds nothing (mail/exchange app view,
click opened in the phone browser), view notes last 60 min instead of 15, and the stats split
'Fallback shown' from 'Clicks not tied to a banner' so the rows add up to the total. History is not
backfilled: views were never stored per visitor, so old clicks cannot be tied reliably.
4. Holding tank: hub-made waiting accounts with no sponsor are in the tank (waiting, rescue, readyTick
read listAll with { shells: true }; 'hub-shell' no longer holds anyone back). Locked / sponsored /
unknown, grace, 2-adoption cap unchanged; readyTick still never switches a shell on;
accounts.listAll default unchanged (mailings skip shells).
Assets: cr.css, cr-shell.js, ads-screen.js ?v=20261114tu, banner-spin.js ?v=20261114bc.
QA: walk member 0 bugs (36 ok), netconv 57/57, networksso ALL PASSED, tank-hold all passed (new hub
shell part), profile policy 16/16, new topup-positions 8/8, new bannerspin-attrib 7/7, bannerspin e2e
75/75, hubsync 15 checks, tank-cap 15/15, sponsorfollow 30/30.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>