v1.0.10 · Release snapshot

Documentation comes from this release commit, without inheriting newer content. Commit: 63ea8c2b3d.

Streak tier FPS — first x2 / x3 drop (2026-10)

Symptom. On a fresh install, Game Mode's UI FPS dropped to ~45 at the first badge x2 and ~54 at the first x3, while x4–x6 stayed at ~59. After the first run the drop did not come back. Every song showed it on a fresh install, so this is a first-use GPU cost (Metal pipeline compiles), not steady-state load.

Status: resolved. Fresh-install play holds ~59 FPS through x2–x6.

  • x2: fixed by removing the badge <Shadow> filters (pill blur glow, and the x6 label shadow).
  • x3: fixed by warming the opaque glow draw (fix A below).

What each band turns on

Source of truth: src/features/piano/streak-tier-effects.ts (built from STREAK_BANDS, TIER_BG_OPACITY, SMOKE_TIER_CONFIG and the layer gate constants; a test pins the gates). The Full-stack effect lab renders the same table.

BadgeStreakThemeNew or changed at this band
x10–91 CyanAlways on: hit-line glow, tiles + hold beams, hold ember. Per hit: Perfect smoke, Sparticle burst, judgement popup + centre label, light beam. Badge hidden, glow off.
x210–242 BlueBadge appears (fade, pop, water fill + crest, "x2"). Glow fades in to 0.6. Hue cross-fade.
x325–443 PurpleSmokeWave SkSL band (SMOKE_WAVE_MIN_TIER 3). Badge under layer (first tier-up while the badge shows). Glow 1.0. "x3" glyph.
x445–694 PinkTap tier bloom, StarRise (24 orbs). Glow 0.8. SmokeWave ×1.15.
x570+5 Red orangeStarRise 28 orbs. Glow 0.85. SmokeWave ×1.25 height / ×1.3 speed.

Smoke puffs are the same size on every tier (SMOKE_SHARED_TIER_CONFIG; only the tint changes). Demotion follows STREAK_PENALTY (see docs/features/piano.md).

The sections below up to "Update 2026-10-23" were written against the older bands (x3 at streak 45, SmokeWave at x4) and the Ganesh renderer; they are kept as history.

Why the first x2 dropped (fixed)

The badge pill drew six <Shadow> blur filters. Each is an offscreen image-filter pass every frame from x2 up, and Skia scales the blur sigma by the current transform: the badge pop (scale 0.94–1.35 at 3× pixel ratio) hit several kernel sizes, each a new GPU program on first use. The tier-2 warmup only drew scale 1. Removing the glow removed both the steady pass and the compiles

Update — one small shadow is back. Design calls for a soft tinted edge, so the track carries ONE <Shadow blur={2}> (BADGE_SHADOW_BLUR, all tiers) instead of six. The kernel-per-scale problem still applies, so the warmup no longer draws scale 1 only: it sweeps the pill through every pop / drop scale (badgeWarmupScaleSweep, 0.01 steps, 0.94 → 1.35 opaque then back at 0.5 opacity — the live x2 fades in while it pops) one scale per UI frame under the prepare scrim (~1.4 s). MultiplierBadgeLayer.shadow.source.test.ts pins exactly one Shadow and the sweep. If a first-x2 dip ever comes back, check the sweep still spans the calculator's BADGE_SCALE_DROP / BADGE_SCALE_POP.

Why the first x3 dropped

x3 differs from x2 in exactly these ways (x4+ adds work but none of it is new to the GPU by then). Item 1 was the cause; 2 and 3 are listed for completeness:

  1. GameplayGlow at opacity 1.0. TIER_BG_OPACITY is 0.6 at x2 and 1.0 at x3. The mount warmup (GLOW_PIPELINE_WARMUP_PEAK_OPACITY) only draws 0.6. A fully opaque paint can select a different GPU program than a translucent one (the alpha modulate step drops out), so the first x3 compiles it. x6 also uses 1.0 but by then it is cached; x4 (0.8) and x5 (0.85) reuse the translucent program from x2. This was the cause — fix A removed the drop.
  2. First hue cross-fade. Tier 2 shares tier 1's palette, so x3 is the first time the 700 ms tint cross-fade runs: the glow rebuilds its BlendColor colour, HitLineGlow rebuilds its blur-10 Shadow filter with a new colour every frame, and the badge re-tints at frame-by-frame cadence. This is CPU / filter rebuild cost for 0.7 s, not a compile, so it shows as a short dip rather than a first-run-only one.
  3. Minor: the "x3" badge glyph is rasterised for the first time; smoke radius 42 (more fill than x2's 36, less than x4's 48).

Update 2026-10-15 — steady-state filter / idle cost trimmed

  • Hit line: the <Shadow dy={-4} blur={10}> is gone. computeHitLineShadowGradient samples the same Gaussian edge (Φ((y − edge)/σ)) into a LinearGradient, plus a plain opaque band — no saveLayer + blur every frame, and no filter rebuild during the x3 cross-fade (item 2 above).
  • Badge: the track's <Shadow> became a <BlurMask> on a separate rrect under it (analytic rrect blur, no image-filter layer). The scale-sweep warmup stays.
  • GameplayGlow: the backdrop image collapses to width 0 while its opacity is 0 (x1), because the srcIn colour filter rewrites alpha and Skia could not skip the full-screen draw.
  • Idle gates: SmokeWave no longer rewrites master / tint every frame below x4; Sparticle buffers only re-run while a burst is live; HoldEmber skips its per-slot sweep while the pool is empty.
  • Master atlas: dropped the unused tap-ripple discs and glyphs 1–3, one smoke blob instead of two, one white beam column tinted per lane, tier-glow disc baked at 1×.

Measuring

Lab → Effects → Full stack (GameplayStackEffectLab):

  • Theme tier chips pick a band; the panel under them lists what that band changes and every active effect with its prewarm status.
  • Walk tiers 1→6 steps the real tier and badge (pop, fade, cross-fades) one band every 3 s (STREAK_LAB_WALK_STEP_MS).
  • Layer chips hide one layer at a time.

Protocol for a first-use hitch (it only shows on a fresh install, so delete the app between runs):

  1. Fresh install → open the lab → hide every layer except Glow → Walk. If x3 dips with the perf HUD, it is the opaque glow (suspect 1).
  2. Fresh install → only Hit line + Badge → Walk. A dip here is the cross-fade (suspect 2).
  3. For proof, record with Xcode Instruments → Metal System Trace and look for shader / pipeline compile events at the x3 step.

Applied: fix A (glow opaque warmup)

GameplayGlowLayer warmup now holds the tier-2 pulse (0.6) for GLOW_PIPELINE_WARMUP_HOLD_FRAMES, then a second hold at GLOW_PIPELINE_WARMUP_OPAQUE_OPACITY (1.0) for the same frame count, then fades from 0.6 as before (GLOW_WARMUP_OPAQUE phase in GameplayGlowLayer.sim.ts). It runs under the prepare scrim. Verified on a fresh install: x3 holds ~59 FPS.

Other options (not needed, kept for reference)

  • B — cap the glow below 1.0 (e.g. 0.99 at tiers 3 and 6). Keeps every band on the warmed translucent program. Visually identical; one-line table change in TIER_BG_OPACITY.
  • C — cheaper cross-fade. Tint the hit-line glow through a colour filter instead of the Shadow colour so the blur filter is not rebuilt each frame. Only if a short dip on every hue change ever shows up.

First-note hitch (2026-10-21)

Symptom. After the iPad effect resizes, a slight hitch showed on the first note of a song (x1, before any streak band).

Audit. Every gameplay layer was checked against what the mount warmups draw:

  • The glow mount pulse draws the master atlas with srcOver + modulate colors + FX_ATLAS_SAMPLING. That uploads the sheet with its mips and covers every Atlas with the same paint: smoke, sparticle, tap tier glow, StarRise. The resized smoke (144×72) and ember (74) cells are source rects in the same sheet — no new program.
  • Not covered — the first Perfect note drew these for the first time:
    1. HoldEmberLayer — the only plus-blend Atlas. A Perfect tap fires a tap ember puff, and the view is empty until then. Blend state is part of the Metal pipeline, so this compiled on the first note.
    2. LightBeamLayer — plus + 3-stop LinearGradient Rects, culled at idle (width / opacity 0). Two programs: translucent during the fade-in, and opaque once the opacity reaches 1 (Skia drops the alpha modulate).
    3. CenterJudgementLayer / JudgementPopupLayer — each samples its own raster glyph image with only zero-size quads at idle, so the GPU texture upload could land on the first hit (JudgementAtlasPrewarm bakes on the CPU only).
    4. JS: song_start analytics (schema parse, every adapter, persisted counter) ran synchronously before the first judgement and note sound.

Fix. Each layer prewarms itself for 30 UI frames once mounted (under the prepare scrim / countdown): HOLD_EMBER_PREWARM_* (one 2/255 ember quad), LIGHT_BEAM_PREWARM_* (a dedicated Rect at 1/255, then opaque at 1 px wide), judgement-atlas-prewarm.ts (one 2/255 glyph quad per atlas). song_start now waits for the idle queue (scheduleSongStartOnce); the playtime clock is still stamped at the press, and teardown flushes a queued event. The effect lab inventory (streak-tier-effects.ts) marks these as warmed.

Verify. Fresh install → play a song whose first note is a Perfect tap, then one that opens on a hold. The perf HUD should hold ~59 FPS on the first note; Instruments → Metal System Trace should show no pipeline compile at the first hit.

Update 2026-10-23 — first x3 after a fresh install (Graphite)

Symptom. On a fresh install the first x3 dipped (120 Hz iPhone, 60 Hz iPad, simulator); later runs did not. First use only, so a GPU pipeline compile that iOS then caches on disk.

Renderer. react-native-skia 3.7.3 draws with Graphite on Dawn (Metal). A new GPU program comes from a new draw type (render step: rect vs path vs atlas vs text), shader tree, blend mode, or shader + paint alpha < 1. Uniform values, per-vertex colours and sizes never compile one. So:

  • Fix A above was likely not the cause. The glow opacity reaches the GPU as a per-vertex colour; 0.6 and 1.0 share the program. The x3 dip that "went away" with it was probably cached by then.
  • SmokeWave size per streak is not a cause, and making every tier the same size would not change anything. It draws one rect for every tier, sized for x5 (smokeWaveBandHalf × SMOKE_WAVE_MAX_HEIGHT_SCALE); the per-tier hump height and speed (SMOKE_WAVE_TIER_SCALE) and the iPad ×1.25 geometry are shader uniforms. Its mount warmup draws the same rect, shader and plus blend. Its only weak spot was the window — 8 FX frames, counted on the frame driver rather than on frames the canvas actually renders — now 30 like every other mount warmup (SMOKE_WAVE_PREWARM_HOLD_FRAMES).

Cause: the badge under layer. After a tier-up while the badge shows, the badge paints the previous tier's water as a Rect + 3-stop LinearGradient at BADGE_WATER_OPACITY inside the clip (MultiplierBadgeLayer.tsx). The badge is hidden at x1→x2, so x2→x3 is the first time it draws (latchBadgeUnderLayer). The mount warmup left underOpacity at 0, and the water Path uses the same gradient but a different draw type, so nothing covered it; x4 / x5 then reuse the program — "x3 only". The warmup also only drew the "x1" label, so "3" was rasterised at x3.

Fix. stepBadgeWarmup now draws the under layer at the live opacity (× the faint warmup root opacity) and cycles every x2..x5 label across the scale sweep, then hands both back (a label the game set during the hold is parked and restored). streak-tier-effects.ts marks the badge warmed.

Verify. Fresh install → Lab → Full stack, only the Badge layer, Walk tiers: no dip at 2 → 3 on the perf HUD, and Instruments → Metal System Trace shows no pipeline compile at that step. Then a real song to x3.

Launch splash — first launch after an install (2026-10-23)

Symptom. The splash intro stuttered on the first launch after a fresh install only.

Cause. The same Graphite first-use compiles. Every Skia layer of the splash first drew at the intro's t=0 (the canvas mounts with the key art, in the same commit the clock started), the key ColorMatrix left identity a frame later, and the title letters and footer — opacity 0 until 1.2 s / 2.15 s — first drew mid-intro.

Fix. The JS splash holds a prewarm pose under the native splash before its clock starts — 600 ms on the first launch of a build, 50 ms after (splash-prewarm.pure.ts, splash-prewarm.ts). See routing.md → Launch splash.

Verify. Release build, delete the app, install, launch with the perf HUD: steady UI FPS through the intro (the native splash stays ~0.6 s longer). Instruments → Metal System Trace: pipeline compiles land before the native splash hides.

Tutorial first song — first press / first x2 (2026-10-26)

