← Back to Pull requests

feat(ios): blurred artwork player backdrop that moves with the track's tempo #72

Open
unknown opened this pull request with 311 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 07, 2026 18:32 UTC
Author

Why

The full player's background looked muddy. It averaged each quarter of the cover into one colour, clamped the colours dark, and laid up to 90 % black on top, so most covers turned into flat brown or grey.

What

  • Backdrop (CoverBackdrop, iOS): the backdrop is now the cover itself. A 32 px copy is blurred and saturated once per cover with Core Image, then zoomed well past the screen diagonal and blurred again. Two copies of it turn slowly, which turns the cover into soft colour fields instead of a stretched picture.

  • Tempo: the motion follows the track's BPM. Speed scales with the tempo (clamped to 60–160 BPM, 100 when unknown), and the backdrop breathes once per 4-beat bar. TIDAL gives the tempo but not where the beats fall, so the motion is not locked to the beat.

  • - The phase is counted in beats and only advances while playing. Pausing freezes the backdrop, and a new tempo changes the speed without a jump, whatever order the play-state and tempo changes arrive in.
  • Light/Dark: the player reads the iPhone's Light/Dark setting from the screen's traits, because the app forces dark mode. In Dark the backdrop is a little darker; in Light it gets a white wash. The text and controls are unchanged.

  • Core: TrackInfo.bpm: Option<f64> is parsed from the v1 track JSON (bpm, nullable) and from the v2 API (0 means unknown). It is exposed on the FFI Track with a None default, so existing Swift and Kotlin constructors still compile. No extra requests: the field is already in the responses we download.

  • Cache: the Discover/Downloads track cache stores bpm; old cache files still decode.

  • Swift bindings: regenerated with uniffi-bindgen-swift. The C header is unchanged.

  • Version: iOS 1.3.0 (build 7).
  • No button, menu or control in the player changed.

    Testing

  • cargo test -p tonearm-core -p tonearm-ffi --locked passes, including a new bpm_is_none_when_unknown test.

  • The Swift code was not compiled; there is no Swift toolchain in the environment it was written in. The ios-build check compiles it and uploads the unsigned .ipa. The look was checked in a browser mockup that uses the same parameters.

  • To check on a device:

  • - Toggle Light/Dark in Control Center with the player open and confirm the backdrop follows.
    - Watch battery use with the player open while playing.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01F1yirR4QVZeoiUECrdfRZV

    Diff: 311 lines (+233 / -78) across 3 files Reviewer: github-actions[bot] Review duration: 7m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 311 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 92% · Reviewer familiarity: 35%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.344
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #72"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.7% · Lower = rushed or shallow review
    44.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.3% · Safe to merge
    22.3%
    Repository