Commit Graph

139 Commits

Author SHA1 Message Date
martbost 93317d6ba0 Refuel guide: why-cards 2 x 2 on desktop
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:20:51 -05:00
martbost 9ce57ae1ff Refuel guide: the walkthrough video (Marty approved 2026-10-24) replaces the banner, plus a 'Why keep refueling' section (steady traffic, useful numbers, fresh creative, the climbing bonus); training card gets the video
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:17:20 -05:00
martbost e5fb985c6b Fuel Your Offers member guide at /refuel (Marty, 2026-10-24): LinkSpin-first wording (Credits, Ads, Banner Spin), same rules as InstantAdPay's refuel.js, flow drawn in HTML/CSS (works at 390 px), pub.css look, hero og:image banners/fuel-your-offers-1200x675.jpg, refuel-guide.js opens join/member/off-site links in a new tab (with ?ref) when framed. Route + TRAFFIC_PAGES + sitemap; Training entry (catalog/training.json "refuel-guide"); "How the Refuel streak works" link on the Monthly Refuel panel and in the Engine Room.
Fixes: Engine Room streak line no longer asks for the other site once both are refueled (engine.js + engine-room.js copied from InstantAdPay, byte-identical). Ads-screen Monthly Refuel rows had no spacing ("InstantAdPay+30%"): own flex row style. Load into my Banner Spin: size checkboxes, pre-ticked to what fits the tier (728x90 + 300x250 on an empty Starter), and kitspin.js returns one plain message: what loaded, what did not and why (tier holds N Banner Spins), and what to do; /api/my/kits adds spinRoom. Test added (refuel-kit 6/6).
Chatbot CANNED + refuelFact point to /refuel. fuel.js + engine-room.js ?v=20261024rg.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:07:32 -05:00
martbost fee138bbc1 Chatbot: month-4 Twin Engine Featured bonus is 100 credits on InstantAdPay (Marty 2026-10-24)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 06:39:01 -05:00
martbost fc92b09796 Chatbot: Level 4 override is live (CANNED level4-override + FACTS line; start Mon 2026-10-26 00:00 CT, first payout Mon 2026-11-02 9 AM CT). overrideMode=live + overrideGoLive=1792990800000 set on the site, payer wallet funded (Marty, 2026-10-24).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 06:14:59 -05:00
martbost 018101f011 Engine Room panel on the LinkSpin Ads screen (Fuel Your Offers stage 4, Marty approved 2026-10-24): engine.js + engine-room.js are the same files as InstantAdPay's. LinkSpin's facts (credits, campaigns, clicks this week and last via coach.clicksSince, free login slots, conversion-pixel goals this month from the Central 1st via convtrack.countSince, conversions in 30 days, and the Banner Spin / spin link / page / testing part states from bannerspin, rotator and pages) are combined with InstantAdPay's facts and the streak from signed /api/partner/engine on InstantAdPay (cached a minute; when it does not answer the panel says so). LinkSpin answers /api/partner/engine for InstantAdPay's tab. /api/my/engine, /api/my/engine/goal (forwarded to InstantAdPay, where the goal lives with the streak). Hidden while refuelStreak is off; greyed "Refuel to start your engine" until the first counted refuel. Chatbot CANNED + FACTS cover it. qa/refuel-engine.test.cjs checks the shared files have not drifted from InstantAdPay's and runs its engine test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 05:55:12 -05:00
martbost 4749d711f4 Refuel Kit on LinkSpin (Fuel Your Offers stage 3, Marty approved 2026-10-24): kit.js (same file as InstantAdPay) with LinkSpin's own art, entitlement from InstantAdPay's streak record through refuel.status (view.kits: month -> streak month at unlock). Ads screen Refuel Kit panel (fuel.js?v=20261024kit): Make mine, Download, Copy image link, animated at a 3-month streak, and "Load into my Banner Spin" (kitspin.js): each Banner Spin size in the kit goes into one of the member's Banner Spins of that size with room, or a new one while the tier allows (the reason is shown when it does not); the personalized file is copied into uploads like a normal Banner Spin upload, labelled "Refuel Kit <month>", target = the member's own link; loading twice adds nothing twice; files over 150 KB are refused plainly. /kitimg/<hmac> public serving, admin Settings > Refuel Kit (upload, placeholder art, preview, release), raster copies of the LinkSpin placeholder banners (public/banners/linkspin-<size>.png, from the existing SVGs) for the placeholder kit. Behind the refuelStreak switch. Chatbot CANNED + FACTS mention the kit. qa/refuel-kit.test.cjs 5 checks against the real bannerspin.js. Note: qa kb retrieval has 2 pre-existing misses (spin links vs Banner Spin, PropellerAds postback), same before this change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 05:44:40 -05:00
martbost 7bcde25116 Monthly Refuel streak, LinkSpin side (Fuel Your Offers stage 2, Marty approved 2026-10-24). The streak lives on InstantAdPay (one per member across both sites); refuel.js here reports each $25+ LinkSpin package (refuelMinLsCents) once per tx (claim rfev:<tx>, then a pending file in DATA_DIR/refuel-pending retried every minute until InstantAdPay answers), applies LinkSpin's grants and reminders from InstantAdPay's outbox (claim rfg:<ref> before applying, so two app copies or a lost ack never double-grant; grants are purchased-grade addEarned + a credit-log line + a notice), and relays the member's status for the Monthly Refuel panel on Credits and Ads (fuel.js) and the refill notice streak line. Linked positions count for their owner. Chatbot CANNED + FACTS follow the switch, KNOWLEDGE_DATE 2026-10-24. Admin /api/admin/refuel (+ /tick), member /api/my/refuel. MASTER SWITCH refuelStreak default '0': nothing reported, pulled or shown. qa/refuel.test.cjs 10 checks against InstantAdPay's real refuel.js in-process (both switches, cross-site both-engine top-up in both orders, two LinkSpin copies, InstantAdPay down, lost ack, reminders, status).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 05:29:00 -05:00
martbost ab4f1693df Refill notices on LinkSpin (Fuel Your Offers stage 1, Marty approved 2026-10-24): refill.js copied from InstantAdPay. Low (80% of budget delivered, refillLowPct), out, and idle (7 days after an unanswered out notice, 100+ credits free, nothing running): one email + one on-site notice per owner per pass, naming each ad and what it delivered, then the relaunch line (100+ credits free) or the /credits link, then the packages from the chain catalog and a streak-line hook for stage 2. Email skips drip unsubscribes and carries the unsubscribe link; the notice (kind notice) always goes. Every send is watched 45 days for purchase / relaunch / resumed / topup. marks.js: one-time claims shared by both app copies during a deploy (event_marks with a DB, exclusive file create on the shared volume without one); every send is claimed first. Settings refillNotices '1' (default on) + refillLowPct 80; admin GET /api/admin/refill, POST /run and /reset, an Overview card (admin-refill.js). qa/refill.test.cjs (12 checks incl. two app copies on one volume) + run.sh fuel mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 05:11:12 -05:00
martbost 7b3844b757 QA: convpixel test (unit, local e2e, browser + framed) and Conversions in the member walk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:10:48 -05:00
martbost b0f13e2a66 Chatbot + FAQ: conversion pixel canned answer and FACTS line (KNOWLEDGE_DATE 2026-10-23)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:10:48 -05:00
martbost 07379803d7 Control Room Conversions screen: goals, the two snippets, Send a test conversion, autoresponder advice, match-method breakdown, per-goal conversions and cost per goal by ad campaign (LinkSpin + InstantAdPay), spin link, page and source, CSV; rail entry, shell tag bumped; privacy page covers click ids, the landing tag and the pixel
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:10:47 -05:00
martbost dd2244272b Conversion pixel engine (Marty approved 2026-10-23): goals with public pixel ids, click ids on every ad click (lsclk, 'a'+11 hex), spin links pass the ad click on, landing tag /t.js + goal pixel /cv.gif /cv.js matching url > stored > cookie > 24 h soft key, once per click, 30-day window, owner check, rate limits, goal postbacks (event 'goal'), member + signed partner APIs for InstantAdPay
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:10:46 -05:00
martbost ff8b8abc77 Chatbot: TODO for the Level 4 override copy at go-live (drafts in D:/tmp/override-copy)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:20:42 -05:00
martbost 010c3afdd9 Level 4 override for LinkSpin: weekly dry-run report + the payer, shipped OFF (Marty approved 2026-10-23)
override.js is the InstantAdPay module (same code, same tests) with LinkSpin defaults: qualification is the
LinkSpin contract's own buyerCount >= 5 (referred first buys of $20+, which on the $10/$25/... ladder means
$25+, the level-3 bar), house id #1, hunt up to 25 hops, one recipient per purchase, purchases from
overrideGoLive on, weekly Mon-Sun Central, settled Monday after 9 AM CT.

