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>
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>
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>