Skip to content

Fade the play button's spinner in - #1422

Open
shrddr wants to merge 1 commit into
crmne:mainfrom
shrddr:play-spinner-fades-in
Open

shrddr wants to merge 1 commit into
crmne:mainfrom
shrddr:play-spinner-fades-in

Conversation

@shrddr

@shrddr shrddr commented Nov 25, 2026 •

Copy link
Copy Markdown

Why

8bc9f2c "Every play button spins until Spotify visibly reacts" - the intention is good: the button shows immediately that the click was received and is being acted on. But when Spotify answers quickly, the spinning state lasts only a few frames. In a 120 fps screen recording of play/pause with Soloist, the spinner was on screen for 4 frames (33 ms). At that timeframe, it is not recogniseable as a spinner. The full-length arc appears abruptly and is gone immediately after, so it shows up as an unexplained flicker between the Play and Pause icons. The feedback meant to reassure ends up looking like a rendering glitch.

What changed

theme::circle_spinner, the spinner shown while a play (or pause) is pending, now fades its arc in instead of drawing it at full strength on the first frame:

  • The arc fades in from invisible to full strength over motion::ANIMATION_TIME (120 ms), the app's standard animation time.
  • When Spotify answers, the button immediately switches to intended state and the arc is gone the same frame, as before.
  • Each new wait fades in again from nothing.
  • The general theme::spinner (loading screens, dialogs, device lists) is unchanged.

A fast response now leaves at most a faint grey ring for a couple of frames. A slow answer, such as waiting for missing audio key, still shows the full spinner after 120 ms.

The reduced motion OS setting is not considered in this change. The spinner already spun regardless of it, and only the arc's opacity changes now.

Verification

New tests in theme::tests:

  • a_play_spinner_fades_its_arc_in: the arc is invisible on the spinner's first frame, faint at 60 ms, and fully drawn from 120 ms on.
  • a_play_spinner_starts_over_after_the_button_returns: a spinner that was gone for a frame starts invisible again.

Run locally on Windows 10 (x86_64) without the milkdrop feature:

  • cargo fmt --all --check: clean.
  • cargo test --locked --all-targets --no-default-features --features soloist-native-audio,soloist-preview,demo: all pass (1,837 library tests with 5 ignored, 17 binary tests, and every integration test target).
  • cargo clippy with the same features: no warnings in src/theme.rs. Its only errors are unused code that only the milkdrop feature uses (app.rs, demo.rs, milkdrop.rs, ui/lyrics.rs, ui/winamp/wmp.rs). CI builds with it.
  • Ran the app on Windows with Soloist as the player and toggled play/pause, recording at 120 fps.

Not tested locally: Linux, macOS and the --all-features / milkdrop builds. I'm relying on CI for those.

120fps screen recordings + extracted frames

Before
image

After
image

  • I read CONTRIBUTING.md and kept this pull request to one concern.
  • I added or updated tests for behaviour that can regress.
  • I ran formatting, Clippy, and the relevant tests locally.
  • I updated documentation for user-visible behaviour, settings, files, or network access. (No change needed: "The button spins until Spotify responds" is still accurate.)
  • Screenshots, captures, and recordings are attached here, not committed.
  • This adds no setting, or the maintainer approved it in the linked issue (see "Settings" in CONTRIBUTING.md).
  • Dependencies come from crates.io or github.com/crmne repositories, and the maintainer approved any added or changed git source.
  • I understand and take responsibility for every submitted line, including AI-assisted code.

Summary by CodeRabbit

  • New Features
    • The loading spinner now fades in smoothly instead of appearing at full strength. If it disappears and later returns, the fade-in starts again. This provides a consistent visual transition both when the spinner first appears and when it reappears.

Play buttons spin until Spotify visibly reacts. When Spotify answers
quickly, the spinner showed for only a few frames (3 frames, about 25 ms,
in a 120 fps recording of play/pause with Soloist). That is too short to
be read as a spinner: the full dark arc flashed across the disc and
looked like an unexplained flicker between Play and Pause.

The arc now fades in over the app's animation time (120 ms), so a fast
answer leaves only a faint trace while a slow one still shows the whole
spinner. It is still gone the frame the button returns, and each wait
fades in again from nothing. The general spinner on loading screens is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

circle_spinner now fades its arc in over ANIMATION_TIME. Temporary context data tracks the start time and last-seen frame. Tests cover the fade progression and confirm that the fade restarts after the spinner is absent for a frame.

Changes: Spinner fade-in

Layer / File(s) Summary
Track and apply spinner fade
src/theme.rs
circle_spinner scales the arc alpha by a tracked strength. The strength starts at zero when the spinner appears or returns after a missing frame, then increases over ANIMATION_TIME. Tests check initial, partial, and full opacity, and the restart behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