- Default overrideMode 'dryrun': Monday who-would-be-paid summary to the admin Telegram chat
  (telegramAdminChatId; email to ADMIN_EMAIL if the bot is not set). No money moves.
- Payer pays only with overrideMode 'live' + overrideGoLive + OVERRIDE_PAYER_KEY. LinkSpin has no MySQL,
  so every once-only step is an exclusive file create on the shared volume (fails closed); plan frozen
  per week, 'sending' persisted before the tx, lost answers -> review (never re-sent), dust carried,
  weekly cap held whole, balance + gas checked first.
- Members: AwardPaid from the payer emails + on-site notice "Your Level 4 override is paid"; Wallet
  screen and feeds label it "Level 4 override". /api/my/activity now reads the whole history (was the
  last 600 events, the IAP bug of 2026-09-16; LinkSpin is at 525).
- Admin: /api/admin/override (+ status, payer), POST /pay (live only), POST /resolve; P&L card.
- Contract page: Level 4 override panel hidden until overrideMode is live (contract.js reveals it).
- qa/override.test.cjs (bash qa/run.sh override): 30 checks, fake chain/signer, throwaway data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:20:02 -05:00
martbost 1c2ef3780c Prepaid login-ad slot queue (Marty, 2026-10-23: "they need to pay for the slot now to get a place in line")
When all member login slots are taken the Ads screen offers "Reserve the next slot" instead of a dead button.
Same price and checks as a slot (purchased credits only), paid at reserve time; the campaign is 'queued' with
queuedAt, never serves and has no 30-day clock. First paid, first served: the member sees their place and an
estimated start (Central time, labelled an estimate) built from the live slots' end dates and the line ahead.
A freed slot (ended, paused, or found by the new 1-minute tick) goes to the oldest reservation: starts now,
expires now + 30 days, never more than loginSlotsMax live. Idempotent across the deploy overlap: JSON mode takes
a lock file and records every promotion/cancel in DATA_DIR/login-queue.json, re-read before any change; MySQL
mode uses guarded UPDATEs (status + live count in one statement). Owner gets an on-site notice and an email
(unsubscribes respected). A paused slot resumes only when live + queued < max. Cancel before start = full
refund (credited back as purchased credits; any unburned accrual released). Edits while queued are free and keep
the free correction. Admin: Login-ad queue card with cancel + refund, plus the Member content action.
New credit activity log (credit-log.json / credit_log table): reserved (queue #N), bought, started, refunds,
shown on the Ads screen. Audit skips queued/cancelled login rows. Chatbot CANNED + FACTS updated (6 slots, paid
queue, full refund before start). Tags bumped: ads-screen.js, admin.js, my.js 20261023q.
Tests: qa/loginqueue.test.cjs (two app copies promoting at once) + qa/loginqueue.e2e.mjs; bash qa/run.sh loginqueue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 07:11:37 -05:00
martbost 7c96e59db7 Expired sessions open the sign-in instead of dead-ending: any 401 from the API (or returning to a tab past its session) opens the in-shell sign-in once and reloads the screen; cr-shell tag bumped. Chatbot: login-ad slots now 6 (raised from 3, Marty 2026-10-23)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 06:34:25 -05:00
martbost f6621a8e34 Page leads count as conversions again; pixel keeps the event name; cookieless pixel hits stop inflating audiences (Marty approved, 2026-10-22)
B2: the built-in page form posted an empty lsid (pt.js only filled .lsform, the pasted-form class), so page leads never
reached the rotator 'lead' conversion or the postback. The server now fills the hidden lsid at render from ?lsid or the
ls.click cookie, the lead POST falls back to the ls.click cookie when the form sends none, and pt.js fills both .ls-form
and .lsform as a fallback (cache tag pt.js?v=2). Pasted provider forms get no added field: some providers reject unknown
fields, so the lsid only rides along when the member's own form code has an lsid field.

B4: /p.gif now stores the pixel's e= event name (lowercase [a-z0-9_-]{1,32}) in a parallel ev map in audiences.json;
hits stay plain timestamps, so old rows count, match and prune as before. The audiences list shows counts by event
(events for cookie visitors, eventsSoft for 24 h soft keys).

B3: a pixel hit with no ls.vid cookie still offers the cookie but is counted under the 24 h IP + user agent key only,
not a fresh 30-day visitor id, so a cookie-blocking browser counts once.

Test: qa/lsid-pixel.test.mjs (bash qa/run.sh lsid), unit + local end to end on a throwaway data dir.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:09:40 -05:00
martbost a5c2c38106 Sponsor follow + one network holding tank + Sponsor check (Marty, 2026-10-22, approved 1-3)
Same design as InstantAdPay (shared sponsorfollow.js). Deliberate sponsor changes (tank adoption, rescue, release,
adoption window ending, admin edit) are recorded and travel on the iapsync rows; InstantAdPay's deliberate changes are
applied here only when the member is not bound or binding on the LinkSpin contract (memberId, wallet on chain, or an
engine activation in flight), newer than our own, and both sides agreed before (or no sponsor here). Bound / diverged /
race cases change nothing and are logged. Ordinary rows keep the fill-empty rule, except a sponsor emptied on purpose
here is not refilled by an ordinary row.

Carry: an InstantAdPay batch holds its members (carry.hold) so no auto-activation starts mid-batch; ensureOnChain waits,
then re-reads the account so the contract binds the settled sponsor; wallets from a batch are linked after every sponsor
decision; the wallet hook skips activation while a follow is pending and activates once it is settled.
Registry keeps the follow record (loop guard) and a deliberate clear. Network tank, Admin > Members > Sponsor check and
the partner endpoints as on InstantAdPay. Rows without the new facts hash as before (no resend on deploy).

Tests: qa/sponsorfollow.test.cjs 27/27, qa/carry-hold.test.cjs ok, two-server e2e (in the InstantAdPay repo) 20/20,
QA member walk 0 bugs. No sponsor was changed on production.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 09:05:20 -05:00
martbost eedbd7280f Wallet: dollar value at today's POL price (Marty, 2026-10-22, same as InstantAdPay; US dollars): /api/public/polusd serves the contract's package rate (Chainlink POL/USD) cached 5 min; 'Paid to this wallet' shows '≈ $x.xx today', each payout line its dollar value, and the footer gives the rate, its age and that it is today's value, not the payout-day value
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 08:25:05 -05:00
martbost e2f79c79a5 Email typo check on new addresses: "Did you mean you@gmail.com?" for gmai.com / gmial.com / hotmial.com / outlook.comz / gmail.con etc., and refuse domains that cannot receive mail (no MX/A). Applies only to addresses with no account yet (existing members always sign in), on sign-in/sign-up, password signup and the support form; skipped when the server has no mail key (local QA). DNS errors fail open. Same emailcheck.js in IAP and LinkSpin. Prompted by SendGrid bounces to gmai.com and outlook.comz (2026-10-22).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 06:09:40 -05:00
martbost 05109bd392 Spin view: destination rows go compact when the TABLE is narrow (container query), not only the window. On mid-width desktops the detail pane left the destination column near 0 px, wrapping the URL one letter per line and overlapping the Destination and Weight headers (Michael, 10-21)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 04:19:43 -05:00
martbost a0daf7925a Tool tiers for spin links and pages (Marty): Free 3, Starter (any own package) 10, Builder (2 qualifying buyers) 50, Leader (5) unlimited with a 500 fair-use ceiling; existing items above a cap are kept, only new ones wait; Links/Pages headers show N of M (tier); chatbot facts + KNOWLEDGE_DATE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 06:58:16 -05:00
martbost 33f3b9d337 Wallet: EIP-6963 discovery; with more than one wallet installed the account picker and disconnect no longer assume window.ethereum (Phantom held it in Michael's Chrome, so every pick went to Phantom and was rejected): the named wallet list opens instead; cache tag bumped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 06:25:23 -05:00
martbost 08bfa2afd7 Team + Ads colour (Orlando's ask): Team rows carry the Pipeline stage colours (stripe + stage pill), amber quiet-3+-days flag and filter chip; ad status traffic light (live, running low at 80% spent, out, paused) on the pill, row stripe and budget bar; QA walk rebuilt for the Control Room sign-in and rail screens; cache tags bumped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 07:22:44 -05:00
martbost 24814c9a41 Chatbot: replies never carry an em dash (scrubbed to a comma)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:57:38 -05:00
martbost a736d68c30 Merge LinkSpin knowledge-base chatbot (Banner Spin answer moved into a KB entry)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:52:02 -05:00
martbost 32c85c4fae Merge Banner Spin phases 3-4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:50:02 -05:00
martbost f404749fb0 Banner health: a size mismatch is a warning, not an auto-pause (the builder allows it)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:50:00 -05:00
martbost d9342d8141 Banner Spin phase 4: chatbot, training lesson, promo tools, release note draft, QA
- chatbot.js: canned Banner Spin answer (ahead of the ad-edit and spin-link answers) + FACTS (what it is, tiers, embeds, matching, Gmail and paid-network limits, reports, health); KNOWLEDGE_DATE 2026-10-20.
- Training: catalog/training.json ships a written Banner Spin lesson, appended to /api/training unless the volume list has the same id; lesson text keeps its paragraphs (pre-line).
- Promo tools: "What is Banner Spin?" in the objection bank + an X post.
- docs/release-drafts/2026-10-20-banner-spin.json: release note in the releases store shape, NOT published.
- qa/bannerspin.mjs: health auto-pause/resume with a corrupted upload, a dead target and the last-live rule; winner; bots/servers apart; caches flag; source postback; Reports API + screen; admin switch button; chatbot; training; promo; draft. 75/75.
- Cache tags bumped: banner-spin.js, reports.js, admin.js, my.js, promo.js (20261020bs3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:39:52 -05:00
martbost f93bca81a7 Banner Spin phase 3: reports, health checks, postbacks verified, admin switch button
- bannerspin.js: every image load also counted raw per placement (bots/prefetch and servers/mail image proxies kept apart from views); one aggregation for the Stats tab and a new summary() for Reports: per banner (views, uniques, clicks, CTR, match rate, conversions), per placement with a "caches banners" flag, by Central day, country and device, bots shown separately; WINNER badge once two live banners have 1,000 views each and one leads on CTR. Click params now keep the banner macro (same list as spin links). Owner pause/resume clears an auto-pause; a new image or target resets health.
- health.js: the 30-minute pass also checks each live banner: image must load as an image (magic bytes) at the Banner Spin size, target must pass the spin-link checks (a spin-link target only has to exist). 3 failures pause, 2 clean passes resume, the last live banner is never auto-paused; owner gets an inbox notice. checkBannerSpins() for admin.
- server.js (own blocks): health.init gets bannerspin; /api/my/reports adds bannerSpins; POST /api/admin/bannerspins/health runs the checks now.
- Builder: health line + AUTO-PAUSED tag on every banner row; Stats tab adds uniques, WINNER, CACHED placements, loads, country/device, bots line.
- Reports screen: Banner Spin section + Banner views/clicks tiles beside spin links.
- Admin > Member content: real Banner Spin on/off button (with confirm) and "Run banner checks".
- Traffic-source postbacks on Banner Spin clicks verified end to end (network click id, event, payout, lsid reach the source postback).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:39:50 -05:00
martbost 541457bc24 Chat knowledge base: the assistant answers from maintained entries (port of InstantAdPay's kb.js)
- kb.js: entries { id, title, questions, answer, tags, pattern, handoff, order, source, updated } in DATA_DIR/kb.json (temp file + rename). BM25 over title, question variants and tags (answer at a low weight) with word bigrams; the top hits go into the system prompt as KNOWLEDGE BASE, and when nothing fits the prompt says to answer "I'm not sure, ask support" (Help at SITE_URL/help).
- One source: chatbot.js CANNED seeds the KB (ids c-*, regex = instant-answer pattern, same first-match order); kb-seed.js seeds the network notes from the home page, the wallets guide FAQ, the earning guide and the Coinbase support reply in LinkSpin wording (f-*). The fast path serves the KB entry; the in-code CANNED only answers if the KB store fails. Unedited seeds follow code changes, edited ones are left alone, deleted seeds stay deleted.
- Admin > Knowledge base: list, search, filter by source, add, edit, delete, Try a question. Em dashes in admin input become commas.
- chatbot.js: reasoning off for deepseek (as on IAP), keepalive-padded OpenRouter replies parsed, OPENROUTER_URL override for tests, KNOWLEDGE_DATE 2026-10-20. New public GET /api/chat/kb-stamp.
- QA: qa/kb-retrieval.cjs (12 sample questions rank the right entry first), qa/kb-chat.mjs (local copy + mock OpenRouter), bash qa/run.sh kb; walk lists admin#kb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:38:46 -05:00
martbost 693a539503 Speed (same fixes as InstantAdPay): catalog reads in parallel + stale-while-revalidate /api/catalog, positions read side by side, member reads cached 15 s (cleared on every new chain event)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:21:48 -05:00
martbost a9994e708d Qualified Start help: every Add-a-position step logged (browser stages + server answers, DATA_DIR/position-attempts.json, admin GET /api/admin/position-attempts?email=), a 20 s 'waiting on your wallet' tip when MetaMask stays silent, and Buy from always shown once a main wallet is linked
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 04:23:05 -05:00
martbost 2aef2c4b83 Merge ad editing (one free correction per ad, then campaignEditFee credits)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 19:25:15 -05:00
martbost d05d5527c5 Ad image check: a host that is slow or blocks the checker gives a warning, not a refusal (only a too-big file or a missing upload refuses)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 19:24:59 -05:00
martbost 7be213311f Ad editing: fix the link, image, text or name of a running ad; first edit free, then campaignEditFee credits
Orlando (#30) could only pause, resume or top up a banner or login ad with a wrong link.
- POST /api/my/campaigns/<id>/edit (owner) and /api/admin/campaigns/<id>/edit (any ad, free,
  never uses the member's free edit). Banner: link, image, name. Text: link, headline, line, name.
  Login and the rest: link, name. Type, size, budget, geo, schedule, audience are refused.
- Create and edit share one path: checkName/checkTarget/checkBannerImage/checkTextCopy in ads.js
  (validate() now calls them) and adChecks() in server.js (frame check + a new banner image check:
  loads, is a real PNG/JPG/GIF/WebP, up to 3 MB; own uploads read off the volume).
- Fee: campaigns.edits counts member edits; the first is free, each later one costs the site
  setting campaignEditFee (default 100, admin Settings). Charged from the engine pool via
  spendEarned (earned first, then credited purchased); with neither, a burn row on the
  best-funded position (the normal burn queue). Guarded claim so two saves cannot both be free;
  a failed save refunds exactly what was taken.
- History: campaigns.edit_log (ts, by, fields, old/new values, fee), last 50.
- NAS: clicks already route through /api/ads/click/<id>, so a new link needs no write; a new
  image or text goes to the NAS row via nas.updateCreative. Failures never block the edit and
  retry on the next reconcile pass. Open ad-viewer tokens get the new link.
- UI: Edit button on the Ads screen (CR.dialog editor, real-size preview, upload, free/fee note
  and confirm), /ads#edit=<id> deep link from the /tools list, admin Member content shows edit
  count + history with an Edit action. Chatbot canned answer + FACTS.
- qa/adedit.mjs: 51 checks against a throwaway DATA_DIR, Playwright screenshots in D:/tmp/ad-edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 19:24:05 -05:00
martbost 77c2037dee Pages: centre every CTA button (the body button sat left under the copy); split hero keeps its button with the text on desktop and centres it on phones
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 17:19:35 -05:00
martbost c4d6cdfb3d Pipeline colours: stage rules now outrank the grey default
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 16:44:03 -05:00
martbost 4dae478902 Pipeline board colour: one colour per stage (tinted column, top bar, coloured title, count pill, card stripe), white cards with dark names, amber stalled cards and chips; cache tags bumped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 16:42:19 -05:00
martbost c963226703 LinkSpin copy: every $20 qualifying-package reference is now $25 (LinkSpin sells $10, $25, $50, $100, $250, $500; there is no $20 package), first package From $10, the $10 test, partner kit split on a $25 package, team-building math; POL suggestion looks up the $25 product (the $20 lookup never matched); cache tags bumped. The $100 split examples ($20 level 2 / platform) are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 16:23:03 -05:00
martbost c2e5a0f6f1 Merge Banner Spin phases 1 and 2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:59:45 -05:00
martbost 29c24461dc Chain index keeps the full event history (KEEP_EVENTS 600 -> 250000): own-buy checks for the holding tank and Banner Spin tiers, earnings and the ledger read it as all events
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:59:45 -05:00
martbost 1d1740c7f9 Banner Spin builder (phase 2) on the Links screen: Spin links / Banner Spins switch, New Banner Spin (size, fallback), uploads with real-size preview and size / 150 KB checks, targets (page or own spin link), weights, mode, hours, pause, fallback image, source, four copy-ready embeds, Gmail + paid-network notes, tier limits shown, simple stats by banner and placement; qa/bannerspin.mjs end-to-end test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:58:45 -05:00
martbost 406113bc03 Banner Spin engine (phase 1): /i/ image with no-store + fresh ETag, /c/ click matching (visitor key + placement host note, 15 min) with fallback, /s/ exact-match script embed, impression counters flushed every 5 s (read-add-write), banner clicks with lsid conversions + source postbacks, tiers ($25 own package; Starter 2x5, Builder 5x15, Leader 10x25), member + admin API, admin kill switch per Banner Spin / per banner / global, Banner Spins in admin Member content
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:58:44 -05:00
martbost e0e0bde1f9 Mail: the first non-code email to each address opens with a short 'what LinkSpin is' intro (once per address, mail-intro.json)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 08:43:53 -05:00
martbost 7b63e75986 Badges: member name moves to the clear band under the art's text (it overlapped ACHIEVEMENT UNLOCKED); long names shrink to fit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 07:33:30 -05:00
martbost afede88c4a Admin Member content pane: every page, link, source, zone, ad, postback, upload, profile, broadcast, audience and video members made, in one list
- GET /api/admin/content?type=&q=&from=&to=&flagged=1&page=&per=&fresh=1 (admin only, read-only): content.js normalizes
  rows from each module's own adminAll() (new one-pass accessors in pages, rotator, sources, zones, postbacks,
  audiences, messages.adminBroadcasts, videomaker.adminJobs) plus ads.adminList and accounts.listAll; owner shown as
  @username, email and member #; created in Central time; totals per type; busiest hosts in the current view
- Flags: open member reports on an ad, dead or parked destinations, burned link domains, failing postbacks,
  admin-paused zones, home-page demo links. No deny list exists yet
- Row actions only reuse existing moderation routes (campaign pause/resume, zone pause/resume); "Open member" jumps
  to the member card; page Preview works for drafts and is never counted (admin allowed on ?preview=1)
- Uploads: /uploads files now recorded with their uploader in uploads-index.json; older files get the owner from
  whatever uses them (campaign creative, profile, wall offer)
- Credits > Your purchases: buys made from linked positions are included, labelled "Position N"
- Cache tags: admin.css 20261018a, admin.js 20261018b, credits-screen.js 20261018b

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 07:01:58 -05:00
martbost f4b3058a58 Ledger and Telegram name linked positions as '<owner> (position)' instead of a bare member number
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 06:56:23 -05:00
martbost a416f2f9c9 Member numbers saved at every engine activation + one-time backfill from the chain (340 activated accounts had none, so the live ledger showed member numbers instead of usernames)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 06:41:12 -05:00