Commit Graph

24 Commits

Author SHA1 Message Date
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 dd438e6586 Launch day is date-driven (2026-11-15 Central): the pre-launch notice on every Control Room screen and the chatbot's pre-launch fact switch off by themselves at midnight, no deploy needed that morning 2026-11-02 07:04:44 -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 837d4b6569 Refuel in the menu + arrivals from InstantAdPay (Marty 2026-10-25: "I don't see any kind of refueling option on LinkSpin in the menu"; "it took me to LinkSpin but I don't know how to pick up from there"). Rail item Refuel -> /credits#refuel: the Refuel panel is scrolled to and flashed once loaded (also after sign-in pop-ups, settles again on phones); /credits#buy and /ads#engine work the same way. Refuel panel: says any $25+ package counts, button "Buy a $25+ package" scrolls to the picker, links to the Engine Room, and a Buy on InstantAdPay link when LinkSpin is done but InstantAdPay is not. Packages of $25+ carry a "counts for Refuel" tag. Links from InstantAdPay (?from=iap&task=refuel|conversions|bannerspin|spinlink|testing|page|ads) open with a strip: "You came from InstantAdPay to <job>. Step 1: ...", guide link, Back to InstantAdPay; signed out, the strip and the sign-in pop-up say to use the same InstantAdPay email, and the Refuel/Engine panels reload after sign-in (cr:signedin). Engine Room built with site 'linkspin': buy/top-up/Fuel links stay on LinkSpin. engine.js / engine-room.js byte-identical with InstantAdPay. Chatbot routes, KNOWLEDGE_DATE 2026-10-25. QA: fuel 16/16 + drift check, member walk 0 bugs. cr-shell.js ?v=20261025ff on all 12 pages; fuel.js, engine-room.js, credits-screen.js bumped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 09:06:06 -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 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 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 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 8a1a6b1f6d Chat bubble back on every Control Room screen: the shell loads chat.js once per page (it only lived on the retired /my dashboard); Control Room styles for the widget
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 06:35:55 -05:00
martbost 44d40863db Ads screen layout by real width + Qualified Start positions on Credits (wallet switch fix)
Ads: the campaign table squeezed its empty-state note (and the first column) to a
word or a letter per line beside the side cards. Container queries now stack the
side cards under the table and turn rows into cards when the table cannot hold
seven columns, whatever the rail state. cr.css: an empty-state row (one muted
note) spans every column on every Control Room table.

Wallet: Disconnect really lets go (keeps wagmi's disconnected marker, revokes the
injected permission, next connect opens the account picker), so MetaMask no longer
snaps back to the first account. Credits gains Switch account, Disconnect, Add a
position wallet and a Buy from picker (ported from the classic Buy pane), so a
member can add wallets #2..#5 and buy from each while staying signed in as
themselves. Classic dashboard and Wallet screen copy point to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 05:15:15 -05:00
martbost 4743c7f8a9 Pre-launch open: notice on every Control Room screen (testing until November 15, live but subject to change); chatbot knows it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 17:06:50 -05:00
martbost df1b900f45 Support: Help screen, public /support page, ticket link and chat hand-off on InstantAdPay's shared desk
helpdesk.js proxies to InstantAdPay's partner API (/api/partner/support/*), signed with the
same LS_SYNC_SECRET + X-LS-Ts/X-LS-Sig as iapsync.js, IAP_URL as the base. No tickets are
stored here.

