Skip to content

Restore current-track highlighting in sorted playlists - #1

Draft
oniivan wants to merge 2 commits into
mainfrom
codex/current-track-highlight
Draft

Restore current-track highlighting in sorted playlists#1
oniivan wants to merge 2 commits into
mainfrom
codex/current-track-highlight

Conversation

@oniivan

@oniivan oniivan commented Jul 28, 2026

Copy link
Copy Markdown
Owner

What changed

  • Mirrors Spotify’s green current-track title styling while Gem Sort’s internal sorted playback context is active.
  • Matches the exact playlist occurrence UID before falling back to track URI, avoiding duplicate-track mis-highlights.
  • Updates the visible marker on song changes and removes it when the sort or view is cleared.
  • Documents the behavior and bumps Gem Sort to v0.5.3.

Root cause

Gem Sort intentionally uses an internal playback context so Next and Previous follow the custom sort. Spotify’s native row component compares playback context identity against the playlist route, so it no longer applied its normal current-row styling.

Impact

Sorted queue behavior remains unchanged. The added work is limited to the currently rendered rows on a song change or an existing reconciliation pass; there are no new requests, full-playlist scans, timers, or persistent storage.

Validation

  • npm test — 34 tests passed.
  • npm run check — JavaScript and installer syntax passed.
  • Live Spotify verification on a 3,160-track playlist: the active title turned green, Next advanced from sorted row 4 to row 5, and the highlight moved with playback.
  • The installed extension checksum matched the repository source.

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