Suggested reviewers: crmne

Merge Risk: Minimal · up to 4c361

The play button's pending spinner now fades in over 120 ms instead of flickering. The change is small and localized, and it is covered by tests. No merge-blocking risk was found.

Pre-merge checks: Passed 7

Check name Status Explanation
Title check Passed The title "Fade the play button's spinner in" names the main change: the play/pause spinner arc now fades in instead of appearing at full strength. It is short, specific, and matches the raw summary a…
Description check Passed The description covers the required template sections. Why explains the flicker problem with the 4-frame spinner at 120 fps. What changed describes the fade-in of circle_spinner over 120 ms and the un…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Review Evidence Stays Out Of The Repository Passed The changed-file inventory for the reviewed range (refs/coderabbit/pre-merge-check/base..head) contains one entry: M src/theme.rs, with 83 insertions and 1 deletion. The pull request adds no screens…
Dependencies From Sources The Maintainer Controls Passed The check fails only if the pull request makes a dependency come from a git URL, fork, patch, override, replace entry, or other non-approved registry in a manifest, lockfile, or package manager config…
No New Settings Without Approval Passed The check fails only when the PR adds a user setting (for example, a new field in a Settings struct, a toggle, a slider, or a Settings view option). The changed-file inventory for refs/coderabbit/pre-…
Full details: Title check

Explanation

The title "Fade the play button's spinner in" names the main change: the play/pause spinner arc now fades in instead of appearing at full strength. It is short, specific, and matches the raw summary and PR objectives, which describe the fade over motion::ANIMATION_TIME for circle_spinner.

Full details: Description check

Explanation

The description covers the required template sections. Why explains the flicker problem with the 4-frame spinner at 120 fps. What changed describes the fade-in of circle_spinner over 120 ms and the unchanged general spinner. Verification lists the commands run on Windows 10, the new tests, the Clippy result, untested platforms, and attached before/after recordings. All eight checklist items are ticked. The description does not link an issue, though the template asks for one if it exists, and the author does not say whether one exists. This gap is minor.

Full details: Review Evidence Stays Out Of The Repository

Explanation

The changed-file inventory for the reviewed range (refs/coderabbit/pre-merge-check/base..head) contains one entry: M src/theme.rs, with 83 insertions and 1 deletion. The pull request adds no screenshots, captures, recordings, comparison pages, or other media files to the repository. The before/after recordings and frame images cited in the PR description are hosted as GitHub user attachments and are not committed. The check therefore passes because the pull request adds no review evidence to the repository.

Full details: Dependencies From Sources The Maintainer Controls

Explanation

The check fails only if the pull request makes a dependency come from a git URL, fork, patch, override, replace entry, or other non-approved registry in a manifest, lockfile, or package manager configuration. The reviewed range changes one file: src/theme.rs (status M). The diff touches no Cargo.toml, Cargo.lock, or .cargo configuration. No dependency source changes, so nothing in the pull request violates the check.

Full details: No New Settings Without Approval

Explanation

The check fails only when the PR adds a user setting (for example, a new field in a Settings struct, a toggle, a slider, or a Settings view option). The changed-file inventory for refs/coderabbit/pre-merge-check/base..head lists a single modified file, src/theme.rs (M). A search of the added lines for settings-related identifiers (Settings, setting, toggle, slider, and public bool/numeric/String/Option fields) found no matches. The PR description also states that it adds no setting and that the reduced-motion setting is not considered. The PR changes an internal animation of the play button spinner (a fade-in over motion::ANIMATION_TIME) and adds tests. It does not add a user-facing option, so the check does not apply and passes. Provider-reported PR #1422 (crmne/spotifast, author shrddr) was confirmed.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Fix failing CI checks

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between eaaf3c6 and 4c361eb.

Files selected for processing: 1

  • src/theme.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@chat-with-work
chat-with-work Bot requested a review from crmne November 25, 2026 14:28
@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The change appears safe to merge.

Summary

The play button’s spinner now fades in over 120 ms instead of appearing at full strength immediately.

  • Play-button spinners fade their arc in over 120 ms.

Acknowledged choices:

  • shrddr explicitly leaves reduced-motion support outside this change because the spinner already rotates regardless of that preference.
  • shrddr states that no documentation update is needed because the existing description, “The button spins until Spotify responds,” remains accurate.

Reviews (1) · Last reviewed commit: "Fade a play button's spinner in" · Reviewed by Greptile

@chat-with-work
chat-with-work Bot removed the request for review from crmne November 26, 2026 06:21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant