Commit Graph

7 Commits

Author SHA1 Message Date
martbost 4cf3512106 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:11 -06:00
martbost cedb291aaa My line: your directs' email (with copy), where they came from (referrer + ?src= tag) and how they joined, up front in 'Your line', the Activity drop-down and the three-level card; levels 2-3 never get emails (Marty 2026-11-12: 'it was kind of buried in there'). Search also matches email + source. qa/line-origin.mjs (11 checks). Chatbot fact. my.js/site.css ?v=20261112ln
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 12:59:09 -06:00
martbost 55d3597f12 My line: search box on every member list (Your line, three-level downline, Holding tank) to find a member by name, username (with or without @), email or member number (Marty 2026-11-12). Narrows as you type, keeps focus across re-renders, restarts paging at page 1, works with sort + filter chips. Chatbot fact added. my.js/site.css ?v=20261112q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 11:24:53 -06:00
martbost 03284aa281 Conversion linkage, InstantAdPay side (Marty 2026-11-07, "Yes ship these"): a LinkSpin click stays with the account, and its sign-up, wallet link and each package purchase are reported to LinkSpin. Reporting only: no sponsor, payout, credit or chain path changes; accounts.js only gains a notification after a wallet is linked.
lsreport.js. A click id (lsclk or lsid) arriving on any page is kept in a first-party cookie iap.lsclk, 30 days, last click wins, like the sponsor cookie. The join page also sends its own copy with the code request and verify (the cookie is refused in traffic-exchange frames and never crosses browsers, the 2026-09-29 lesson) and it is remembered per email. It is stored in its own table ls_account_clicks when the account is created or a waiting LinkSpin shell is claimed, on /api/signup, email sign-in and in-game sign-in (a game may pass lsclk; none does yet).

Reports queue in ls_events, whose primary key is the idempotency key (join:<hash>, wallet:<hash>, purchase:<tx>:<log index>), so two app copies in a deploy cannot double a row, and LinkSpin dedupes on the same key. A background loop sends them signed, retrying up to every 5 minutes; a sign-up or a purchase never waits on LinkSpin. The purchase hook runs after the existing ev: claim and its value is the USD price on the chain event. A first purchase finds its buyer through the contract's wallet for that member id, since member_id may not be stored yet. Linked positions count as the account's purchases. Past 30 days from the sign-up nothing is queued (LinkSpin's window is from the click).

Campaigns > Conversion tracking lists everything the member's clicks led to, and joins, wallets and purchases on each campaign row. Guide, privacy page and chatbot (CANNED + FACTS) updated; common.js, join.js and my.js tags bumped.

QA: bash qa/run.sh netconv (54 checks: local InstantAdPay + local LinkSpin + a mock Polygon RPC, a real Purchase log through the real event fan-out, LinkSpin down, two copies racing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 07:48:36 -06:00
martbost 1aec9caf6c Theme switch: auto | light | dark, stored in localStorage iap.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, dark everywhere on InstantAdPay; 1 = follow the device). It mirrors LinkSpin's themehead.js with only the storage key (iap.theme), the global (window.IAPTheme) and the event name (iap-theme) changed. The script sets data-theme on <html> from iap.theme (auto follows prefers-color-scheme and tracks changes live). tools/stamp-theme-head.cjs writes it into all 28 static site.css pages before the first stylesheet with data-theme-base="dark" on <html>; the blog, the 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 (without it the script is silently blocked).

Account side: accounts.theme (JSON store and MySQL, alterSafe theme VARCHAR(8)), in the public account JSON and /api/me; POST /api/my/profile {theme} rides the existing profile save path, never touches the username, and does not tap changed() (appearance is not mirrored to LinkSpin, same as LinkSpin's side). common.js owns the client side for every page: paints every .theme-seg, saves a click to the account, and IAP.themeSync lets the account value win over the local one at sign-in (a local choice is pushed up when the account has none yet); my.js calls it from render(). The Light / Dark / Auto segmented control sits in the member-area header (#boTheme) and in a Profile pane "Appearance" card, and in the admin header for the same session. shorts.html pins the dark ink set on its black video stage; view.html stops reading an undefined --bg. ?v= tags bumped on every changed stylesheet and script (20261101th): site.css on all 28 pages, common.js on 25, welcome.js on 17, support.js, my.js, engine-room.js, admin.js, admin-kits.js, blog-page.js.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 11:55:06 -06:00
martbost c621fecb54 BixPay sign-up warning (Marty 2026-10-29: bizventures registered through our correct partner link but BIX recorded referrer N/A): the invite token lives only in BIX's URL and their security check often fails inside app webviews, so members who reopen BIX elsewhere lose their sponsor. Guide, Wallet card and Overview card now say: sign up on the page the button opens, no app first, no portal Sign Up menu; in-app browsers (Gmail/Telegram/Facebook webviews, iOS web views) get a notice with the link to copy into Chrome or Safari (no native dialogs); chatbot card answer carries the same; my.js + bixpay-guide.js ?v=20261029bz
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 11:46:46 -05:00
martbost ed6febe0b8 BixPay card integration, phase 1 (Marty approved the copy 2026-10-29; docs/BIXPAY-INTEGRATION.md): gated by site config bixpayLive (off by default). Profile > BixPay card field (partner link validated: bix.ibportal.io/auth/register, e= token, a=1; the appId=3 card-customer link is refused with a message), bixpay.js resolver own > sponsor chain (10 levels) > company link (bixCompanyLink, seeded with Marty's partner link), every surface says whose link it is. Wallet tab card, one-week Overview announcement (24 h snooze), one sentence in TierPaid payout emails and the games' wallet nudges, Promo tools > BixPay tab (3 posts, email swipe, 4 text-only banners on the Spaces CDN, tracked link + per-member clicks), public guide /bixpay with masked app screenshots, chatbot canned answers + facts gated to 'coming soon' while off (KNOWLEDGE_DATE 2026-10-29). Clicks per surface via /go/bixpay in the admin Traffic tab; admin Overview counts members with a link; member card shows it; signed /api/partner/bixpay and the lssync profile row carry it for LinkSpin/CTB. accounts.bix_partner_link column (db.js alterSafe). Tests: qa/bixpay.test.cjs (17) + walk.mjs BixPay block; my.js/promo.js/admin.js ?v=20261029bx.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 07:56:49 -05:00