- /help: Control Room screen (list, new ticket with the desk's categories, thread, reply);
  Help on the rail with an unread badge when Marty has replied (/api/my/support/unread, 60 s cache)
- /support and /support/t/<token>: public form + private ticket link, behind the sign-up
  guard's walls (honeypot, form age, IP/email limits, icon check) on their own counters;
  these pages, their API and their files pass the curtain for anonymous visitors
- chat bubble: "Send this to support" hand-off, greeting points to Help and /support;
  chatbot flags hand-off on support questions and unsure answers; CANNED + FACTS updated,
  KNOWLEDGE_DATE 2026-10-16
- Support in the home nav, common.js nav/footer and every public footer; copy that said
  "message support" now points at Help
- cache tags bumped (common.js, cr-shell.js, chat.js, my.js, credits-screen.js)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:05:02 -05:00
martbost 211eb5a0e8 Traffic sources: network macros, campaign URLs, per-source postbacks, Reports dimension
A Source is a first-class record of a network a member buys traffic on (PropellerAds,
Zeropark, Adsterra, ExoClick and 25 more from the shipped catalog, or defined by hand).
It remembers the network's macro tokens and conversion postback, attaches to spin links,
builds the exact campaign URL to paste into the network, fires that network's own
postback only for clicks that came through it, and shows up in Reports by source and
by the zone / placement / site the macro carried.

- data/traffic-sources.json: catalog of 29 networks (BeMob template harvest), un-ignored
  via data/* + !data/traffic-sources.json; loader tolerates missing fields, null costModel,
  {{slot}} labels with spaces and parentheses, optional slots, unknown single-brace macros
- sources.js: DATA_DIR/sources.json model, 30 per account, 20 params, key allow-list,
  postbacks.validateUrl on the filled postback; list/create/update/get/urlFor/test
- rotator.js: update() takes sourceId (owner-checked), pub() exposes it, hits and conversions
  are stamped with the source at click time (sr), wider query allow-list (cost, creative,
  site, banner, keyword, geo, os, browser, device, carrier, format, external_id, visitor_id),
  summary() adds sources[] and placements[], sourceCounts(), detachSource()
- postbacks.js: fire() delivers the matching source's postback after the manual ones through
  the same deliver() (guards, retry, rate cap, auto-disable); log rows carry source; convertFor,
  inbound and the page lead path pass sourceId; fill/deliver/logForSource exported
- routes (GET and POST): /api/sources/catalog, /api/my/sources, /api/my/sources/<id>,
  /api/my/sources/<id>/url; /sources screen
- /sources Control Room screen (list + Campaign URL / Postback / Settings tabs, two-step
  New source dialog); Links share kit gets a source select and a "Campaign URL for <network>"
  first row; Reports gets Traffic sources and Placements; rail entry; chatbot canned answer,
  FACTS line and KNOWLEDGE_DATE 2026-10-12
- cr.css: phone rail icons only at 34px so ten entries fit; cache tags bumped to 20261012a

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 11:16:24 -05:00
martbost 67f38daac4 Rail: secondary entries use class rsec (the generic .sec eyebrow rule upper-cased Training/Pipeline/Profile)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 06:56:14 -05:00
martbost f562cc50be Rail shows Training, Pipeline, Profile; profile carry-over from InstantAdPay; hero frame + relative page images; the "how is this different from InstantAdPay" answer
- Control Room rail: Training, Pipeline and Profile are first-class entries (phone bar keeps them behind More)
- /api/partner/registry: rows may carry profile {avatarUrl, bio, socials}; fills only empty fields on this side, member edits win after that
- Pages: uploaded images are stored as /u/pages/... paths (any host, local recordings included); the split hero frame keeps a 3:2 shape with a tinted ground when an image fails to load (was a thin white bar)
- Home page section + chatbot canned answer + FACTS: InstantAdPay = marketplace, LinkSpin = tool side, same line and wallet
- asset tags bumped to 20261011a

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 06:41:25 -05:00
martbost f64b7e1dec More panes inside the Control Room: /tools mounts the shell (rail, topbar, strip), legacy site.css layered under cr.css + tools.css light restyle, CR tabs for Start/Promo tools/Training/Pipeline/My line/Profile, shell-owned sign-in; Promo tools gets its own rail entry
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 16:14:12 -05:00
martbost 8ec82bd282 Retire the classic /my dashboard: control-room screens take over (links/ads/credits/wallet/team), leftover panes (welcome tour, line broadcast, pipeline, promo tools, training, profile) live at /tools as 'More' in the rail; /my redirects by #pane; every link and email retargeted
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 15:37:00 -05:00
martbost 55584a7007 Wallet sends carry an explicit gas limit from the server's estimate (wallets that cannot estimate showed 'unable to get a gas fee' on buy and activate); Control Room rail expanded by default with a remembered Collapse toggle
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 06:25:06 -05:00
martbost f26b3d6391 No font ligatures on the public pages and shell: JetBrains Mono merged '//' so pasted URLs looked like 'https: /site' (Marty 2026-10-07)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 16:15:30 -05:00
martbost 75758bf9ee Tiles get sparklines and delta chips (CR.tile/sparkline/delta): Reports unique + bots by day, Links 7-day clicks, Ads 7-day hourly views; bar charts capped in width, peak highlight only with 3+ days
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 19:14:37 -05:00
martbost 6091f0b82a Instrument scheme across the Control Room: light workspace on a blueprint grid, dark chrome rail/topbar/status strip, signal-orange primary, gradient charts, corner-bracket tiles, LED readouts, gauges; /api/my/strip
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 19:10:03 -05:00
martbost 274c8fd78c Ads screen in the Control Room shell: buy banner/text/login ads, delivery across viewer, zones and network, earn viewer; login-ad gate after sign-in; member types limited to the three; welcome credits granted from the shell too
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 18:11:17 -05:00
martbost 8e1ddb892f Control Room: shared shell with in-shell sign-in, Reports, Team and Wallet screens; postback rails (click ids, macros, lsid attribution, conversions, outbound + inbound postbacks with SSRF guards)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 15:52:07 -05:00