Commit Graph

569 Commits

Author SHA1 Message Date
martbost 4c470d8e3c Packages: Starter $10 (1,000 credits) and Elite $500 (70,000) across tiles, calculators, promo copy, kits, facts, chatbot; tiles sorted by price; cache tags bumped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 12:16:45 -05:00
martbost 084d1ea3d6 Game Pass: tournament/pending answers rows (the field the games' polgrant.js reads), games-side integration test, docs "Games: as built"
- /api/partner/tournament/pending returned only `pending`; every game's polgrant.js tournamentPending() reads `rows`, so
  PolHunter's prize payer would never have seen a row. Answer now carries both (`pending` stays for the admin pane + qa).
- qa/gamepass-games.cjs (bash qa/run.sh gamepass-games): boots a local copy like qa/gamepass.mjs and drives the REAL
  spooky-doors/server/polgrant.js and polhunter/lib/tournament.js against it (fetchPass, daily/progress caps, carry:<day>
  zero-POL call on the next Central day, void, bad secret / IAP down -> retry, retry queue, tournament dry run + live). 44/44.
- qa/gamepass.mjs pins the `rows` field.
- docs/GAME-PASS.md: 3a item 8 updated, "Games: as built" section merged from the games' notes (per game files/refs/perk/tests,
  decisions, the tournament payer and its dry-run claim trap, the integration test).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16 09:27:46 -05:00
martbost 4d6a0f2f83 Game Pass (IAP side): $5 weekly pass across all nine games + account-wide POL cap service
- gamepass.js: durable pass store, waiting orders fulfilled by the next $5 package, cap ledger
  (daily/total per Central day, progress deferral + next-day carry-forward, idempotent refs kept 90 days,
  void), weekly Pass Tournament (Monday 9 AM Central, marks.claim, prizes recorded for the game faucets),
  admin stats. Settings in site config, caps enforced only from capsStartDate (recorded before).
- server.js: /api/partner/player, /api/partner/polgrant(+/void), /api/partner/tournament/pending|paid,
  /api/my/gamepass(+/buy), /api/admin/gamepass/stats|comp|tournament/run; gamePass claim on every
  sign-in hand-off token; purchase-event fulfilment inside the marks.claim block.
