Working-tree content. Subject to change and not yet released. Commit: e3d4530507.
Shop
The Shop sidebar tab (between Keyboard and Mission — Mission stays the last tab). It has two parts, Remove Ads on top and Premium Access under it, on iPhone and iPad (PO, 2026-11-26; Premium Access was on top before):
- Premium Access: the benefits ("Play 1000+ hit songs", "Ad-Free Play"; art 118×69 pt and 15 pt labels on phone, 138×79.5 / 18 pt on iPad — 158×91 / 21 pt before the tablet design of 2026-11-25), then, top to bottom, the Try Free Now CTA, See All Plans, and the trial line in a softer white (
shopTrialLine; DEV, 2026-11-23 — it sat between the CTA and See All Plans before): at See All Plans' size and weight on phone; on iPad See All Plans grows to 20 pt over a 17 pt trial line, under a lower CTA (214 × 43). On phone the benefits and the offer share the row half and half; on iPad the offer takes its own width at the panel's right edge and the benefits sit centred in the rest (tablet design, 2026-11-25).
The Remove Ads panel has no extra room above and below its content (adsPanelPadY 0 on phone and iPad; DEV, 2026-11-24 — the phone's 8 pt left its packs too small, and since the Remove Ads height is what limits the phone's fit, the whole shop now scales up: iPhone SE ×0.84 → ×0.88, iPhone 15 ×0.86 → ×0.92, Pro Max ×0.97 → ×1). The packs are wider to suit their new height (cardPadX 10 → 14 pt phone, 14 → 20 iPad), the cards keep their padding (cardPadY 10 phone / 12 iPad), and the no-ads pack art is 58 / 70 pt (packArtSize, DEV 2026-11-23).
On iPad the shop is height-limited, so its chrome was trimmed to let everything scale up ~20 % (DEV, 2026-11-23): the gap under the ribbon 22 → 12 pt, the panel bottom padding 27 → 14 pt, and the screen margin above and below 10 % → 6 % of the height (shopScreenPadY).
The two sections split the height 45 / 55 (Premium / Remove Ads) on phone and iPad (shopSectionShares; DEV, 2026-11-23 — it was 40 / 60 on phone, then briefly 50 / 50).
2. Remove Ads: three packs. 1 Day ($1.99, was $2.99, SAVE 50%), 7 Days ($3.99) and Lifetime ($9.99, BEST VALUE, wide card with two bonus song covers).
The save percent comes from RemoveAdsPack.savePercent when the catalog names one. The placeholder catalog pins the design's 50 %: its prices are placeholders, so they don't add up to 50 % (DEV, 2026-11-04). Otherwise, as it will be for real store products, shopDiscountPercent (src/domain/policies/shop-discount-policy.ts) works it out from the price and the was-price, in whole cents, rounded down, so the badge can't claim more than the prices shown.
Layout (fit to screen)
On iPhone the two parts share the content height with no scrolling: 55 % / 45 % (Remove Ads on top / Premium; DEV, 2026-11-23, the order swapped 2026-11-26). On iPad they hug their content, full width, centred in the height between a margin of 6 % of the screen height above and below (fillHeight false, shopScreenPadY; DEV, 2026-11-24, centred since the tablet design of 2026-11-25 — they sat at the top with the spare room below): sharing the tall iPad screen 45 / 55 (the PO's tablet design, 2026-11-18) left the content small inside large panels. The fit check still uses the 45 / 55 shares on both (shopSectionShares), so nothing scrolls and the iPad scale did not change. A shop showing Remove Ads alone (VIP) hugs its content from the top too.
- Every size lives in one table per device class in
logic/shop-metrics.ts: the Figma phone design, and the PO's tablet design in points on a 10.2-inch iPad (1080 × 810). The tablet table was a blow-up of the phone one before; the design keeps the pack internals close to the phone's, with taller price pills (165 × 45: the design's height at the phone's proportions, so a VND price such as "149.000đ" clears the Save 50% / Best Value badges; the design's 134 pt was drawn around "$9.99") and CTA (214 × 43; 59 tall before the tablet design of 2026-11-25). Section titles ("PREMIUM ACCESS", "REMOVE POPUP ADS" — "REMOVE FORCED ADS" before 2026-11-25) are 16 pt on phone and 18.5 pt on iPad, on a 28 / 38 pt ribbon (tablet design, 2026-11-25: about 23 pt on a 48 pt ribbon on an 11-inch iPad; it was 25 / 55 pt from DEV, 2026-11-23, down from 19 / 32 pt on a 34 / 70 pt ribbon, since a large iPad's 1.5× scale-up took the old title to 48 pt). Components readShopMetricsand never importIS_TABLET. ShopScreenmeasures the area beside the sidebar (onLayout) and calls the store'slayoutContent. The store runsshopFitScale: the largest scale at which both rows fit across and each section fits its height share, up to 1 on phone andSHOP_TABLET_MAX_SCALE(1.5) on iPad, so a large iPad grows the design to fill its height (never belowSHOP_MIN_SCALE, 0.6). Nothing is drawn until that first measure, so the shop never jumps.- Fitted scales (landscape, 2026-11-24): iPhone SE ×0.88, iPhone 15 ×0.92, iPhone 16 Pro Max ×1, iPad mini ×1.15, iPad 10.2″ ×1.09, iPad Pro 13″ ×1.46.
- The tablet duration-word box is 122 × 34 pt (LIFETIME, ≈ the phone's 122 × 32), and 1 Day / 7 Days are the pill plus
cardPadX(20 pt since 2026-11-24, 14 before) on each side.
Status (2026-11-06): prices and purchases are real. The catalog comes from the store for the running mon_pkg variant (MonetizationShopCatalogService): the No Ads packs of the variant's tier (noads_low / noads_high, product table in src/domain/policies/noads-products.ts), and the Premium trial from the weekly VIP's ($rc_weekly) intro offer. The Shop loads when it is first laid out, shows a spinner or an error with a retry until then, and reloads on every monetization change (variant, tier, entitlement). Checkout (MonetizationShopCheckoutService): a pack press buys that product through the monetization slice's purchase(), then syncs entitlements at once; "Try Free Now" / "Subscribe Now" buys the weekly VIP ($rc_weekly) from the offering a player-opened paywall sells from: the trial offering (default) where the arm sells a trial there (paywall.trial_user_opened), else the no-trial one (notrial; aggressive and very_aggressive, PM 2026-11-11) and never opens the paywall — "Not available right now" when the store has no weekly (DEV, 2026-11-10); only "See All Plans" opens the Paywall Sub (usePaywallStore.open("premium"), analytics screen shop on its sub_offer_* / user_subscription, PM 2026-11-09). Notices: "Purchase failed. Please try again." on a store failure, "Not available right now" for a product the store did not return; a cancel says nothing. Restore lives in Settings ("Restore Purchases", restore-store.ts → restorePurchases) and the paywalls, not in the Shop; both name what came back (VIP, No Ads, a running pass) via restoreNotice. The art is also placeholder (see Assets).
- SAVE 50 %: the 1-day pack shows the store price doubled, struck through (
formatLikePricekeeps the store's currency format), with the fixed 50 % badge (shop-catalog-mapper.ts). - Trial copy: "3-Day Free Trial. Cancel anytime." / "Try Free Now" only when the subscription has a free trial on the store and the variant promises it (
mon_pkgarmshop.trialText: PM 2026-11-09, baseline = friendly and var 1 = balance say it — neither shows the Shop by default since DEV 2026-11-10, so it only matters whenmon_pkgturns their shop on; aggressive and very_aggressive do not). Otherwise "Cancel anytime." / "Subscribe Now". Aggressive and very_aggressive also buy from thenotrialoffering, so no trial applies at checkout either (PM 2026-11-11). - Bonus songs (
mon_pkgnoads.lifetime_bonus_songs): 1 to 5 catalog song ids, default["apt","montagem-miau"]; duplicates dropped, a longer list cut to 5, an empty or broken one keeps the default. The pack card, the owned card, the popup and the Song list No Ads banner (2026-11-11, still covers beside the no-ads art; see songs.md) draw the covers the same way (ShopBonusCovers, DEV 2026-11-10): two rows filled row by row (bonus-covers.ts) — the top row holds ⌈n/2⌉ covers; with an even count the bottom row is nudged right (the design's diagonal), with an odd count it is centred under the top row, so 3 and 5 songs sit even. One arrangement everywhere (BONUS_GEOMETRY: second row 0.3 of a cover lower and 0.52 right, columns 0.62 apart), with larger covers (pack card 58 pt phone, owned card 66 pt, popup 50 / 44 units for 2 / 3–5 songs). Each song shows its own cover: the app'sbonus-<id>art where it ships one (APT, Montagem Miau), else the song's Song list cover from the catalog (RemoveAdsPack.bonusSongCovers, looked up by id inshop-module.ts; the shop reloads when the catalog syncs), drawn withImageCache— no more borrowing. Around them sit the design's four pieces (bonusDecorPlacements: blue ring swoosh, pink swoosh, gold and blue sparkles, scaled to the cover size), looping: the swooshes swing, the sparkles twinkle (DECOR_SWING,DECOR_TWINKLE,BONUS_DECOR_MS). On the Shop the loops run while the tab is focused; in the popup, mounted with the app outside the tabs, while it is up (ShopLooprunWhile="mounted"), and under them the "N VIP SONGS" sticker (below). Owning a lifetime pack (either tier) unlocks the list throughcatalogSongsOwnedViaIap, run after a lifetime purchase (Shop, popup, Song list banner), on restore, and when the arm boots or switches. On the Song list the songs keep their sheet place and their sheet card (Free / video / VIP), with no look of their own: a player without the pack opens them the way the sheet says, an owner plays them as owned songs (no video, no VIP). Set from the DevTool's "Lifetime bonus songs" (comma-separated; ids missing from the catalog block Apply). - Passes do not stack (PM 2026-11-09): each 1d / 7d pass runs its own length from its purchase date, and No Ads ends with the pass that ends last (
noAdsCoverageinnoads-expiry.ts). A 7-day pass bought while a 1-day pass runs replaces it (7 days from then, not 8); a 1-day pass bought during a 7-day pass takes nothing from it. - Tab by variant: the Shop tab shows only when the running
mon_pkgvariant turns the shop on (selectShopTabVisible: booted andshop.enabled, so aggressive / very_aggressive; balance lost it on DEV 2026-11-10, together with the Song list No Ads banner, which follows the same flag).SideTabBarTabsdrops it viahiddenSideTabs, andShopScreenredirects to/songsif reached anyway (a link, or a variant switch while on it). - Clock: pass expiry, the chip and the billing adapter all read
trustedClock(src/core/iap/trusted-clock.ts): the latest RevenueCat server time moved on by a monotonic timer, or the device clock when it is later. Setting the device clock back cannot stretch a pass. - Testing a pass ending:
EXPO_PUBLIC_NOADS_TEST_PASS_MINUTES=5in.env.local(development builds only, restart Metro) makes a pass day 5 minutes, so the 1-day pass ends after 5 and the 7-day after 35 (src/core/iap/noads-test-pass.ts). Release builds ignore it. - Pack states (PM 2026-11-09). The catalog carries what removes the player's ads (
ShopCatalog.noAds:none/premium/lifetime/passwith itsdaysandendsAtMs), andpackOwnershipturns it into each card's state:- Running pass: its own pack reads a green pill, white "✓ Active" over the white countdown (DEV 2026-11-10), and the card gets a blue ring (
ShopStatusPill, tokensshopActiveFill,shopActiveRing). Shorter packs dim with an "Included · in your 7-day pass" pill. Longer packs and Lifetime stay on sale. - Countdown (
pass-countdown.ts): over 24 hours it reads whole days, rounded ("5 days left"); from 24 hours down, the full clock ("23:42:56 left", seconds rounded up). The store ticks everyPASS_TICK_MS(1 s) only while a pass runs; only the countdown text re-renders. When the pass runs out the shop reloads, so its pack goes back on sale. - Premium (VIP): the Premium Access section is hidden (nothing left to unlock;
ShopViewModel.premiumisnull, DEV 2026-11-10), Remove Ads shows alone — on phone it hugs its content from the top, like on iPad (selectShopFillsHeight), and the fit check gives it the whole height. Every pack dims with "Included · with Premium"; nothing is on sale. - Lifetime owned (DEV pick: preview option 1 "Design match", 2026-11-09): the packs give way to one wide card (
LifetimeOwnedCard): the Lifetime art (lifetimeArtSize), "+", the bonus covers atlifetimeCoverSize(66 pt phone / 86 iPad, and the art 92 / 119 pt: ~10 % bigger on 2026-11-23; laid out like the No Ads popup's:lifetimeCoverLayout) over their "N VIP SONGS" sticker, with the still swooshes and sparkles (ShopBonusCovers); "Lifetime pass" (26 pt) in the gold → pinkshopLifetimeTitlegradient, "Popup ads are off for good. Rewarded videos still work." (15 pt on a 19 pt line, 2 pt apart), and a green "✓ Active" pill (34 pt; the day passes' bold check, check and word white) on the right, level with the title. Since 2026-11-23 it looks like the Lifetime pack it was bought from: the featured fill (ShopCardFill), white rim, white glow (FEATURED_GLOW_BLUR) and the turning rays behind its art (ShopPackRays); it is 90 % of the panel wide, centred (LIFETIME_OWNED_WIDTH_SHARE, which the fit counts in; 85 % until DEV, 2026-11-24), with its own side padding (lifetimePadX20 / 28 pt) so the wider packs'cardPadXleaves it alone. - Pressing an active or included pack buys nothing; badges and the struck-through price show only on sale.
- Running pass: its own pack reads a green pill, white "✓ Active" over the white countdown (DEV 2026-11-10), and the card gets a blue ring (
- "N VIP SONGS" sticker (
VipSongsLabel,vip-songs-label.ts, DEV 2026-11-10): the label under the Lifetime bonus covers, drawn in Skia from the design export "Group 72" instead of a PNG, so it reads "1 VIP SONG", "2 VIP SONGS", "5 VIP SONGS"… for whatevernoads.lifetime_bonus_songsholds. The text runs along a gentle arch (middle 0.12 × the font size above its ends,TextPath). It is sized from the LIFETIME word beside it, whatever the song count (vipLabelFontForHeight(durationHeight)): as tall in the popup, a fifth smaller and arched more on the Shop cards (SHOP_VIP_LABEL: ×0.8, bow 0.24), and sits level with it: the art rows are bottom-aligned. It is centred under the covers; when it is wider than them the block (and the Lifetime card) widens to hold it, so it never runs under the "+" into LIFETIME (bonusBlockWidth). The wider card makes even a 13" iPad trim the shop a little (≈ 0.89). Nunito ExtraBold in four layers: the orange drop of the outline, the orange → yellow round-joined outline, the orange drop of the letters, the white → lavender letters (tokensvipLabel*). It sits tucked under the covers on the Lifetime pack card (packVipSize), the owned Lifetime card (lifetimeVipSize) and the No Ads popup (vipLabelSize); the Shop's fit check counts its estimated width and height (vipLabelWidthEstimate). - Switch popup (
PassSwitchPopup,pass-switch-popup.ts, DEV pick: preview option 6 "Countdown chip"): pressing a longer pass while a shorter one runs (packPress→confirmSwitch) first asks "Switch to the 7-Day pass?" — "Your 7-Day pass starts right away", then "and replaces your 1-Day pass" with the running pass's ticking countdown in a chip on the same row ("23:34:56 left", ambershopSwitchCountdown). "Keep 1-Day pass", the backdrop or ✕ close it; "Switch" (19 units) with "$3.99" right under it buys and closes once the store answers. It reuses the No Ads popup's frame, curved title and shell (NoAdsModalShell), made only as tall as its content (PASS_SWITCH_HEIGHT_UNITS, worked out from the content sizes, against the design's 283:NoAdsPopupFramesqueezes the shape and its edge particles, not the title), with the no-ads art and its note and sparkles still on the card's top-left corner. Lifetime never asks. - Restore Purchases is not on the Shop (removed by DEV, 2026-11-23); it stays in Settings and the paywalls.
- Every purchase confirms itself in the toast: "✓ Ads off for 1 day", "✓ Ads removed for good", "✓ Premium is on".
Layers (app-level clean architecture)
The placeholder catalog and checkout (placeholder-shop-*-service.ts) remain for tests and labs.
Motion
Timings are in src/features/shop/shop.motion.ts.
- Benefit particles (particles that hold still, such as the ring swooshes and 7 Days' note, are plain images with no per-frame work; a benefit with only still ones runs no clock): sparkles (and a note by Ad-Free Play) loop around each benefit's art, laid out in
logic/benefit-particles.ts. Effects (DEV picks): sparkles and the note float + pulse (bob, sway, swell and glow twice per 2.4 s loop, staggered per particle); the two ring swooshes around the songs note hold still with no rotation. - Remove Ads packs: cards hug their content and the row is centred (sizes below are at scale 1; see Layout); the no-ads art grows 1 Day → 7 Days → Lifetime (
packArtScale: ×1, ×1.15, ×1.25; trimmed from ×1.3 / ×1.45 on 2026-11-23, along with the bonus covers (66 → 56 pt), the duration words (122×32 → 106×28) and the price pill (132 → 112 pt wide, label 18 → 16 pt), so every card is narrower), sitting right above the price pill, with the duration word overlapping its bottom; every price pill has Lifetime's size and the Figma two-tone gold fill (shopPriceFill); the struck-through price above the pill is grey semibold (shopCompareAt) with a drawn strike at the digits' middle (iOS draws Nunito's own line-through off-centre); the badges (48 pt phone / 65 pt iPad) hang over the card's top-right corner (design 2026-11-23): Save 50% sits still turned 20°, Best Value is the only badge that wiggles, and their overhang stays inside the gap under the ribbon and the panel's side padding (shopBadgeOverhangFits), so they never cover Restore Purchases or get clipped; a still gold note sits by the 7 Days art, and a note + pink sparkle float by Lifetime (same float + pulse as the benefits,packParticles); the Lifetime bonus covers are tilted (−8° / 7°) and overlap. - Panel backdrops (
ShopBackdropViewin the view-model:fit,pin,overlay):- Both arts were replaced on 2026-11-23 and come darkened, with their decor (light beams, notes) at the corners:
cover, pinned to the center, with no overlay. Premium Access ispremium-access-bg.png, Remove Ads isremove-ads-background.png. One file per section; a sharper export (~2000 px wide) drops into the same file. The options arefitcover/contain/stretch,pintop/center/bottom, andoverlayon or off (Figma's dark layer,shopBackdropOverlayStart→End) — one line inbuildShopViewModel.
- Both arts were replaced on 2026-11-23 and come darkened, with their decor (light beams, notes) at the corners:
- Pack cards (
ShopPackView.tone, frombestValue, design 2026-11-23):standard(the day passes) is a top → bottomshopPackStdTop→shopPackStdBottomgradient (blue → dark purple) with ashopPackStdBorderblue rim;featured(Lifetime) isshopPackFeatTop→shopPackFeatBottom(purple → near black) with a white rim and a white outer glow (boxShadow0 0, blur 18, spread 2, white 60 %: much stronger than the design's blur 10 / 12 %, and no inner shadow, so the glow reads;FEATURED_GLOW_BLUR/FEATURED_GLOW_SPREAD, DEV 2026-11-23). The card is a frame (glow, badge; unclipped) around a clipped card (gradient, rays). The running pass keeps its blue ring; an included pack is dimmed. - Entrance, top to bottom (DEV pick 2026-11-24, preview option B10 "Pop cascade"): the panels fade in (160 ms), the ribbons slide in (260 ms), then the packs (or the owned Lifetime card), the Premium benefits and the offer pop in one by one, top to bottom, 120 ms apart, with the FTUE card rhythm: 0.8 → 1.05 (196 ms) → 1 (84 ms) (
shopPopInincomponents/shop-entering.ts, a ReanimatedKeyframe; the packs'ShopPackView.entranceIndexstarts at 0 and Premium's items atShopPremiumView.entranceStart, after them; Premium rose first before 2026-11-26). Once the cascade has settled (ENTRANCE_END_MS, 1 s), Try Free Now shines, then each price pill 150 ms apart. It replays each time the tab gains focus. - Purchase effect (DEV pick 2026-11-24, preview option A6 "Active stamp"): while a Lifetime checkout is under way the packs leave by sinking away (
FadeOutDown240 ms,selectPacksLeave); the owned card bought on this visit rises in (FadeInUpspring, after 200 ms) instead of popping, its "✓ Active" pill stamps on 650 ms after it mounts (1.9× tilted −10° → 0.9 → 1.04 → 1, 420 ms,shopStampIn), and oneButtonShinesweep crosses the card at 1.15 s. A day pass that turns active stamps its Active pill the same way as it replaces the price pill. The store decides withnewlyOwnedId(logic/shop-celebration.ts): what the player came to own between two views of this visit (justOwnedId); the next visit clears it and plays the entrance. - Try Free Now: breathes on a sine ease (
sineKeyframes, no sharp turn at the peak) and the gold pill's shine (PrimaryButtonpremium) sweeps across it every 3.8 s (CTA_SHINE; the price pills share the beat, staggered). Its glow is the standard 4 px button glow (its own larger gold halo was removed when the buttons merged, 2026-11) and is static: a pulsing halo was tried and removed (DEV, 2026-11-04), since RN can't animate a soft blur like the preview's and the solid stand-in read as a hard ring. - Price pills: each shines every 3.8 s, one after another after the CTA's first sweep (
pillShine(index), 150 ms apart). - Lifetime rays (the featured pack,
ShopPackView.rays):ShopPackRays, the sharedraylightburst (the same art asLightRayBurst) atPACK_RAYS_SCALE(3.05×: kept their size when the art shrank, then 20 % bigger, DEV 2026-11-23) the no-ads art, 60 % opacity, behind it, turning once every 24 s on aShopLoop(only while the tab is focused; still under Reduce Motion), clipped to the card. It replaces the rainbow spotlight ring (ShopSpotlightRing, removed 2026-11-23: the design's white rim and glow took its place). - Bonus covers: rock ±4° on top of their tilt, a quarter loop apart (
COVER_SWAY). - Badge wiggle: Best Value only.
- Press: the CTA and the packs press with the app's button press (spring squish; sparkles off the CTA and off the price of a pack on sale), the purchase starting 180 ms after the release; the "See All Plans" link keeps the Shop's own squash and spring (
ShopPressable). A press that buys nothing (unavailable) shows a "Purchases aren't live yet" toast for 1.6 s (ShopNoticeToast, storenotice/dismissNotice), and the pressed pack gets a gold ring while it shows (selectPickedOfferId). - Every loop goes through
ShopLoop(scale / rotate / opacity / border color channels, optional phase) oruseShopMotionActive(the shines), so it runs only while the tab is focused.
Everything stays still when the device has Reduce Motion turned on.
No-ads popup (in progress)
A popup pitching one Remove Ads pack (design "popup"): the one the running arm names (mon_pkg noads_popup.product, read through the arm's rules as noAdsPopupProduct(); lifetime by default; a pack the store lacks falls back to lifetime, then best value — popupPack). The title and subtitle follow the pack (NOADS_POPUP_COPY, popup design 2026-11-25): lifetime "No Ads FOREVER" / "Removes pop-up ads. Keeps ads for rewards."; 1d / 7d "No Ads for 1 DAY" / "for 7 DAYS" and "Removes pop-up ads for 7 days. Keeps ads for rewards." The CTA shows the price alone; its spoken label names the pack ("Remove ads forever, $9.99"). Only the lifetime pack shows bonus songs. Built step by step. Open it from Component Labs → Paywalls → No-ads popup (WIP) (useNoAdsPopupStore.getState().open()); nothing in the app opens it yet.
-
Container (
components/NoAdsPopupFrame.tsx,logic/noads-popup-frame.ts): the design export "Vector 176" (489 × 283 units) drawn with Skia and scaled toNOADS_FRAME_WIDTH(phone 520 pt, tablet 760 pt): the skewed fill (noAdsFrameFill*plus a blue inner shadow) under a variable-width rim (noAdsFrameRim*). The static shape (NoAdsFrameShape,components/noads-frame-image.tsx) is baked once into a CPU image at the device's pixel density by the popup's warm-up (bakeNoAdsFrameImage, about 6 MB, kept for the app's life), and the No Ads popup then draws that one image instead of two gradient paths and the inner-shadow filter. A frame mounted before the bake (or the Switch popup's shorter one) draws the paths live; a bake finishing mid-open never swaps the drawing. -
Edge particles (
components/NoAdsPopupParticles.tsx,logic/noads-popup-particles.ts): the exports Vector 174 / 175 (cyan and blue shards, top-right), 177 / 180 (pink and violet swooshes, left edge) and 177 (1) (big swoosh, bottom-right). They're placed in the frame's design units and drawn as Skia groups in the frame's own canvas, so the whole card is one Skia surface. Each group's transform and opacity come from Reanimated values, so nothing re-renders. The canvas reachesNOADS_FRAME_BLEED(32 units) past the card on every side, so particles hanging off the card or sweeping in from outside aren't clipped. Motion was picked from the preview (options 3 + 2, 2026-11-05):- On open (Sweep In): once the frame's pop has settled (
NOADS_FRAME_POP.settleMs, 240 ms;noAdsEnterDelayMs), the swooshes slide in from the side (spring, 0 / 80 / 160 ms apart) and the shards pop with a spring overshoot (200 / 300 ms). The modal mounts its content on each open, so the entrance plays every time. The Switch popup has no pop, so its particles start at once. - Then (Twinkle): the shards blink (scale ±15 %, dimming to 60 %, 1.6 s) and the swooshes breathe (±4 %, 75 %, 3 s), each offset by
idlePhase. The idle loop starts from rest, so it doesn't jump. It runs only in the popup's ambient stage and stops while the popup closes (ambient). - The particle SVG paths (and the frame's fill and rim) are parsed once, on first use, and kept for the app's life.
- The math is
noAdsParticleFrame(a worklet). Under Reduce Motion everything stays still.
- On open (Sweep In): once the frame's pop has settled (
-
Curved title (
components/NoAdsPopupTitle.tsx): "No Ads " in Nunito ExtraBold then "FOREVER" in its ExtraBold italic (the view'stitleRuns; popup design 2026-11-25, it was "Play without ad interruptions" in Fugaz One), end to end along the design's arcM59 50 Q244 39 429 43(frame units: it starts low on the left, rises to about 42 by the middle and flattens at the end), drawn with one SkiaTextPathper run in the frame canvas with thescoreNumbergradient across the whole line. The faces keep the design size (24) unless the line runs past the arc, when every run shrinks alike (layoutTitleRuns), and the line is centred on the arc. The host loads both faces with the app (useSkiaFont(…, "primary", "extrabold" | "extraboldItalic")). The Switch popup draws its title as one run of Fugaz One. The canvas carries the whole title as its accessibility label. -
Content (
components/NoAdsPopupContent.tsx,logic/noads-popup-content.ts,logic/noads-popup-view-model.ts). Laid out as the Figma popup (2026-11-25); it was the DEV pick of 2026-11-05 (preview option 5, "Inset Panel", with option 2's split-price CTA) before. The pieces:- the subtitle (Nunito Medium 16 / 20, 62 below the top);
- 22 below it, the art row straight on the card (no inset panel: the translucent
noAdsPanelbehind it is gone), its blocks 20 apart:- the no-ads art (63) with LIFETIME (87 × 22) over its bottom edge, an 87 × 75 block, plus the note and sparkle;
- + (24 / 29), then the bonus covers (a block at least 121 wide) (still, with both swooshes and two sparkles) over the "N VIP SONGS" sticker, drawn in code so any song count reads right (
ShopBonusCovers,VipSongsLabel);
- 12 below the row, the gold pill (
PrimaryButtonpremium) showing the price alone, centred (160 × 40 units, Nunito Bold 20 at 5 % letter spacing in the burnt-orange gradient; it held "Remove ads forever" with the price in its own dark pill before); - 12 below it, the "See 1-day & 7-day passes" link (Bold 12 / 16).
Every size is in design units (
noAdsContentMetrics(scale)), so the layout scales with the frame. The stack is about 270 units tall, inside the card's 283. -
Reveal order (
logic/noads-popup-reveal.ts, DEV 2026-11-05; staged mount DEV 2026-11-19): outside first, then the inside, never in whatever order things finish loading.- Staged mount (
NOADS_MOUNT_STAGES): opening is no longer one heavy commit. Commit 1 holds only the modal, its dimmed backdrop, the close button and the frame canvas (fill, rim, particles). The curved title, then the content (subtitle, panel, CTA, link), then the ambient loops (particle idle, the bonus decor'sShopLoops, the CTA'sButtonShine) each come a couple of frames after the stage before, so a frame paints between them (useStagedMountfrom@core/hooks, chained;noAdsMountStage/noAdsStageView). The staging lives inNoAdsPopupCard, inside the modal, which unmounts it on close, so every open stages afresh. The loops stop as soon as the popup is closing.
- The frame pops in (
NOADS_FRAME_POP, DEV pick): scale 0.92 → 1 around the card's centre on a soft spring (damping 20, stiffness 220), fully opaque by 60 % of the way (noAdsFramePop), on top of the modal's fade. The edge particles' entrance starts once it has settled. - Then, from 180 ms after its own mount, the curved title (a Skia group opacity), the subtitle, the art panel, the CTA and the link fade up 8 pt each, 80 ms apart, 260 ms each. The popup is fully in by about 800 ms.
- No blur behind the No Ads or Switch popup (DEV 2026-11-19):
NoAdsModalShelldraws just the dim, so opening either makes no native blur view. - Close button (
NoAdsModalShell,noAdsCloseAnchor): on a tablet it hangs off the card's top-right corner as the Figma popup draws it, its centre 24 units right of and 6 above the corner (NOADS_CLOSE_CENTER, scaled with the frame; the button keeps the tablet control size 48). A phone keeps it in the screen's top-right corner. Both the No Ads and the Switch popup. - Warm-up (
logic/noads-popup-warmup.ts,components/NoAdsPopupWarmup.tsx, DEV 2026-11-19: the first open was the GPU's first look at the card): once its fonts are in,NoAdsPopupHostcallsrequestWarmup. 3 s after the splash intro, on an idle slot, the store hands it a stand-in view (noAdsWarmupView: the lifetime copy, art, particles, two covers drawn as the no-ads art, and the sticker). The host bakes the frame image, then mounts the card once, outside any modal, at 1 % opacity, untouchable and hidden from screen readers, for 600 ms, and callsfinishWarmup. Skia compiles the card's shaders, the frame image goes up to the GPU, and the art decodes there, not on the first real open. It runs once per process; a real open first drops it. It can't warm the per-song remote covers. - The content mounts hidden all at once, so its images decode before their turn.
- The title's Fugaz One and the "N VIP SONGS" sticker's Nunito ExtraBold are loaded with the app by
NoAdsPopupHostand handed down (VipSongsLabel'sfont), so neither arrives late or decodes during the open. - The link and its checkout notice share one slot, so a notice doesn't replay the reveal.
- Under Reduce Motion everything shows at once.
- Staged mount (
-
When it opens on its own (step 8, reworked DEV 2026-11-16): the monetization slice counts every interstitial shown, wherever it showed (song end, Home song tap, Result actions, Pause, Free mode exit, Learn stages), and after every interstitial decision decides with
decideNoAdsPopup(ShowFullscreenAd):noads_popup.after_fs(aggressive / very_aggressive: 1, the session's 1st FS; 0 = off, so balance never), only right after an FS that showed, at mostper_session, never for an ad-free player. Never on the Shop screen (isOnShopScreen, reasonon_shop): the popup is not counted againstper_sessionthere, so the next FS shows it. Never in or right before gameplay either (reasonin_gameplay, DEV 2026-11-16): an FS on a Home song tap, a Result button that plays again or moves on (result_action), Pause (play_time) or a Learn stage before the last leaves the popup to the next FS off gameplay (song end, Result → Home, Free mode exit), again without spendingper_session— e.g. withafter_fs3: 2 FS, then Play shows the 3rd: the song starts, and the popup follows the next FS, at that song's end. The decider hands each decision torequestNoAdsPopup(onFs): after a song end the popup is queued (request("result")) and opens at the result screen'sflush— Game's once the result has revealed with no paywall, or right after the first-song / replay / default paywall closes (it never covers a paywall); Learn's once its ad is dismissed. After any other FS it opens on the screen the player is on as soon as the ad is gone (request("now")). Every step that leaves a screen after an FS (Home song tap, Result Replay / Next / Full song / suggestion, Result → Home, Pause → Retry / Songs, Learn's result buttons, a Learn stage card) still waits for a popup already queued (waitForNoAdsPopupClosed; resolves at once when none is), so it never opens over the next screen; "See passes" took the player to the Shop instead, so that step is dropped. Known gap: an interstitial shown before the slice has booted (today's rules, the first seconds after launch) is not counted. -
Never waits on the store (PO 2026-11-28: Learn's Leave did nothing while a due popup waited on a store answer that never came). The popup opens from the Remove Ads packs saved from the store's last answer (
services/noads-popup-pack-cache.ts, MMKVnoads-popup.packs.v1), keyed by the running arm, its No Ads tier and the config revision (arm | tier | rev, from the monetization store; nothing is saved or used before the slice has booted): another arm or tier sells other products, so its packs are never shown. The store is read again at app open (the warm-up's turn,scheduleNoAdsWarmup) and on every show; a new price, tier or arm replaces the saved packs, and a price that changed while the popup is up is updated on screen. With nothing saved for the arm (a fresh install), the popup asks the store and gives up afterNOADS_STORE_TIMEOUT_MS(5 s): no popup this time, and a late answer is still saved for the next one. Separately, every caller ofwaitForNoAdsPopupClosedgives a popup still on its wayNOADS_OPENING_WAIT_CAP_MS(3 s) to appear; past it the popup is dropped (abandonOpening, so it never lands over the next screen or a song) and the player's action goes on. A popup on screen is still waited for until the player closes it. The purchase always goes through the store at its own price, so a saved price never charges a wrong amount. -
Actions (
noads-popup-store.ts): the CTA checks out the Lifetime pack through the Shop facade; a purchase closes the popup. "See passes" closes the popup and opens the Shop tab (services/shop-navigation.ts, loaded lazily) withrouter.dismissTo("/shop"): back to the tab bar with Shop selected, in one step, so the result or Learn screen the popup opened on closes.navigatepushed a second tab bar over that screen, which stayed mounted with its banner on top of the Shop. Only the X closes it: a tap on the backdrop does nothing (NoAdsModalShellcloseOnBackdrop={false}, PM 2026-11-10). The Switch popup still closes on its backdrop. -
At an app open and at the Nth song start (Aggressive A/B, DEV 2026-11-20): in place of the paywall the arm turns off.
noads_popup.app_open_from_session(aggressive / very_aggressive: 2; 0 = off):SessionPaywallHostowes the popup at every cold launch from that one, when the arm has no open-app paywall (launchPaywalloff), onboarding and tutorial are done and the slice says it is due (isNoAdsPopupDueAt("app_open")); it opens on the same terms as the paywall (after the launch's App Open step, on the uncovered Song List, no ad, landscape) throughopenOwedLaunchPaywall("noads_popup")→offer("app_open"), and the App Open is never skipped for it.noads_popup.song_start(aggressive / very_aggressive: 6; 0 = off): once ever, on the first Game Mode result at or past the Nth lifetimesong_startwith no paywall of its own (flushNoAdsPopupOnResult→flushResult); a popup an interstitial queued for that result goes first, and the song-start one waits for a later result, unspent (the mark is the slice'smonetization.songStartPopupShown).offerasks the slice only when no popup is queued or up, and the slice counts it then (claimNoAdsPopup). Each placement has its own cap (after an interstitial and at an app open once a session, at the Nth song start once ever) and there is no cap across placements (PO 2026-11-20): a session from launch 2 can show all three. Aggressive A =aggressive(No Ads tier t1, the cheap pack), Aggressive B =very_aggressive(t2, the expensive pack); only the shown names, the ids stay. -
Who opens it: the monetization slice (after the Nth interstitial, at an app open, at the Nth song start), and Labs. A locked Lifetime bonus song never does: it follows its sheet card (Free, Rewarded → an ad, VIP → the Paywall).
Analytics
The Shop and the popup send the "Event Shop" sheet's events (PM, decisions DEV 2026-11-10); the full table is in analytics-events.md.
- The Shop store logs through its
trackoption (trackEventin the app).ShopScreencallsviewShopon focus;markEntrynames the visit (noads_popupfrom "See passes"), used once; otherwise a Shop tab press the side bar left for it (takeSideTabNavigation("shop"), taken at every visit) makes itside_tab, elseothers. The press is kept by the side bar, not heard by the store: the store loads with the Shop screen, after the first press. - Offers are logged from the catalog (
logic/shop-analytics.ts):pack_typefrom the pack's length,iap_offer_showonly for packs on sale, the Premium card only without VIP. A visit before the first catalog logs its offers once it has loaded. - The popup logs only when the slice opened it (
sourcenoads_popup), with thescreenof its placement (noads_popup,popup_app_open,popup_default:logic/noads-popup-screen.ts);show_indexis a lifetime count over every placement (useEventCountStore,noads_popup_show). noads_status/noads_expirefollow everysyncEntitlements(features/monetization/noads-tracking.ts, state in MMKVnoads-tracking).
Assets
Art lives in src/assets/shop/. That folder holds a generated manifest.ts (shopAssets) and a README listing every expected file. Each art slot names its file, e.g. no-ads. To fill a slot:
- Drop
no-ads.png(with@2x/@3xvariants when the source is big enough) into the folder, trimmed to its visible edges (no transparent padding). - Run
bun run assets:sync.
ShopArt then renders the image instead of the dashed placeholder. Panel backdrops (premium-background, remove-ads-background) work the same way.
The sidebar icon is src/assets/bottom-tab/tab-shop.png (+ @2x / @3x), mapped as
shop: "tabShop" in ROUTE_ICON_KEY (SideTabBar.utils.ts). To swap it, replace those three
files keeping the names, then run bun run assets:sync.