Skip to content

Upload playlist covers from Edit details - #329

Closed
dyd4dsh7 wants to merge 4 commits into
crmne:mainfrom
dyd4dsh7:playlist-cover-upload
Closed

dyd4dsh7 wants to merge 4 commits into
crmne:mainfrom
dyd4dsh7:playlist-cover-upload

Conversation

@dyd4dsh7

@dyd4dsh7 dyd4dsh7 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Why

Playlist details can be edited in Fastpotify, but changing the cover requires another app. This adds cover uploads using Spotify's existing Web API endpoint.

What changed

Feature, interaction, and renewed-consent scope remain pending a maintainer decision.

Visible changes: Edit details gains a cover preview, Change cover and Upload cover controls, busy feedback and retryable errors. The form scrolls when needed, keeping Save and Cancel visible. Upload cover saves artwork independently of Save, which still saves the existing details fields.

  • Select a JPEG or PNG with a native async picker. Bound file size and decoding, apply orientation, preserve aspect ratio, flatten transparency onto white, and encode below Spotify's 256 KB Base64 limit.
  • Send raw Base64 JPEG through the existing playlist mutation routing. Add ugc-image-upload consent and document shared sign-in and personal-app reconnection.
  • Protect picker and upload completions with request identities. Preserve the selected preview after errors and hold uploaded artwork until Spotify returns changed artwork URLs; then retire the override so later external edits can appear.
  • Add focused encoding, HTTP, routing, consent, cancellation, state and demo UI regression coverage, plus user and network documentation.

rfd supplies the cross-platform native picker. The branch incorporates upstream 0.7.0 and updates the Nix vendored-dependency hash.

Verification

Passed on macOS Apple Silicon, Rust 1.98.0:

node --test .github/scripts/issue-assessment.test.cjs
cargo fmt --all --check
cargo clippy --locked --all-targets -- -D warnings
cargo clippy --locked --all-targets --all-features -- -D warnings
cargo test --locked --all-targets
cargo test --locked --all-targets --all-features
cargo test --locked --all-features --doc
RUSTDOCFLAGS="-D warnings" cargo doc --locked --all-features --no-deps
# in docs:
bundle exec jekyll build

Both local test configurations passed 372 library tests and 5 binary tests; the 24 issue-assessment tests also passed. Coverage includes regressions for stale upload completions after reopening the dialog and old, confirmed, and externally changed artwork. Native live testing selected, previewed and uploaded existing artwork on a user-authorized owned playlist through the shared app. Authenticated Spotify image readback confirmed new artwork URLs and changed JPEG bytes. Cancellation state handling passed regression tests; native cancellation was not independently confirmed after the picker adjustment. Personal-app routing has automated coverage only. Linux and Windows were not compiled or run locally; cross-platform results are reported by CI.

All eight native before/after screenshots and reproducible capture harnesses. Captures use deterministic demo data at 1240 x 800 and 760 x 520 logical pixels, in both themes. Evidence is kept outside the implementation branch.

Theme and size Before After
dark, large Before After
dark, narrow Before After
light, large Before After
light, narrow 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.

Prepared and verified with Codex. The final contributor responsibility checkbox is left for human review.

@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.

Edit details now lets playlist owners choose a cover, preview it, and upload it separately. Integrated as de7c306 with your contributor credit after the approved visual review, native picker checks and green Linux, macOS, Windows and Nix CI. Available on main; not yet released. Thanks, @dyd4dsh7!

crmne added a commit that referenced this pull request Sep 14, 2026
Add native JPEG/PNG selection, bounded preparation and a separate upload
action with preview and actionable errors. Keep protected grants while
renewing image-upload consent and route uploads like other playlist edits.

Hold uploaded artwork through stale Spotify replies, reject late dialog
results, and prevent concurrent uploads for the same playlist.

Co-authored-by: Carmine Paolino <carmine@paolino.me>
@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