Commit graph

1477 commits

Author SHA1 Message Date
Broque Thomas
73bd2db547 Harden playlist pipeline source refresh
Centralize mirrored playlist source reference normalization so edited links and IDs are stored consistently. Preserve URL-backed refresh refs, surface missing-source refresh failures, count background sync failures in pipeline summaries, and retry guarded automation skips after a short delay instead of losing a scheduled run. Add focused coverage for source refs, mirrored playlist source updates, refresh failures, and guarded retry behavior.
2026-05-24 19:31:00 -07:00
Broque Thomas
93743119d9 Bump version to 2.6.1
Update the SoulSync base version, Docker release workflow default, and What's New notes so the next release surfaces as 2.6.1.
2026-05-24 15:44:58 -07:00
Broque Thomas
28641403d9 Fix Zustand shallow import
Use Zustand's public shallow selector export so the import page resolves correctly under the installed Zustand 5 package. This fixes the Vite boot overlay without changing import workflow behavior.
2026-05-24 14:47:29 -07:00
BoulderBadgeDad
29ba4e0049
Merge pull request #689 from kettui/refactor/more-native-links
Replace programmatic navigation with anchor links on issues & stats pages
2026-05-24 14:41:25 -07:00
Antti Kettunen
caa6534ee8
feat(import): show MusicBrainz variants
- pass release metadata through album search normalization
- surface release format, country, label, and disambiguation in React import cards
- add coverage for search normalization and import route rendering
2026-05-24 21:29:22 +03:00
Antti Kettunen
400d0dd48a
docs(import): align migration docs
- describe the implemented nested /import route structure
- document the route-local workflow store and stable draft state
- update testing, risk, and cleanup notes to match the current code
2026-05-24 21:17:22 +03:00
Antti Kettunen
e2a760bd68
fix(webui): keep import pages cache-aware
- keep the /import loader from turning transient staging fetch failures into route errors
- keep cached auto-import status and results visible during refetch failures
- show inline notices only when there is no stale data to fall back to
- add regression coverage for staging, status, and results failure paths
2026-05-24 21:17:22 +03:00
Antti Kettunen
a65fbfd532
refactor(webui): move badge into primitives
- move the shared badge primitive and styling out of the form component module
- keep primary-button badge styling working via a data-slot hook instead of a form-local class
- update the import pages and primitive tests to consume the new home for Badge
2026-05-24 21:17:22 +03:00
Antti Kettunen
9da8251e43
feat(webui): clarify import source metadata
- thread primary_source through album and track search payloads while keeping per-result source on the returned rows
- reuse the shared Notice primitive for fallback and error messaging in the import pages
- update the import route tests and shell route smoke coverage for the new behavior
2026-05-24 21:17:22 +03:00
Antti Kettunen
2a7c03f398
refactor(webui): merge primitives into one module
- fold Show and Notice into a single primitives module with one shared stylesheet
- keep the primitives barrel export intact while shrinking the folder footprint
- consolidate the primitive tests into one combined suite
2026-05-24 21:17:22 +03:00
Antti Kettunen
01a0333d7a
style(import): add separate styles for mobile 2026-05-24 21:17:21 +03:00
Antti Kettunen
7bd6e0ba09
feat(form): add ghost option variant
- Keep option buttons transparent by default and subtle on hover
- Use the ghost style for inactive auto-import filters so the active one stands out
- Keep OptionButton aligned with the existing button variant API
2026-05-24 21:17:21 +03:00
Antti Kettunen
5a227e3ace
test(import): use shared shell helper 2026-05-24 21:17:21 +03:00
Antti Kettunen
b4ca5efe39
refactor(form): use nested data selectors
- keep only semantic data attributes on the form primitives
- move variant styling into nested CSS module selectors
- preserve the existing visual treatment while simplifying the component layer
2026-05-24 21:17:21 +03:00
Antti Kettunen
e65ec37c9e
test(import): use MSW route handlers
- replace direct fetch stubs with shared MSW handlers
- keep fetch spying only for request assertions
- cover the shell prefetch with an issues counts handler
2026-05-24 21:17:21 +03:00
Antti Kettunen
7a0548ac94
refactor(import): normalize controls and classes
- let the singles action buttons use the default size again
- remove redundant type="button" props from import controls
- switch import page conditional classes to clsx object notation
- drop route-test assertions that pinned compact auto-import sizes
2026-05-24 21:17:21 +03:00
Antti Kettunen
9ba54bd82d
feat(form): add compact option groups
- add a size prop to OptionButtonGroup with a denser sm layout\n- use the compact filter group on the auto-import panel\n- keep the new size variants covered in form and route tests
2026-05-24 21:17:21 +03:00
Antti Kettunen
fccc03efef
feat(import): badge auto-import status 2026-05-24 21:17:21 +03:00
Antti Kettunen
934a612df3
feat(form): add select size variants 2026-05-24 21:17:21 +03:00
Antti Kettunen
0721a859a9
fix(import): keep count badge visible
- add a contrast override for badges inside primary buttons
- keep the singles process action aligned with the select/deselect row
- update import route tests for the new button label shape
2026-05-24 21:17:21 +03:00
Antti Kettunen
9f2c5c685b
refactor(import): simplify API failure handling
- rely on ky for transport errors across import/staging calls
- keep explicit soft-failure checks for auto-import approval endpoints
- add regression test for approval/rejection soft failures
2026-05-24 21:17:20 +03:00
Antti Kettunen
d32d88ea0e
refactor(webui): add shared badges to form kit
- add a reusable shared Badge primitive alongside the existing form controls\n- use it for the import auto-filter count pills and remove the route-local badge styles\n- tighten option button spacing so embedded badges read cleanly
2026-05-24 21:17:20 +03:00
Antti Kettunen
d066aba03d
refactor(webui): lean import buttons on shared styles
- move the import page over to shared button variants and option buttons
- strip route-local button chrome back to layout-only helpers
- keep the import route styling focused on layout, cards, and state indicators
2026-05-24 21:17:20 +03:00
Antti Kettunen
b78350a3e2
fix(webui): preserve import tab refresh URLs
- stop the legacy shell bootstrap from collapsing /import/auto and /import/singles back to the import root on reload\n- update the shell route smoke test to expect the canonical /import/album redirect for the bare import page
2026-05-24 21:17:20 +03:00
Antti Kettunen
ae0711f464
refactor(webui): theme shared import controls
- add a shared switch primitive for theme-aware toggle styling\n- keep import-page buttons leaning on shared variants instead of local color rules\n- simplify the singles and auto-import controls around the shared form layer
2026-05-24 21:17:20 +03:00
Antti Kettunen
af3d51c2ed
refactor(webui): theme import buttons
- add shared button variants and size controls backed by theme-aware styles
- move album import search controls onto shared button styling
- keep the import route layout-specific CSS limited to positioning
2026-05-24 21:17:20 +03:00
Antti Kettunen
0d7fb91d98
refactor(webui): share import form primitives
- add shared Base UI-backed checkbox and slider primitives under the form component layer
- move the singles import checkbox and auto-import confidence slider to the shared controls
- keep the import route tests aligned with the new accessible component roles
2026-05-24 21:17:20 +03:00
Antti Kettunen
aa86bedc6e
refactor(webui): key singles import state by file
- replace index-based singles selection and search state with stable staging file keys\n- keep refreshes from shifting selected rows or open search panels when files are inserted or reordered\n- add a regression test that proves selection stays attached to the intended file across refreshes
2026-05-24 21:17:20 +03:00
Antti Kettunen
89252cf6e4
fix(webui): refine import singles checkbox
- switch the singles selector to a real checkbox input for cleaner semantics\n- keep the mobile import page layout aligned while avoiding legacy button sizing\n- tune the checkbox tick so it stays visually centered and readable
2026-05-24 21:17:20 +03:00
Antti Kettunen
fe8ae8f290
fix(webui): restore import glyphs
- bring the React import page back in line with the legacy emoji/glyph treatment\n- restore album, singles, auto-import, and queue fallback icons\n- keep the visual refresh aligned with the old page while preserving the React port
2026-05-24 21:17:20 +03:00
Antti Kettunen
3fdc815794
fix(webui): show import refresh timestamp 2026-05-24 21:17:19 +03:00
Antti Kettunen
7853d0cfb8
chore(webui): remove legacy import feature js / css code 2026-05-24 21:17:19 +03:00
Antti Kettunen
27fbc80e7a
feat(webui): migrate import route to React
- Move import page, tabs, workflow state, and route tests into React-owned route slices
- Preserve shell gating, staging queries, album matching, singles matching, auto-import, and queue behavior
- Add migration plan snapshot so cleanup/refinement can build on a stable baseline
2026-05-24 21:11:40 +03:00
Antti Kettunen
5680e52ceb
refactor(webui): route stats interop through shell bridge
- move stats route legacy handoffs onto explicit SoulSyncWebShellBridge methods\n- stop relying on ad hoc window globals from React code for artist navigation and playback\n- update shell bridge tests and route test doubles to enforce the expanded bridge contract
2026-05-24 21:11:40 +03:00
Antti Kettunen
ff4c556257
feat(webui): migrate stats page to react
- move the stats route onto the React shell with Recharts-based visualizations
- remove the global Chart.js include and add a local stats seed script for easier testing
- keep parity coverage with route, API, and helper tests while preserving the legacy page layout
2026-05-24 21:11:40 +03:00
Broque Thomas
a3ba79a9ce Improve radio mode UI and behavior
Refactor and enhance the player radio feature: add npSetRadioMode, npQueueHasNext, and npEnsureCurrentTrackInQueue helpers to centralize radio-state changes and conditional radio fetch logic; replace direct npRadioMode toggles with npSetRadioMode in the expanded player and artist-radio flow (now awaits playLibraryTrack and triggers fetchIfNeeded). Add accessibility (aria-pressed) and label/pulse elements to the radio button, and update CSS for improved visuals and active-state animation. Also adjust toasts/messages and ensure the current library track is seeded into the queue when needed.
2026-05-24 11:02:19 -07:00
Broque Thomas
ccbe918808 Unify artist detail action buttons
Move the artist watchlist and discography actions into the main artist hero action row so they sit with Artist Radio and Enhance Quality. Apply a shared compact pill treatment for the hero actions while preserving the existing button IDs and click behavior.
2026-05-24 10:46:21 -07:00
Broque Thomas
9a0e3b4011 Persist completed downloads in downloads view
Include a capped recent tail of database-backed download history in the unified Downloads page so completed Deezer and other streaming downloads remain visible after runtime tasks are cleaned up or the container restarts. Use persistent download history for the dashboard finished count, keep live tasks authoritative for active rows, avoid showing the local clear-completed action for persisted history rows, and cover history hydration/deduping/capping in status tests.
2026-05-24 10:02:00 -07:00
Broque Thomas
4ca3f70bf3 Show MusicBrainz release variants in import
Expand matched MusicBrainz release groups into concrete releases for specific album searches so import users can choose the correct edition by track count, format, country, and disambiguation. Preserve distinct MusicBrainz release IDs instead of deduping same-title variants, carry release metadata through import matching, and surface those details on album result cards. Add coverage for variant preservation and release-group expansion.
2026-05-24 09:33:19 -07:00
Antti Kettunen
c9ac9aeb1a
refactor(issues): use Link to open/close issues 2026-05-24 18:16:18 +03:00
Antti Kettunen
81bdf4355f
refactor(webui): link stats artist chips
- replace manual artist-detail navigation with declarative anchors
- reuse the shared artist-detail helper for bubble and ranked views
- keep the no-id bubble fallback non-interactive
2026-05-24 17:05:58 +03:00
Broque Thomas
3ee77e3f44 Release 2.6.0
MINOR bump: Qobuz playlist sync is the headline feature (#677), plus
the Import album search fallback-source surfacing fix (#681).

* web_server.py — _SOULSYNC_BASE_VERSION → 2.6.0
* webui/static/helper.js — split the 2.5.9 'Unreleased — dev cycle'
  entries into a new 2.6.0 block with a real release-date marker;
  bumped the _getLatestWhatsNewVersion fallback default; rolled the
  '2.5.9 Release Stability Pass' modal section down to a generic
  'Earlier in v2.5' aggregator now that 2.6.0 is the current release
* .github/workflows/docker-publish.yml — bumped manual version_tag
  default to 2.6.0 so the next workflow_dispatch defaults right
2026-05-24 01:35:15 -07:00
Broque Thomas
3c0b6c6204 Cover missed Qobuz branches in Sync shared switches (#677)
Three follow-ups to the Qobuz playlist sync commit:

* webui/static/sync-services.js openYouTubeDiscoveryModal — the
  syncing-phase "start polling on modal open" switch was missing the
  isQobuz branch (the discovery-modal-close handler hit it but this
  earlier hook didn't). Resuming a sync after a page refresh would have
  fallen through to startYouTubeSyncPolling.
* webui/static/sync-services.js closeYouTubeDiscoveryModal — the
  per-service phase reset block had Tidal, Deezer, Spotify Public,
  Beatport branches but no Qobuz. After a Qobuz sync_complete or
  download_complete, closing the modal wouldn't reset the card phase
  back to 'discovered' or push the phase update to /api/qobuz/update_phase.
* web_server.py _emit_discovery_progress_loop — platform_states didn't
  include 'qobuz', so WebSocket discovery progress broadcasts were
  silently skipping Qobuz playlists. HTTP-poll fallback covers it but
  this puts Qobuz on equal footing with the other services.
2026-05-23 23:55:59 -07:00
Broque Thomas
a34eae1445 Add Qobuz playlist sync to Sync page (#677)
Qobuz joins Tidal and Deezer as a first-class playlist sync source.
New Qobuz tab on the Sync page lists user playlists + a virtual
Favorite Tracks entry, and clicks route through the same discovery →
sync → download pipeline the other services already use.

Backend:
* core/qobuz_client.py — new get_user_playlists, get_playlist,
  get_user_favorite_tracks, get_user_favorite_tracks_count. Returns
  normalized dicts (matches Deezer client shape, not Tidal's
  dataclasses) so the discovery worker can iterate directly without
  duck-typing. Virtual `qobuz-favorites` ID dispatches to favorites
  fetcher inside get_playlist — same trick Tidal uses with
  COLLECTION_PLAYLIST_ID. Both list endpoints paginate against
  Qobuz's 500-cap limit.
* core/discovery/qobuz.py — new worker module. Mirrors
  core/discovery/deezer.py: pause enrichment, iterate tracks,
  hit discovery cache, fall back to _search_spotify_for_tidal_track,
  build wing-it stub on miss, sync results to mirrored playlist.
* web_server.py — adds /api/qobuz/playlists, /playlist/<id>,
  /discovery/start/<id>, /discovery/status/<id>, /discovery/update_match,
  /playlists/states, /state/<id>, /reset/<id>, /delete/<id>,
  /update_phase/<id>, /sync/start/<id>, /sync/status/<id>,
  /sync/cancel/<id>. One-for-one with the Tidal + Deezer endpoint
  sets. Qobuz discovery executor registered for clean shutdown.

Frontend:
* webui/static/sync-services.js — full handler set (loadQobuzPlaylists,
  createQobuzCard, openQobuzDiscoveryModal, startQobuzDiscoveryPolling,
  startQobuzPlaylistSync, startQobuzSyncPolling, cancelQobuzSync,
  startQobuzDownloadMissing, rehydrateQobuzDownloadModal, etc.).
  Reuses the shared YouTube discovery modal via fake `qobuz_<id>`
  urlHash and is_qobuz_playlist flag. Shared switch statements in
  getModalActionButtons / generateTableRowsFromState / Wing It helpers
  in downloads.js gain new isQobuz branches alongside the existing
  per-service ones.
* webui/index.html — new Qobuz tab button + content div, slotted
  between Deezer and Deezer Link.
* webui/static/style.css — new .qobuz-icon for the tab icon.
* webui/static/core.js — qobuzPlaylists / qobuzPlaylistStates /
  qobuzPlaylistsLoaded globals.

Followed the existing per-service pattern verbatim rather than
refactoring the duplicated transformers across Tidal / Deezer /
Spotify-public / YouTube / Mirrored — that refactor is its own follow-up
PR per the "don't break Tidal/Deezer" scope discipline. Adding the 6th
copy of a proven pattern is lower risk than collapsing 5 working
services behind a new abstraction.

Tests:
* tests/test_qobuz_playlists.py — 12 tests covering pagination,
  normalization, favorites virtual-ID routing, artist-name fallback
  chain (performer → album.artist → 'Unknown Artist'), and
  unauthenticated short-circuits.
2026-05-23 23:27:36 -07:00
Broque Thomas
eba7f61e04 Surface metadata source on Import album results (#681)
Import album search silently fell through to the next source in
METADATA_SOURCE_PRIORITY when the configured primary returned zero
matches — intentional behavior shared with the auto-import worker
(see core/auto_import_worker.py:1316). With MusicBrainz selected and
a query MB couldn't resolve, users saw Deezer cards with no indication
their primary was bypassed.

Backend now echoes `primary_source` on /api/import/search/albums,
/api/import/search/tracks, and /api/import/staging/suggestions.
Frontend renders a per-card 'via {source}' badge when the served
source differs from the primary, plus a banner above the grid when
every card came from a fallback source. Fallback semantics unchanged.

Also collapses an inline duplicate of _renderSuggestionCard inside
importPageSearchAlbum into a single shared renderer.

Regression test pins the contract: response carries primary_source +
per-album source when the chain falls back.
2026-05-23 16:22:17 -07:00
Broque Thomas
94129d3099 Clarify hybrid source album behavior
Add dynamic level badges to the hybrid source order settings. The first enabled source shows Album-level only when it supports album-bundle downloads; every other source shows Track-level to make fallback behavior visible.

Update the helper copy and badge styling so users can understand why putting Soulseek, Torrent, or Usenet first changes album-download behavior.
2026-05-23 15:15:28 -07:00
Antti Kettunen
824b118759
refactor(webui): finish stats standalone handling in react
- render the standalone notice directly in the React stats header
- keep the legacy standalone sweep from hiding the stats control incorrectly
- update the stats route test and header layout to match the new behavior
2026-05-23 23:01:56 +03:00
Antti Kettunen
d0245e3e16
test(webui): share shell bridge test helper
- add a reusable shell bridge factory for legacy shell-backed tests
- trim route and bridge fixtures down to only the overrides they need
2026-05-23 21:23:33 +03:00
Antti Kettunen
fec66e4de8
feat(webui): expose shell status in root context
- add a shared shell client and root /status query
- attach shell status to the TanStack root context for React routes
- keep the shell bridge types and test setup aligned with the new status data
2026-05-23 21:23:32 +03:00
Antti Kettunen
ca84aa2e65
fix(webui): harden stats route fallback flows
- make listening status prefetch optional so /stats still renders on status failures
- normalize no-stats-yet cache responses into the existing empty stats state
- restore streaming fallback when library track resolution errors
- add route and API regression coverage for the review fixes
2026-05-23 21:23:32 +03:00