Commit Graph

140 Commits

Author SHA1 Message Date
martbost 73bee6c826 Login ad on a clock, hop back to the asking site, 5xYourTeam in the wallets map, signed-out login slot refused (Marty 2026-11-15)
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>
2026-11-15 15:03:14 -06:00
martbost 60dc4d537d ViralAdBlitz "Use one of my spin links" (Marty 2026-11-15): /api/partner/vab/links op 'spins' (same net.v1 signature) lists the account's own spin links { code, name, url (public /r/ link on the clean link host), destinations (active), paused }, never partner-made links (tracked text ads, program links), nothing else about the account; hosts = every host a /r/ link answers on (also sent with account false) so ViralAdBlitz can tell a LinkSpin spin link from any other link. Read only. qa/partner-vabspins.test.mjs (12 pass) in qa netsrc; netsrc, sso, member green
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:37:02 -06:00
martbost f4789156b8 Member erase (Marty 2026-11-15, ticket LS-1021): POST /api/admin/erase {email, dryRun (default true), force} + the hub's member.erased event
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>
2026-11-15 12:29:33 -06:00
martbost b2b670df14 Network sign-in for DownlineHydra (2026-11-15, same change as InstantAdPay 1c06c58): networksso NAMES downlinehydra (same file as IAP), wallets.downlinehydra = DH_URL (default https://downlinehydra.com; staging https://dh.saasy.top until the domain switch), /go/downlinehydra and /go/viraladblitz hops
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:39:12 -06:00
martbost 86007f0784 Footer network links carry a referral username (Marty 2026-11-15): the signed-in member's own (/api/me), else the referral the visitor came in on (?ref= on the page, remembered for the visit, then the iap.sponsor join cookie; usernames only, never a member number or wallet). Tracked links get it as s1 (LinkSpin sends it on as ?ref=), plain links as ?ref=, none for Earners Corner. Same approach as VBB 6798503. common.js + netline.js ?v=20261115nr. NOT deployed (another lane owns the LinkSpin deploy).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 07:59:33 -06:00
martbost 6607e39e30 Partner tracked links generalized (2026-11-15): POST /api/partner/<site>/links for site dh (DownlineHydra programs) or vab (ViralAdBlitz text ads, the ad id as s1/placement). PARTNER_LINKS maps each site to its network template + link name; keys dh:<id> / vab:<id> keep the two apart; items take program or id. Catalog viraladblitz template gains clickid/placement/s1 params. qa/partner-vablinks.test.mjs 13/13 (signature, unknown site refused, source, edit keeps the code, dh vs vab apart, stats per site); run.sh netsrc runs netsrc 17/17 + partner-dhlinks 13/13 + partner-vablinks 13/13. LOCAL ONLY.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 06:20:23 -06:00
martbost e23d9ecbdb ViralAdBlitz as a network site (2026-11-15): network sign-in by wallet to ViralAdBlitz (networksso wallets.viraladblitz = VAB_URL, default https://viraladblitz.com; NAMES viraladblitz), fixed network link nwvab -> https://viraladblitz.com/{s2}?ref={s1} on the admin account, catalog network template viraladblitz + NET_SRC vab/viraladblitz (merged by hand beside d6e8de3's dh entry), netsites CODES viraladblitz: nwvab. qa: netsrc 17/17 (seven network links), partner-dhlinks 13/13. LOCAL ONLY.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 06:06:31 -06:00
martbost d6e8de3e6a Partner endpoint for DownlineHydra tracked program links (Marty 2026-11-15): POST /api/partner/dh/links, net.v1-signed with NETWORK_SSO_SECRET. op ensure makes or updates one link per program on the member's own account (by email, else network username), tagged with a new 'DownlineHydra' network source and the program id as sub-id (?s1=&placement=), clean link host from domains.hosts(); op stats answers clicks per program. rotator.ensurePartner / partnerStats; catalog template downlinehydra; NET_SRC dh. qa/partner-dhlinks.test.mjs 13/13, partner-spins 13/13, netsrc 16/16. LOCAL ONLY, not pushed or deployed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 05:26:46 -06:00
martbost 836332b5ed Network sign-in: a deliberate 'Sign in with InstantAdPay/LinkSpin' tap while signed out on the provider now asks for the provider's sign-in, then finishes the trip (/sso/resume), instead of bouncing back silently (Marty 2026-11-14: VBB sign-in did nothing)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 14:31:51 -06:00
martbost fb083b7085 GET /api/admin/member-extra?email= (Marty 2026-11-14, network hub member lookup): read-only, admin Bearer; what the member card leaves out: optedOut (drip unsubscribe), tank {inTank, ready {readyAt, holdUntil}, adoptions summary}. qa/member-extra.mjs in the member run (401 without/with a wrong password, 404 unknown, fields present). qa member: 57 passed 0 failed, member-extra 7/7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:03:34 -06:00
martbost e545343fe0 Michael Camire fixes + hub shells in the tank (Marty 2026-11-14, LinkSpin Support)
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>
2026-11-14 11:59:38 -06:00
martbost a630979a3a Network sites as LinkSpin traffic sources (Marty 2026-11-14: "Make sure each of these sites is its own traffic source and link spun so we can track it"). Catalog: InstantAdPay, LinkSpin, Stack POL, Earners Corner network templates (next to Downline Banners and Viral Banner Blitz). A spin-link click with ?src=<site id> (iap, linkspin, dlb, vbb, stackpol, earnerscorner) counts under the link owner's source for that site, made from the template on first use (network templates only, no postback, so no network hears of a click it did not send; no referrer = the site's name as referrer). netlinks.js: at boot the admin account gets one fixed network link per site, made once when missing: nwiap, nwls, nwdlb, nwvbb, nwsp, nwec -> https://<site>/{s2}?ref={s1} (Earners Corner without ref), so every site links to the others as linkspin.app/r/<code>?src=<sender>&s1=<member>&s2=<page>. Health checks probe a destination with its {macros} empty, as a click with no params lands. netsites.js: /api/network-sites adds go (the tracked link with ?src=linkspin); common.js + netline.js footers use it (rel nofollow). common.js?v=20261114ns, netline.js?v=20261114ns. qa: netsrc 16/16 (new, bash qa/run.sh netsrc), member 57 passed 0 failed, partner-spins 13/13, netconv 57/57, lsid 31/31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:39:34 -06:00
martbost 9025057128 Admin zone creation for a member (Marty 2026-11-14, approved named admin actions instead of signing in as a member): POST /api/admin/zones {owner, name, size, site, reason}, existing accounts only, same zones.create rules, logged. qa member 57/57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:09:27 -06:00
martbost f1f757f895 Footer: 'Part of the network' line from the network hub (Marty 2026-11-14 trust pack), smallest change before the 11-15 launch. netsites.js serves GET /api/network-sites (hub GET /v1/network-sites, 10 min cache, never waits on a slow hub, built-in fallback); common.js paints the line (LinkSpin marked as current) in the site footer and the members-area footer; company line TrustClickz, 615 Green Valley Drive, Moody, AL 35004; Earnings Disclaimer label; members-area footer links Support, Terms, Earnings Disclaimer, Privacy. common.js?v=20261114nf. qa member: 57 passed, 0 failed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 10:22:33 -06:00
martbost 5d630ec479 Banner Spins for Viral Banner Blitz (Marty 2026-11-14: "make sure Viral Banner Blitz incorporates banner spins that could be pulled in just like downline banners"). /api/partner/bl/spins takes { site: 'vbb' }: 125x125 + 250x250 spins, a "Viral Banner Blitz" source (new catalog template viralbannerblitz), and { username } (the member's network username) when no account holds the wallet; vbb only. Answers now carry host and each spin's size. Downline Banners' calls are unchanged (468x60, wallet only). Same NETWORK_SSO_SECRET signature. qa/partner-spins.test.mjs 13/13 (local copy, JSON store); networksso ALL PASSED; hubsync 15 checks ok
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 10:07:27 -06:00
martbost 42cbe96979 Hub switch-on (Marty 2026-11-14). Rule 2: a hub arrival gets person.locks.linkspin's sponsor when the LinkSpin contract holds them, never the plain network sponsor; sponsor.changed stays ignored. Quiet: a wallet filled from a hub event never switches payouts on (isQuiet: no gas, no lock, no 'payouts are switched on' mail). Rule 3: the holding tank (waiting, release, expiry, rescue, readyTick, autoAssign) leaves out anyone the hub reports locked on any contract or sponsored, and hub waiting copies that never signed in here; /v1/locked detail cached 10 min, last answer kept 1 h, after that held (unknown). Alignment to the hub sponsor only with HUB_TANK_ALIGN=on. Needs network-hub b44dba6. hubsync 15 checks, sponsorfollow 30/30, tank-cap 15/15, networksso ALL PASSED, tank-hold, carry-hold ok
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:45:43 -06:00
martbost 9c4a6458f6 Network sign-in for Viral Banner Blitz (2026-11-14): vbb listed under networksso wallets (VBB_URL, default https://viralbannerblitz.com), so "Sign in with LinkSpin" works on VBB the way it does on Downline Banners; NAMES gains vbb (same networksso.js as IAP, DLB, VBB). networksso unit + e2e: ALL PASSED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:16:26 -06:00
martbost ec09f2925e Holding-tank arrivals post shows the running total too (Marty 2026-11-14: post those totals so people know who is waiting to be adopted): '(N waiting in total)' after the new names
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:06:44 -06:00
martbost 1554c262a6 LinkSpin data in MySQL (Marty 2026-11-13: 'everything database-driven'). docstore.js: every .json/.jsonl data document under DATA_DIR lives in MySQL table docs (DOCSTORE_URL), served to the modules through their own fs calls from an in-memory copy, written through in order; one writer at a time (docs_writer), so an older copy during a deploy can never overwrite newer data; first boot imports each file and sets it aside (.imported-<date>). Spin-link clicks are rows in rot_hits (one insert per click instead of rewriting a 20 MB document; every click kept). Kept as files on purpose: chain-index cache, uploads, geo db, kits, marks, queues. Admin sessions load after the store. Rehearsed on a copy: 52/54 documents byte-identical (rotator.json minus hits, kb.json seeds refreshed), 97,579 clicks moved, links + clicks work after restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:25:59 -06:00
martbost d1c9d62801 Data safety (2026-11-13 incident: a deploy read a half-written rotator.json, the store fell back to empty and its next save wiped 294 spin links): safefs.js makes every .json write inside DATA_DIR atomic (temp file + rename); LinkSpin's rotator refuses to start empty when rotator.json exists but will not parse
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:11:27 -06:00
martbost 656c9a940d Downline Banners partner call (Marty 2026-11-13): /api/partner/bl/spins, signed with NETWORK_SSO_SECRET, lists the 468x60 Banner Spins of the account holding a wallet; with spinId it makes sure a Downline Banners source exists, tags an untagged spin with it and answers the image + click URLs with the board's macros
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 08:55:41 -06:00
martbost 17c9764cc7 Downline Banners now lives at https://downlinebanners.com (Marty 2026-11-13): network sign-in hop default moved off new.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 08:36:00 -06:00
martbost a7f9b80c18 Hub gaps (Marty 2026-11-13): deliberate sponsor changes -> /v1/sponsor-change, BTC4Hits accounts reported (no other door does), MemberActivated -> /v1/contract-bind (contract linkspin) from a retried queue; still one way, only with HUB_ENABLED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 08:21:59 -06:00
martbost 33285ad590 Merge branch 'hub-listener' 2026-11-13 07:51:48 -06:00
martbost 138c98ccec Network sign-in: same networksso.js as InstantAdPay (wallet sites); LinkSpin vouches for Downline Banners by wallet (2026-11-13)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 07:35:18 -06:00
martbost f3fc8dfe18 Team page: your directs' email, where they came from (referrer + ?src= tag) and how they joined, on each level-1 row (Marty 2026-11-13, same as InstantAdPay's 11-12 change); levels 2-3 never show emails. team.js?v=20261113org
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:10:17 -06:00
martbost c79b0aedf6 Network links (Marty 2026-11-13 'yes please proceed'): every click on a link to the other site goes through /go/<peer> (InstantAdPay -> /go/linkspin, LinkSpin -> /go/iap), so a signed-in member arrives signed in; signed out it is a plain redirect. Click-time rewrite in the shared scripts (IAP common.js; LinkSpin common.js + cr-shell.js), so copied share links stay clean; data-nogo opts a link out. Browser check: path+query+hash kept, other hosts and data-nogo untouched. iap-qa member ALL PASSED. common.js/cr-shell.js ?v=20261113nl
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 05:28:15 -06:00
martbost 3c8fc1802d Network sign-in: a wallet-only session counts as signed in when its wallet belongs to an account (session carries the address, not the email), so a member who signed in with their wallet is signed in on the other site too (Marty 2026-11-13: signed in on IAP, LinkSpin's check came back 'not signed in here'). networksso.test + e2e ALL PASSED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 05:09:56 -06:00
martbost a20e5a772e Merge network sign-in (InstantAdPay <-> LinkSpin) into main for the Friday launch (Marty 2026-11-13: 'we need to get that done now'). Conflicts only in script version tags (kept today's newer assets, re-tagged ?v=20261113sso). networksso.test 'ALL PASSED' both repos, networksso.e2e ALL PASSED, iap-qa member ALL PASSED. NETWORK_SSO_SECRET set on both Coolify apps. Chatbot KNOWLEDGE_DATE 2026-11-13.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 04:53:12 -06:00
martbost 31bf6b9f41 Network hub link behind HUB_ENABLED (default off): hub member.joined from another door becomes the same waiting shell account the InstantAdPay registry sync makes (ensure 'carried'/'network', fill empty fields only, sponsor line placed first, wallet last under carry.hold); wallet.connected fills an empty wallet; LinkSpin's own joins and wallet links go to /v1/join and /v1/wallet through a persisted retry outbox (DATA_DIR/hubsync.json). Signed X-Hub-Ts/X-Hub-Sig, 5-minute window, each event seq applied once. sponsor.changed and the rest are ignored (TODO). iapsync and /api/partner/registry unchanged. Test: HUB_DIR=<network-hub with /v1/resolve {id}> bash qa/run.sh hubsync, 10 checks against a local hub in JSON mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:07:28 -06:00
martbost 7c79bc7cc0 Join page records the ?src= tag in the first-touch source (Marty 2026-11-12: 'we need the source tag so we can know where these things come from'): joinedRef = <referrer host>/<src> or just <src> when the referrer was stripped; a tagged visit replaces an untagged 'direct' first touch; a real earlier source is kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 12:10:47 -06:00
martbost e79d5ae63e Network sign-in with InstantAdPay (Marty approved 2026-11-12): signed in on one site = signed in on the other, no email code
networksso.js (same file in both repos): /go/iap hop for signed-in members' cross-site links; /sso/start (state cookie +
30-minute loop guard) -> InstantAdPay /sso/check -> /sso/in?t=<v1 HMAC-SHA256 token, NETWORK_SSO_SECRET, 60 s, single-use nonce,
bound to the browser's state cookie, email, audience and a same-site relative path>. App host only (not link/pages hosts).
Member sessions only (admin portal never shared), ordinary 4-hour session. An email not here yet (sync not run) or not on
LS_TESTERS gets the normal email-code sign-in, email prefilled; nothing is created. Silent check on every Control Room screen
(cr-shell.js loads public/assets/netsso.js); never for bots/fetches; sign-out pauses it 12 hours. Engine Room, Fuel and the
arrival strip's Back to InstantAdPay go through /go/iap. Chatbot knows it (KNOWLEDGE_DATE 2026-11-12). Off until
NETWORK_SSO_SECRET (32+ chars) is set. ?v= bumped (cr-shell, fuel, engine-room: 20261112sso).

qa: networksso.test.cjs all passed, networksso.e2e.mjs (both servers, real browser) 31/31, run.sh member green (0 bugs)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:05:51 -06:00
martbost 3cc687aff5 Holding tank admin grant: POST /api/admin/tank/grant {adopter, count} assigns N real BTC4Hits imports on top of the cap as auto adoptions, skipping the bot patterns (yandex, dotted gmail); adopt/eligibility take skipCap (Marty 2026-11-11: the adopters who picked up the Yandex batch keep them and get the same number more). tank-cap 15/15, tank-hold all passed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:58:10 -06:00
martbost aff03d9c5c Admin spin-link route accepts up to 2 MB (BTC4Hits rotator #297 sends 834 URLs; every other route keeps the 64 KB limit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:41:37 -06:00
Marty Bostick bfa13302e1 Holding tank in the Control Room menu (Marty 2026-11-11): shown only to members who can adopt (eligible, or at the cap), badge = people adoptable right now, title says you can adopt up to <tankAdoptCap> at a time, opens More > My line; GET /api/my/tank/summary (cached waiting list, no full list); tank card says the cap; chatbot knows where the tank lives and the 10-at-a-time rule; cr-shell ?v=20261111tank, my.js ?v=20261111tank. qa/btc4hits-bridge 28/28 (incl. browser checks)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:17:31 -06:00
Marty Bostick 5d79abe318 BTC4Hits import, round 2: tank cap 10 at one time (setting tankAdoptCap) with tests; BTC4Hits origin kept on carried shells (joinedRef btc4hits) and the adoption note/email/auto-assign message say their BTC4Hits account moved here; imported spin links may carry every valid URL (admin route maxDests up to 2000, one save per batch), editor shows 50 rows of a big link with Show all, Check now runs in the background past 50, at most one pause email per link per day; chatbot knows /from/btc4hits + the cap (KNOWLEDGE_DATE 2026-11-11). qa: tank-cap 15/15, tank-hold all passed, btc4hits-bridge 21/21, sponsorfollow 30/30
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:08:58 -06:00
Marty Bostick f811ee2e8c Holding tank: an adopter may hold up to 6 people at one time (open adoptions not yet switched on payouts; setting tankAdoptCap, default 6; was 2 open adoptions), clear message at the cap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:49:01 -06:00
Marty Bostick 557bc15972 Legacy bridge /from/btc4hits: BTC4Hits is now LinkSpin sign-in page (angle b4h, sponsor cookie cleared, forced first-touch source legacy:btc4hits, no welcome-back credits), join.js?v=20261111b4h. qa/btc4hits-bridge.test.mjs 21/21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:23:28 -06:00
Marty Bostick 215af86e55 Admin spin links for the BTC4Hits import: POST /api/admin/rotations takes several destinations per link (urls[], fallback), GET lists a member's links + sources, DELETE removes one; tank waiting list reads every account (was the newest 2000)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:22:01 -06:00
martbost 27a975138a Owner (ADMIN_EMAIL) and the admin portal skip the 10-a-day upload cap (Marty 2026-11-08); members keep 10 a day
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 08:05:16 -06:00
martbost eedc15bc13 Conversion linkage, LinkSpin side (Marty 2026-11-07, "Yes ship these"): InstantAdPay's sign-ups, wallet links and package purchases on a click count for the click's owner, in one Conversions list. Reporting only: no sponsor, payout, credit or chain path changes.
The landing tag (t.js) adds the kept click id to links to linkspin.app, instantadpay.com and the share domains, also inside a member's own redirect link (Orlando's buttons are go.opgnetwerk.com/go?u=<encoded join link>). Spin and Banner Spin links are left alone and only LinkSpin's own id shapes travel. A spin link or Banner Spin pointed straight at those sites carries lsclk with no goal set up.

netconv.js: new partner op 'events' on /api/partner/conv. Append-only ledger DATA_DIR/netconv.jsonl so two app copies cannot overwrite each other, marks.claim plus the ledger keys for once-only, join and wallet once per root click, every purchase by its own key, 30 days from click to event, the first account on a click owns it, the click owner's own account and own clicks kept as tests, each row keeps what the click was so later events survive the hit ageing out of the rotator. Spin events mirror into rotator.conv (replayed on a timer) so per-link counts, sources and placements see them; postbacks fire as for LinkSpin's own conversions.

Reports > Conversions lists goals, joins, wallets, purchases, leads and partner postbacks with values, each once; per-link Conv. counts include goals. /join keeps lsclk as well as lsid. Guide, /conversions, privacy and chatbot (CANNED + FACTS) updated; reports.js and join.js tags bumped.

The false Pages webhook claim is gone from chatbot.js, join.js and the home page: leads go to the member's list and CSV, or into a pasted autoresponder form.

QA: bash qa/run.sh netconv (57 checks, also runs in member).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 07:46:43 -06:00
martbost 01ef4e9260 Holding tank: 24-hour sign-up grace plus a Who invited you box, the same rules as InstantAdPay (Marty 2026-11-07: "24-hour grace plus the prompt"). One network tank, so both sites behave the same.
Grace: for 24 hours from an account's created time nobody can adopt the person by hand: an Opens in badge, no Adopt button, a plain refusal from adopt(). Auto-assign keeps its clock from the wallet link, so the 24-hour hold is not stretched. The wallet-ready post waits for the grace and says the time really left, is skipped when the rotation takes them in that tick, the arrivals post moves to when the grace ends (marks.claim per member), and the Overview note and weekly email count only people who are open.

Prompt: LinkSpin members land on the Control Room, not the /tools Overview, so the box sits at the top of every Control Room screen, /tools included (cr-shell.js). Same checks as InstantAdPay, through setSponsor as a deliberate change with by 'invited', so it follows and clears the hold. With a wallet already linked the engine switches payouts on under the named sponsor right away, as an adoption does, and the confirm box says so first. Nobody invited me hides it everywhere and a small link on /tools brings it back. The named sponsor gets the referral email and an on-site notice (new hooks.notify).

Chatbot canned + systemPrompt, KNOWLEDGE_DATE 2026-11-07. cr-shell.js, common.js, credits-screen.js, my.js, admin.js, admin-sponsorcheck.js ?v=20261107tg. qa/tank-hold.test.mjs and qa/sponsorfollow.test.cjs extended; qa/run.sh member now runs tank-hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 07:06:44 -06:00
martbost f41d1ef384 Launch week: Founder badge + launch week contest (Marty approved 2026-11-05, PLAN.md options B and C)
Founder badge (cosmetic only: no credits, no POL, no perks, never posted to Telegram)
- Criterion: the account's earliest signed-in visit is before the launch moment (launchAt, default
  2026-11-15T06:00:00-06:00). Field: accounts.firstSeen, else lastSeen. Both are written only by
  accounts.touchSeen() on signed-in requests (dashboard, ping, chat); touchSeen now keeps firstSeen =
  the previous lastSeen on the next visit, so a pre-launch member who signs in again after launch still
  qualifies. Carried-over shells that never signed in have neither field and never qualify.
- Stored flag accounts.founder (JSON + MySQL column). Grant: launchweek.tick every 10 minutes from the
  launch moment, idempotent, one run per 10-minute slot across app copies (marks.claim); founderGrant '0'
  turns it off. Admin preview + "Grant Founder badges now" (refused before launch).
- Shown in the badge strip (on the way before launch, Share works, no Telegram post), wall (wall-founder.js),
  Team rows (my.js + team.js), the Team activity chip, and next to names on /leaderboard. Art:
  /badges/badge-founder.jpg, drawn in code in the existing card layout.

Launch week contest
- Window [launchContestStart or launchAt, launchContestEnd) = Sun Nov 15 6:00 AM to the end of Sat Nov 21,
  Central (end stored exclusive, 2026-11-22T00:00:00-06:00). Count = the weekly board's tier-1 TierPaid
  sales. Never counted: own positions, buys by linked positions (Qualified Start), the admin account and
  overrideHouseIds (as contestants or buyers), launchContestExcludeEmails/Ids. launchContestMinSales 2.
  Ties: sales, dollars, who got there first. Prizes launchContestPrizesPol '10,6,4'.
- Payout only by Admin > Launch week > Pay launch contest: the ranking is frozen on the first press, the
  admin's confirmed list must match it, balance + gas checked first, each place claimed once (marks.claim)
  and written as sending before award(memberId) from the Level 4 override payer wallet
  (override.payerHandle). Records tx hashes; resolve paid-with-tx or retry for blocked/failed/review.
  The prize email + feed line say "Launch week contest prize".
- /leaderboard panel from the launch moment until the prizes are paid; /launch copy states both rules.
- chatbot: CANNED founder-badge + launch-contest, FACTS lines (no amounts quoted before launch).
- qa/launchweek.test.cjs (16 checks: Central window bounds, exclusions, minimum, two-copy payout once,
  frozen result, Founder criterion + grant, touchSeen backfill); run.sh launchweek and in all.
- Versions: my.js?v=20261105fd, team.js?v=20261105fd, wall-founder.js?v=20261105fd,
  admin-launchweek.js?v=20261105lw (wall.js unchanged: the shared policy test pins it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 08:14:28 -06:00
martbost cc7c1d36af Login slots spell out the one-position rule (Michael Camire 2026-11-03: a reservation with 1,000 credits split 618 + 382 failed in a 2-second toast he never saw): GET /api/my/campaigns carries loginFunds (each position's free purchased credits); the composer shows "Paid from one position" with the per-position numbers and disables Launch/Reserve when no single position covers the slot; a login-specific 400 says nothing was charged and what to do; login failures open a dialog instead of a toast; chatbot fact; ads-screen.js?v=20261104lf, KNOWLEDGE_DATE 2026-11-04. loginqueue unit 13/13, e2e 36/36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 07:23:46 -06:00
martbost 33a6710909 Admin: POST /api/admin/rotations makes tracked spin links on a member's account (one rotation per link, optional traffic source), for the standalone games page and partner placements (Marty 2026-11-03)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-03 06:26:42 -06:00
martbost 8dbac9379f Snapshot: account counts from the JSON account store when MySQL is off (production LinkSpin), so sign-ups, wallets and payouts-on are real numbers, not zeros
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 08:29:37 -06:00
martbost d22b8adada Daily LinkSpin snapshot card (Marty 2026-11-02): spin links served, Banner Spin views, zone views, page views and leads, then sign-ups, purchases and POL paid, posted once a day to the LinkSpin Support topic (new target 'support', settings telegramSupportChatId/TopicId); window24() helpers on rotator, bannerspin, zones and pages; POST /api/admin/snapshot/send takes {target} for a one-off
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 08:17:38 -06:00
martbost f4351613a3 Signed-in sponsor line shows the chain-bound sponsor for activated members (2026-11-02): Orlando (member 2, carried in with no sponsor field) saw whoever's referral link he last clicked because /api/me fell back to the iap.sponsor cookie; the cookie now only speaks for accounts not on chain yet
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 04:26:48 -06:00
martbost b84eed3be5 Theme switch: auto | light | dark, stored in localStorage ls.theme and on the account, applied before first paint on every page
themehead.js is the one source of the tiny inline head script (and of AUTO_DEFAULT, the one constant Marty decides later: 0 = nothing stored keeps the page's current look, light for Control Room and public pages, dark for the sapphire pages; 1 = follow the device). The script sets data-theme on <html> from ls.theme (auto follows prefers-color-scheme and tracks changes live) and exposes window.LSTheme. tools/stamp-theme-head.cjs writes it into every static page before the first stylesheet with data-theme-base on <html>; blog, leaderboard, what's-new, the badge page, the unsubscribe page and the wall 404 read the module directly. The site CSP allows inline scripts by hash only, so themehead.CSP_HASH joins script-src (the script was silently blocked until then).

Account side: accounts.theme (JSON store and MySQL, alterSafe column), in the public account JSON and /api/me; POST /api/my/profile {theme} rides the existing profile save path and never touches the username. cr-shell.js renders a Light / Dark / Auto segmented control in the topbar of every Control Room screen and paints every .theme-seg on the page (the Profile pane gains an Appearance card with the same control); a click applies at once, saves locally and to the account when signed in; at sign-in the account value wins over the local one, and a local choice is pushed up when the account has none yet. view.html stops reading an undefined --bg so its light variant has a light stage. ?v= tags bumped on every changed stylesheet and script (20261101t / ls20261101t).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 10:44:40 -06:00
martbost 4c0a68cbdd Coach nudges never guess from a failed chain read, and the site owner is never coached (Marty 2026-10-31): a chain.member() failure cached null for 60 s, rungFor() then classed the member as "payouts on, no purchase" and mailed the rung-2 "See a payout land: your first package" nudge to the owner (memberId 1, 4 purchases, 7 buyers). describe() now reports unknown and stalled requires a known state; nudgeTick skips adminEmail.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-31 07:44:19 -05:00