Skip to content

Preserve Library view state across sources and playlists #32

Description

@rianjs

Library view state

Status: approved; phase 1 in progress on feature/library-view-state.

Approved outcomes

  1. Playlist views provide a Back to current Library source action.
  2. Music, Podcasts, and Audiobooks preserve their own selected facet drill-down while switching sources and playlists.
  3. Playlist column visibility, order, and widths are independent per playlist, with no persisted override for defaults.
  4. Library default visible order: Track #, Song, Artist, Album, Time, Plays, Rating, Genre.
  5. Playlist default visible order: fixed Spotify order #, Song, Artist, Album, Time, Rating, Plays, Genre.
  6. Remove genre override dots.
  7. Music Uncategorized renders muted as No Genre; non-Music Uncategorized remains literal.
  8. UI navigation never replaces the playback queue; explicit play alone establishes it.
  9. Five separate commits, UI first, playback last.
  10. Update persistence/playback architecture docs where their contracts change.
  11. Add the smallest regression tests and run exact relevant checks.
  12. Later delivery uses one Terra-high TDD assessment and capped cr review loop; do not run those now.

Acceptance criteria

  • A playlist view has a full-width Back to Music, Back to Podcasts, or Back to Audiobooks action using the existing Spotify page-back visual language, and it returns to the current source's Library view.
  • Each source remembers its own category, artist, and album facet selections for the session. Changing source restores that source's selection; entering and leaving a playlist does not clear the active source selection.
  • A stale remembered facet follows the existing hierarchical fallback behavior and clears only the invalid level required by the resolved browse projection.
  • Search query and scroll position are not persisted as part of the view state.
  • Playlist column visibility, order, and widths are independent for each playlist and defaults have no persisted override.
  • Library and playlist columns match the approved default orders, including the playlist's fixed Spotify order column.
  • Genre override markers are absent; Music's Uncategorized displays as muted No Genre, while other sources retain literal Uncategorized.
  • Navigating sources, facets, playlists, and Spotify views does not replace the playback queue; only explicit play establishes it.
  • The delivery is split into five commits in this order: per-source Library navigation; per-playlist column layouts; genre marker removal; missing music genre display; playback queue independence.
  • Persistence and playback architecture documentation is updated in the same commit as any changed persistence or playback contract.
  • Focused regression tests cover non-trivial behavior, and the relevant frontend checks pass.

Commit sequence

  1. Preserve per-source Library navigation.
  2. Give playlists independent column layouts.
  3. Remove genre override markers.
  4. Display missing music genres consistently.
  5. Keep playback queues independent of navigation.

Phase 1 scope

  • Create the tracking issue with this complete approved outcome and acceptance-criteria set.
  • Create and switch to feature/library-view-state from the current HEAD.
  • Implement only commit 1 without committing, pushing, opening a PR, or starting later commits.
  • Keep saved facet selections session-only and keyed by Source; update them whenever sel changes.
  • Entering a playlist must not clear the active source selection. Selecting a source restores that source's selection.
  • Keep the existing stale-facet hierarchical fallback.
  • Add the playlist Back to current Library source action.
  • Do not persist query or scroll position.
  • Add focused tests using the existing frontend test pattern.
  • Run only the focused frontend tests and build needed for this slice.
  • Do not run the later Terra-high TDD assessment or capped cr review loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions