feat(ads): server-driven ad-banner backend, wire & admin console (PR1)
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 14s
CI / ui (pull_request) Successful in 49s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m12s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 14s
CI / ui (pull_request) Successful in 49s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m12s
Turn the gated-off mock banner into a real advertising subsystem (backend + admin half; the UI rotation lands in PR2). - internal/ads: campaigns (percent weight + validity window; a perpetual, undeletable default that fills the remainder up to 100%), 1..N bilingual messages (en+ru), global display timings; ActiveSet computes the window-filtered, default-remainder, GCD-reduced, language-resolved rotation feed. Smooth-weighted-round-robin math is unit-tested. - migration 00006 (+ jetgen): ad_campaigns / ad_messages / ad_settings, seeded default campaign + house message + default timings. - eligibility = !paid_account && hint_balance==0 && !no_banner role (new role; guests qualify). The resolved feed rides the profile.get response (no new RPC, works for guests, nothing distinct to filter); language by service_language. - live update: a notify `banner` sub-kind (re-poll signal) published when an operator grants hints or grants/revokes no_banner, so the client shows/hides in place. - admin console /_gm/banners (+ /_gm/banner-settings): campaign + message CRUD with reorder, default protection, clamped timings. - wire: fbs BannerInfo/BannerCampaign on Profile; gateway transcode forwards it. - docs: ARCHITECTURE §10, FUNCTIONAL (+ _ru), backend README, PRERELEASE tracker (incl. the deferred app.load aggregator note).
This commit is contained in:
@@ -264,3 +264,27 @@ in-app), archive it, delete it, or delete every message from that player — and
|
||||
stops only feedback submission). Roles are listed and granted/revoked on the user card. Opening a
|
||||
message does not mark it read — only the explicit actions do; message bodies and attachments are
|
||||
shown defensively (text escaped, attachments downloaded rather than rendered).
|
||||
|
||||
### Advertising banner
|
||||
|
||||
A one-line banner under the nav shows short promotional or operational messages to **free
|
||||
players**: anyone who has **not** paid for a lifetime account, holds **no purchased hints**, and
|
||||
does not carry the **`no_banner`** role (which suppresses it unconditionally). Buying a paid account
|
||||
or any hints — or being granted `no_banner` — removes it; guests, the freest users, see it. When an
|
||||
operator changes one of those properties, the banner appears or disappears **in place**, without a
|
||||
reload.
|
||||
|
||||
Messages come from operator-run **campaigns**, each a placement order with a **show weight** (a
|
||||
percent) and an optional start/end **window**. Campaigns running at the same time **compete** for the
|
||||
banner in proportion to their weights; a permanent **house (default)** campaign fills whatever share
|
||||
paid campaigns leave unsold and steps aside entirely when they sell the full 100%. Each message is
|
||||
written in **both languages** (English + Russian); a player sees the variant for the **bot they play
|
||||
through**, regardless of their interface language. The client rotates the eligible campaigns
|
||||
**fairly** — every campaign gets its weighted share each cycle, evenly spread rather than at random —
|
||||
and a campaign with several messages shows them in turn.
|
||||
|
||||
Operators manage all of this in the admin console at **`/_gm/banners`**: create, edit, enable/disable
|
||||
and schedule campaigns, write each campaign's bilingual messages (reorder or remove them), and set
|
||||
the global display **timings** (how long a message holds, the scroll of an over-long message, and the
|
||||
fade-out → gap → fade-in transition between messages). The default campaign cannot be deleted and
|
||||
keeps at least one message.
|
||||
|
||||
Reference in New Issue
Block a user