Skip to content

Keep playlist and album scrollbars at their full length - #384

Closed
alexng353 wants to merge 4 commits into
crmne:mainfrom
alexng353:codex/finite-scroll-upstream
Closed

alexng353 wants to merge 4 commits into
crmne:mainfrom
alexng353:codex/finite-scroll-upstream

Conversation

@alexng353

@alexng353 alexng353 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Why

  • Album and playlist scrollbars grow as tracks load, so their size and position do not represent the finite collection. Users cannot drag directly to a distant track.
  • Matches behaviour with official client

What changed

  • Reserve Spotify's total track count immediately and fetch the visible 50-row window when scrolling. Reuse cached windows and keep loaded rows visible across page boundaries.
  • Preserve server positions for unavailable tracks, keep playback and playlist edits aligned, and show Retry for failed windows. Update pagination and cache documentation.

Verification

  • Linux: cargo fmt --check, cargo test --all-targets, cargo test --all-targets --all-features, and cargo clippy --all-targets with and without --all-features, both with -- -D warnings, passed on this upstream-based branch.
  • Regression tests cover direct jumps, overlapping windows, cache races, filtering, edits, unavailable tracks and retries. No signed-in Spotify, macOS or Windows testing.
  • Doctests, rustdoc, Node issue-assessment tests and Jekyll passed before changing the base to upstream/main.
  • Native demo below: 50 loaded tracks out of 1000. Captured against the original feature parent; additional themes/sizes and capture provenance are in docs/assets/finite-scroll/.
Before After
Before After
  • 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.
  • I understand and take responsibility for every submitted line, including AI-assisted code.

Co-Authored-By: GPT-6 Astra noreply@openai.com

alexng353 and others added 4 commits September 10, 2026 08:55
Reserve the full server row count and load cached windows at the visible position. Preserve null track slots and reject stale album windows.

Co-Authored-By: GPT-6 (OpenAI) <noreply@openai.com>
Co-Authored-By: GPT-6 (OpenAI) <noreply@openai.com>
Co-Authored-By: GPT-6 (OpenAI) <noreply@openai.com>
Co-Authored-By: GPT-6 (OpenAI) <noreply@openai.com>

@crmne crmne left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Playlist and album scrollbars now represent the full collection in f70231a, with distant loading, placeholders and Retry. The approved design, local checks and hosted Linux, macOS, Windows and Nix checks pass. Signed-in Spotify verification is not claimed. This has not been released yet. Thanks for the contribution.

crmne pushed a commit that referenced this pull request Sep 14, 2026
Load distant track windows on demand and retain unloaded server positions.
Preserve null rows, cached windows and edit snapshots; retry failed reads
without losing the collection extent or changing playback.

Co-authored-by: GPT-6 (OpenAI) <noreply@openai.com>
@crmne crmne closed this Sep 14, 2026
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.

2 participants