Symptom. In the first-song tutorial (TutorialGameplayScreen → TutorialSongGameplayPhase, which plays on Game Mode's PlayScreenGameplayGroup), UI FPS drops on the first note press and on the first x2. It happens on almost every fresh install on real devices and less often on the simulator. It does not come back after the player leaves the tutorial and relaunches. Every Game Mode fix above was checked from the Lab or PlayScreen, but on a real install the tutorial is the first gameplay the GPU ever draws.

Status: collecting data. The cause is not proven yet. The hitch trace below exists to tell the hypotheses apart.

What is different in the tutorial path (from the code):

  1. Every mount warmup counts FX-driver ticks from mount, not frames the canvas actually drew: 30 ticks for LightBeam / HoldEmber / judgement atlases / SmokeWave, plus the glow pulse and the badge scale sweep. On a 120 Hz iPhone, 30 ticks is about 250 ms.
  2. The tutorial mounts the gameplay group under the song reveal (onRevealSettled). The reveal animation, the chart load and the master-atlas bake (when useTutorialSongPrebake has not finished) all land in the same window, and on a first launch the JS thread is also busy with SDK / RC / analytics. The warmups can run out before the lane canvas has its tree and its size.
  3. Metal / Graphite compiles are cached on disk per device. That fits "gone after a relaunch", "worse on device" and "not every time".
  4. Haptics are never preloaded. Haptics.preload has no caller, even though the comment in tap-decorations-defer.ts says Pulsar is preloaded at boot. So the first Perfect tap starts the haptic engine. That costs time only on a device, and only for the first press.
  5. On the first press the tutorial also runs fireSongStartOnce and fn_tutorial_song_start synchronously.

Hypotheses. H1: a GPU first use (warmup expired early, or never covered). H2: a slow first haptic. H3: a JS stall from the synchronous work at the first tap or the tier change. H4: a tutorial-only layer drawn for the first time (guide, score digits).

Collect. On a real device — the simulator's GPU compiles fast, so it shows at most a one-frame dip.

  1. Build with EXPO_PUBLIC_HITCH_TRACE=1, EXPO_PUBLIC_COMPONENT_LABS_ENABLED=1 (and EXPO_PUBLIC_PERF_HUD_ENABLED=1), e.g. an internal TestFlight build.
  2. Delete the app (that also drops its shader cache), reinstall, go through onboarding into the tutorial song and play past x2. Note the lowest HUD FPS and when.
  3. Lab → Hitch traces → Share file on the session (or Share all (file)) → AirDrop to the Mac. Each session is its own <start>_<screen>-<session>.json; meta.sessionIndex is 1 on the first song of an install.
  4. Repeat 3+ times, at least one at 120 Hz, and at least one run of the flow without the practice screen (run_variant.guided: true).

Simulator runs (2026-10-26, 4 cold installs, all guided: false). Warmups start after the lane canvas has its size (no H1 early end). Every run has one ~380–430 ms UI freeze ~70 ms after the warmups start, while the song reveal is still on screen (the compiles themselves). The first press always costs exactly one frame (33 ms at 60 Hz) with no JS stall or slow call, and never in a later Game Mode song of the same install — a first draw the warmups do not cover. x2 did not reproduce.

Read. Each summary has moments (worst UI frame and JS stall within 300 ms of first_press, first_judgement and tier_change:2, plus the timed calls in that window), prewarm (each layer's begin/end against canvas_layout:lane), and hints:

  • H1: prewarm ended before the lane canvas layout → start the warmup counters from the canvas layout or prepare_ready instead of mount, or make them time-based.
  • H2/H3 … slow call first_haptic(…ms) → preload haptics behind the splash.
  • H3 … JS stall → move the first-tap analytics to the idle queue, as scheduleSongStartOnce does for Game Mode.
  • H1/H4 … UI frame … with no JS stall or slow call → a GPU first use. Compare the layer list with what changes at that moment, and check the warmups' prewarm rows.

Audit of the first press (2026-10-26). The drop shows on all four onboarding scripts, with or without the training drills first. What the first Perfect tap draws, against what draws it before:

First press drawsDrawn before it by
Tiles, keyboard press, hit linethe countdown (and the drills on scripts 1–3)
Light beam, hold ember, centre label, points popuptheir own 30-frame mount warmups (beam: translucent + opaque)
Perfect smoke, sparticlethe glow mount pulse — same master image, modulate colours, FX_ATLAS_SAMPLING, srcOver
Score count-up — digit columns past the ones, wheel positionsnothing: the score is hidden (opacity 0) until GO and shows only "0" until the first hit

Fix. HeaderScoreLayer now runs one count-up to SCORE_WARMUP_TARGET (999 999: all six columns, every wheel past 9) at SCORE_WARMUP_OPACITY (2/255) while the host keeps the score hidden, then snaps back to the game's target; GO (setVisible(true)) ends it early. If a first-press drop remains on a device after this, the next suspects are first-run costs that a GPU warmup cannot reach (first run of the hit path's worklets) — rehearse a real hit under the opaque loading card / song reveal rather than adding more single-layer warmups.

Device result (2026-10-27) and the hit rehearsal. The score warmup alone did not help. On a 60 Hz iPhone the first note of the first song after the drills still dropped UI FPS to ~49 (first x2: ~55). JS FPS held, a second song in the same session was fine, and a kill + relaunch cleared it without a reinstall. Only a GPU compile that iOS keeps on disk fits all of that; the simulator never shows it (the Mac compiles fast and keeps its own shader cache across simctl erase). The drills do not drop because their hits fire only the centre label and the light beam.

Per-layer warmups kept missing a Graphite key, so the lane now rehearses a real hit: GameplayHitRehearsal (inside PlayGameCanvas, counting frames on the FX driver) fires one Perfect tap's effects through the same handles useMagicJudgement uses — centre label, points popup, Perfect smoke, sparticle, tap ember, light beam, score — keeps them for HIT_REHEARSAL_DRAW_FRAMES, clears them (clear() on every layer), lets the cleared lane draw, then reports done. PlayScreenGameplayGroup's onReady waits for the keyboard bake and the rehearsal (createGameplayReadyGate), so the opaque loading card / song reveal is still up while it runs. The hitch trace marks hit_rehearsal_begin / hit_rehearsal_end. A new first-hit effect must be added to the rehearsal.

Not covered yet: the first x2 (~55 FPS). If it remains, rehearse the tier crossing the same way. If the first note still drops, A/B a build with FX_TIER_SPRITE_COUNT = 1 (the six tier-tinted smoke / ember sprites live in the same master image, so they should not add a pipeline).

Bisecting on one build — Lab → Effect toggles. Each Game Mode effect layer (and the first-hit rehearsal) can be switched off from the Lab (gameplay-effect-toggles.ts, persisted in MMKV, read once when a lane canvas mounts — the Game Mode canvas and the tutorial drills canvas). Protocol on a real device, one TestFlight build with EXPO_PUBLIC_COMPONENT_LABS_ENABLED=1 and the perf HUD: delete the app → install → open Lab → Effect toggles → switch the suspects off → play the first song → note UI FPS at the first note and the first x2. Delete + reinstall before every run: that clears both the iOS shader cache and the switches (back to all on). A switch that removes the dip names the layer whose pipeline compiles late.

Update 2026-10-27 — fewer Atlas sprites per frame

Goal: cut the quads Game Mode hands Skia each frame while the look stays nearly the same. Estimated for a dense x5 passage (~5 Perfect taps/s, one hold, phone): ~804 → ~655 quads.

LayerChangeQuadsTrade-off
Hold / tap emberHold field 140 → 100 (gain 1.4), phone tap 80 → 64 (gain 104/64), iPad hold 140 → 100, iPad tap 88 → 72; slot buffer 160 → 100busy ~540 → ~420The brightest moment of a flight now clips at alpha 1: emberAlphaLightKept pins the light kept (hold > 99.5 %, phone tap > 97 %). A tap puff is slightly grainier.
Hold / tap emberSlots stay 8 (6 was proposed)—Local charts hold up to 6 notes at once and need 9–11 slots with the drain; 6 slots would cut live holds.
Perfect smokeBurst slots 6 → 4peak 192 → 96 (with the line below)Faster than ~8.5 Perfects/s the oldest burst is stolen after its edge puffs have dissolved.
Perfect smoke24 puffs per burst instead of 32 (fanScale keeps the ~336 px band)busy ~70 → ~53Neighbours ~1.35× farther apart: the band overlaps ~2 deep instead of ~2.7, a little lighter mid-life. If it reads thin, try maxAlpha ~0.82 in the smoke lab.
StarRise24 orbs at x4, 28 at x5 (was 28 / 34)x5 68 → 56Slightly sparser shimmer; x5 still adds 4 orbs.
Background glowTried and reverted: its own half-resolution canvas (GameplayGlowCanvas)12 (same)On device the lane's DRAW FPS fell to ~32 with ~28 janks/s at x5 (UI FPS still 60): a second Skia surface that redraws every frame costs far more than the 3/4 of the glow's fill it saved. The glow stays the lane canvas's first child. Lowering its resolution would need a way to draw at low res INSIDE the one lane canvas.

Not done: merging the StarRise halo + core into one quad (the tier tint cross-fade needs the halo tinted and the core white, so an exact look keeps two quads for the fade and saves almost nothing), ember clusters, and the tile / popup / centre-label pools (left as designed). Device check still to do: a dense x5 song with the perf HUD, UI FPS and GPU ms before and after.