fix(engine): restore 60 fps Android card animations + dead-code sweep #166
Reference in New Issue
Block a user
Delete Branch "fix/android-anim-redraw"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Android animation lag (Rhys's report — v0.40.0 regression)
Commit
38e4c03switched Android'sfocused_modetoreactive_low_power(100 ms)on the premise that every animation tick system writesRequestRedrawwhile active. The writers never landed — the diff only contained the WinitSettings change, imports, andadd_messageregistrations. With no touch input, nothing woke the winit loop during a card slide except the 100 ms fallback ceiling, so animations rendered at ~10 fps. Desktop/web keepContinuousmode, which is why the jank was Android-only and animation-only (drags stayed smooth — touch events drive frames). Matches the bisect evidence: absent on v0.39.1, present since v0.40.0 (released the day of the first report).This adds the missing
MessageWriter<RequestRedraw>to all seven systems the original commit message named (card animations, deal/win-cascade slides, shake, settle, foundation flourish, toast countdown, auto-complete keepalive), each writing one redraw per frame while it has active work — including delay phases. Regression test:active_card_animation_requests_redraw(idle board emits nothing; active animation emits every frame).Dead-code sweep (multi-agent audit)
Compiler-verified (
--force-warn dead_code) + workspace-wide reference greps; −1,145 lines:#![allow(dead_code)]hid them). Live handlers preserved; allow retired.retarget_animation,ScanThemesRequestEvent(its doc claimed a nonexistent consumer),_VEC3_REFERENCEDhack, data-crate default-path wrappers (load_stats/save_stats/time_attack_session_with_now), surplus re-exports,ReplayPlayer::is_finished,build_app.FoundationCompletedEventrow, 'placeholder' label,bevy_kira_audio→kira),ToastVariant::Warningstale allow removed (variant is live).Deliberately kept, pending owner decision: Spider module (staged forward work),
WinCascadePlugin,SyncCompleteEvent,solitaire_sync::ApiError/merge_at(§8-gated).Verification
cargo test --workspace: all suites green (928 engine tests incl. new regression test)cargo clippy --workspace --all-targets -- -D warnings: clean🤖 Generated with Claude Code