- Members > Games: Game Pass card (Buy via IAP.confirmBox, deep link /my#games?pass=1), Overview nudge
  after a free-cap hit. Admin > Game Pass pane. Chatbot canned answer + FACTS, KNOWLEDGE_DATE 10-16.
- qa/gamepass.mjs scripted test (bash qa/run.sh gamepass), Games tab card in qa/walk.mjs.
- docs/GAME-PASS.md: 3a clarifications + Built section; docs/GAME-PASS-RELEASE.md draft (not sent).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16 08:18:09 -05:00
martbost d0cc45eadb AI calls: reasoning off (deepseek-v4-flash began thinking by default and used the whole max_tokens, so chatbot and Copy Engine answers came back empty)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:30:23 -05:00
martbost 0db7c94728 Plan lab: honest licence booking, licence levels kept after the replay, unsponsored joins under the top position, sponsor leg obeys the gap toggle, pool-only members no longer count as paid
- Licence value now books the money each leg actually moved for it (its own share of the level), not the full level price; labelled "licence value funded" with a note on what a licence-granted level costs the system
- gStartRun: after replaying an org, money counters reset but members keep every level they hold, licence-won ones included, and keep what they actually paid in
- Joins with no recruiter go to the top position (spread placement) instead of the earliest member with one recruit, which qualified members who never brought a second
- Sponsor-leg licences respect the gap toggle (skip vs fund), like the depth leg
- "Paid" counts cash or entry share only; pool-only members are reported apart
- The climb and the drawn tree are labelled as simplified depth-only illustrations; headline numbers come from the month-by-month run
- Cache tag bumped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 17:10:12 -05:00
martbost be268beb66 Presentation sponsor card: a capped bio ends on a whole word with an ellipsis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:57:13 -05:00
martbost bb11f8183d Chatbot: Road Agent (live 10-15) and its fuel-stop visits, from today's two release notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:52:50 -05:00
martbost 7aec7d5169 Presentation page + Build Wide 'wide' join angle
- /presentation: the narrated InstantAdPay presentation (video on Spaces
  training/iap-presentation.mp4, poster .jpg), caption pills for
  en/it/fr/es/de/pt (VTTs served from /captions, text/vtt MIME added),
  sponsor card from /api/sponsor ("Shared with you by @name" + Join to
  /join/<ref>?v=wide, or the plain join link). Works framed: join and
  sign-in open a new tab, internal links carry ?ref.
- Site menu + footer: Presentation. Sitemap, Traffic pages and the viral
  page list include it. Promo tools: "Share the presentation" strip copies
  instantadpay.com/presentation?ref=<username>.
- 'wide' join angle (Width unlocks depth.): server JOIN_ANGLES with the
  buildwide poster as og:image, join.js angle (portrait video on phones,
  16:9 otherwise, files promo/buildwide*), link stats row, promo VIDEOS
  first entry with a per-entry file override, front-door list entry.
- Chatbot: presentation canned answer + facts, ?v=wide in the angle lists,
  KNOWLEDGE_DATE 2026-10-15.
- common.js/my.js/promo.js/join.js cache tags bumped; qa/walk.mjs PUBLIC
  gains /presentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:51:04 -05:00
martbost d86f2fbcf8 Reverse registry sync: LinkSpin-first members arrive on InstantAdPay as waiting accounts
POST /api/partner/registry (same HMAC LS_SYNC_SECRET scheme LinkSpin accepts from us, 10-minute window) feeds
lsinbound.js: an email already on InstantAdPay keeps its sponsor and only gets empty fields filled (username if free
and allowed, wallet if no other account or linked position holds it, profile); a new email becomes a waiting shell
(joinedVia linkspin) under its LinkSpin sponsor, building the sponsor's shell upward from known rows (25 levels),
remembering a sponsor whose row has not arrived and binding it later, refusing sponsor loops. No mail, notices or chain.

Unclaimed shells are left out of accounts.listAll by default (tank, coach nudges, Friday/Wednesday broadcasts, member
update audiences, leaderboard, 1,000-member milestone count); the admin members table and lssync ask for them. The first
sign-in claims the shell: the sign-up anti-fraud checks run then, a sponsorless shell takes the link used, lastSeen set.

Loop guard: lssync mutes an email while its LinkSpin row is applied, then records the result as already pushed when it
equals what LinkSpin sent; touch() now skips rows whose hash is unchanged. Status: GET /api/admin/lsinbound (also under
/api/admin/lssync as inbound).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:44:53 -05:00
martbost ae72a06a85 Mail: every non-transactional email carries an unsubscribe link and honours opt-outs
instantadpay.com landed on the Spamhaus DBL. Only the drip and the admin update
tool had an unsubscribe link; the Wednesday/Friday broadcasts, coach nudges and
digests, milestone, refill, reach, wallet nudges and sponsor notices had none,
and several did not check opt-outs. The rule now lives in mailer.send, so new
senders inherit it: skip anyone who unsubscribed, append the signed link (unless
the body already has one) and add RFC 8058 one-click List-Unsubscribe headers.
Exempt (transactional): sign-in codes, mail to ADMIN_EMAIL, purchase receipts
and payout notices. /unsubscribe now accepts the one-click POST too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 06:34:40 -05:00
martbost 4759cabf09 Game art off the adrotate.xyz host: ad blockers filter 'adrotate', so the PolyBreak card showed no image (Games tab, public games page) and promo banner previews went blank; serve from the Spaces CDN instead
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 08:28:31 -05:00
martbost 2df64f6247 Angle pages: each hook angle shares with its own video frame as the preview image; Share sends one message with the link inside the text (Telegram dropped the separate url)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:51:58 -05:00
martbost ba811e48f8 Angle page 'play': /join/<member>?v=play shows the 'If you have time to play' video, three points and a Play the free games button (games page with the member's ref) above the free sign-up; listed in Promo tools angle pages; the video's matched link now opens this page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:43:46 -05:00
martbost 375ddf75bd Promo tools Videos: 'If you have time to play' angle (games as a trust tool), matched link + caption point at the member's games page ({{GAMES}})
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:29:37 -05:00
martbost 7a79b4a930 Chatbot: fix a broken string in the PolyBreak answer (crashed startup; Coolify rolled back)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:32:37 -05:00
martbost c40b7ccb5c Promo tools: PolyBreak card shows once the game is in the live games list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:16:24 -05:00
martbost c43f166418 Chatbot: PolyBreak canned answer + facts, Games roster, KNOWLEDGE_DATE 2026-10-13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:15:46 -05:00
martbost ab83e37d23 PolyBreak on the network rails (hand-off, in-game sign-in, one-more-paddle refuel receipts, Games card, strip line, return routing) + Promo tools PolyBreak card, 600x300 traffic-exchange size for every game and InstantAdPay's own 600x300 banner
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:06:57 -05:00
martbost 06f2665809 PolyWarriors pass mint: visible 'Minting now' hand-back page with a Back to PolyWarriors button and a 2 s auto-return (a silent redirect chain left Zachary's iPad on the mint form)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 13:45:48 -05:00
martbost 8d3fc12862 RPC breaker: bench a provider only for health failures (timeouts, connection errors, rate limits, 5xx); request errors such as invalid block range just move to the next provider
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 11:40:15 -05:00
martbost f417d416da RPC circuit breaker for InstantAdPay: bench a failing provider for 10 min, 4 s timeout on eth_call, log provider failures; log any request over 3 s (members felt slow sign-ins; the sticky index was paying the 15 s timeout on every call when a node hung)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 11:29:31 -05:00
martbost a63f6206a3 Chatbot: fix PolyWarriors regex word boundaries (backspace bytes from the heredoc)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 10:05:33 -05:00
martbost 10617df866 Chatbot: PolyWarriors + SpellWheel canned answers and facts, Games tab roster, /games page, KNOWLEDGE_DATE 2026-10-12
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 10:02:31 -05:00
martbost 0f56d3c7bb PolyWarriors launch trailer: Promo tools game card (player, 16:9 + vertical downloads, poster, caption, share) and the public games card plays it; poster replaces the coming-soon art
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 09:41:35 -05:00
martbost a5acf0c848 Promo tools: PolyWarriors card copy for the live game (24 rivals, fusion, mint passes, Telegram line)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 07:56:29 -05:00
martbost 1287f94669 Bare /join: use the viral-link token when the handler already consumed ?ref= 2026-10-11 18:36:12 -05:00
martbost b796a7a64e Bare /join: honour ?ref= before the sponsor cookie 2026-10-11 18:29:22 -05:00
martbost 041a3d41ae Bare /join redirects to the sponsored join page (cookie sponsor, else company); games page links /join/<ref> directly
Diann: "Join free" on /games?ref=diannt landed on "Not found". /join, /join?ref=
and the Friday/Wednesday /join?v= links all 404ed because only /join/<token>
was routed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 18:26:24 -05:00
martbost 9cf039270e Telegram feed: name a freshly activated member by wallet when the chain id is not mapped yet
The "switched on payouts" line read a bare "#200" although the member had a
username (roodtriaan07): names are looked up by chain id, which the account only
gets after the index links it. Fall back to the activating wallet's account.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 06:48:35 -05:00
martbost a6c523c6aa LinkSpin sync: carry the member profile (avatar, bio, social links) with each row
Marty 2026-10-11: members should not re-type their profile on LinkSpin. Rows now
include profile {avatarUrl (absolute https), bio, socials}; it is part of the row
hash so every profiled member re-syncs once, and a profile edit touches the sync.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 06:40:05 -05:00
martbost 23da5b61ba PolyWarriors mint bar: 4 h cookie (was 7 days), cleared on every exit, x to hide
Members who tapped Mint, saw the price and went back to the game kept the blue
"PolyWarriors mint" bar on the dashboard for a week. The cookie now lives 4 h,
is cleared by Back to PolyWarriors / Cancel (new /pw/mint/leave), by the
mint-pass success redirect, and by an x on the bar (/pw/mint/dismiss). The
waiting order itself is untouched: a later package still completes the mint.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 06:28:53 -05:00
martbost 7b4c2ef9e5 Games page featured strip: tags at the card foot
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 18:20:38 -05:00
martbost 1ffca3030c Games page: featured PolyWarriors listings come through a same-origin proxy (/api/public/pw-featured, 60 s cache); the page CSP blocked the direct call
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 18:13:09 -05:00
martbost ef6c6b584e Games page: a strip of featured warriors from the PolyWarriors market (rarest listings, forged art, links into the market)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 18:07:32 -05:00
martbost 84d54eda16 Games page in Promo tools (All games entry with the member's referral, three posts), in the viral-link page list and the chatbot; a generic games banner (1200x630 + 1080 square) as the /games share image instead of the two-games launch art (Marty 2026-10-10)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 14:18:55 -05:00
martbost fcb9edd2eb Public games page at /games (Marty 2026-10-10: a page to send people): every game, open ones first, dated ones after, with play links to each game's site, OG tags, and a join call that keeps ?ref; data from the new public /api/public/games/all
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 14:06:55 -05:00
martbost f8e55413ee Mint passes survive deploys: durable persisted maps (passes, prizes, game orders) are restored whatever their age, pass records carry ts; the admin member card shows PolyWarriors mint passes
The open-tokens loader kept only entries newer than 2 hours, meant for short-lived earn tokens; pass balances had no ts, so every deploy wiped them (Orlando's were lost on 2026-10-10).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 09:51:06 -05:00
martbost 310992e40f 1,000-member POL drop (Marty 2026-10-10): snapshot of activated members at the milestone, 1 POL each from a dedicated wallet, notices for paid and missed
milestone.js watches the account count (site config milestoneMode off|dry|armed, milestoneTarget 1000, milestonePol 1). At the target it freezes the eligibility list: wallet activated on chain (member record with activated flag), not on the no-payout list, not suspended, one payment per wallet. Payments go one at a time from IAP_MILESTONE_KEY with tx hashes per row and never twice; the Telegram start post waits for the wallet to hold the full amount. Paid members get an in-app notice + email with their Polygonscan link; everyone else gets the missed-it nudge (link a wallet / switch on payouts), email only with the newsletter opt-in. One start and one finish Telegram post (Discord mirrored), the total logged in the P&L as a rewards cost against Receiver A. Admin: /api/admin/milestone (view, mode, snapshot, recheck, pay, settle, notify-missed, reset-before-payment).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 09:35:50 -05:00
martbost 4b7b1c5d95 Two-games launch short (35 s vertical, SpellWheel + ClutterHunt gameplay, Marty's voice) hosted for social posts
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 07:09:09 -05:00
martbost 69b7395387 Two-games launch banner (SpellWheel + ClutterHunt, 2026-10-10) in 1200x630 and 1080x1080 for social posts
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 06:39:58 -05:00
martbost d8a31ddd40 Games tab: a coming-soon card stops carrying its soon object once the opening day arrives (SpellWheel's button read '[object Object]' on 2026-10-10); SpellWheel card art switches to the game's live OG image
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 06:16:15 -05:00
martbost f7c4d34a35 PolyWarriors mint pass: the button shows Minting... and the redirect no longer waits on the game callback (Marty's phone sat on the form on 2026-10-09 while the mint had already gone through)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 18:30:26 -05:00
Marty Bostick 1c9db665b3 Discord relay: wrap button links in <> so Discord shows no preview cards under every post
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 15:16:36 +00:00
martbost 7d20cd2c35 Login ad: frame the sponsor's page inside the gate under the timer bar (open-in-tab link, dashboard button), new-tab fallback only when the site refuses framing (Brian Holland: no timer, no way out on the ad tab)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 09:17:48 -05:00
Marty Bostick efb6020e40 Mirror Telegram group posts into the Crypto Team Build Discord
Discord relaunch 2026-10-09: the shared discord-relay.cjs fans every post that goes to the
community group out to the matching Discord channel (achievements topic -> #achievements,
payments topic -> #payment-proofs) through DISCORD_WEBHOOK_* webhooks. Telegram HTML is
converted to Discord markdown, buttons become links, cards post as images. DMs and alert
chats are not mirrored. Fire-and-forget; off when the env is unset.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 13:57:29 +00:00
martbost f53bd67d30 Dwell timers no longer stall on phones: a focused ad frame or a touch device counts as an active tab (Brian Holland 2026-10-09: no timer, no close on the welcome tour and verified ads on mobile)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 08:44:27 -05:00
martbost 75339757e5 Promo kit: October Five Dollar Friday banners (bright porch, 1200x630 + 1080x1080) at the top of the Friday band
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 04:48:36 -05:00
martbost d4b0e74829 Archived card shows what each campaign actually returned (Yoshi: 'credits released' read as a refund on 7 fully delivered campaigns)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 13:40:31 -05:00
martbost af5a53b833 Daily snapshot gains a Games block: members handed into each game (counted at hand-off, per hour) and payouts read from each game wallet on Polygon in the last 24 h, launches of the day called out
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 09:13:44 -05:00
martbost d07a32a837 Game return bars say what happens: buy a package and you go straight back to the game when it settles
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 08:31:49 -05:00