Today the startup orchestration skips the local session restore whenever
qconnectRuntimeActive — defensive against the visual flicker of seeing
the last local queue and then watching QConnect overwrite it. That left
QConnect users staring at "No track playing" while the WebSocket
bootstrapped, and the queue was effectively unrecoverable if QConnect
failed to push state.
Inverts the policy per #315: always restore the local snapshot. When
QConnect is bootstrapping at launch, the restore is held back behind a
1s flicker guard timer. The QueueUpdated event listener cancels the
timer if the remote queue snapshot arrives first — the user sees only
QConnect state, no flicker. If 1s elapses without a remote snapshot
(slow network, server hiccup, controller offline), the timer fires and
local restore proceeds so the user isn't stuck.
Two related wires:
- restoreLastView runs unconditionally now (view restore is unrelated
to playback source, shouldn't be gated on QConnect).
- The QConnect listener also calls debouncedFullSessionSave after a
successful QueueUpdated sync, covering the case where QConnect
reorders/replaces upcoming tracks while the current_track stays the
same — the track-change effect wouldn't fire, and without this hook
the local snapshot would drift behind remote.
Acceptance from issue #315: queue persistence on every mutation
(prior commit), QConnect state read at startup (already wired via
bootstrap_remote_presence → AskForQueueState → QueueStateChanged),
QConnect wins on divergence (cancel-guard makes this the typical
path), local-only path unchanged when QConnect is off (else branch).
The auto-advance / delete-timing guard logic in corebridge.rs and
commands_v2/playback.rs is untouched — the change lives in the route
component's restore orchestration, not in the QConnect runtime.
cc
The PersistedQueueTrack struct already had streamable and parental_warning
fields but the load path hardcoded streamable=true and parental_warning
=false because the columns didn't exist in queue_tracks. source_item_id
_hint was missing entirely.
Adds the three columns via the same idempotent ALTER-TABLE pattern the
existing migrations use, persists them in save_session, and reads them in
load_session. PersistedQueueTrack gains source_item_id_hint as an
Option<String> with serde default so saves from older builds deserialize
cleanly.
User-visible effect: a restored queue now keeps explicit-content badges,
unstreamable visual state, and Mixtape/Collection source-item ids
matching the live queue instead of resetting to defaults at every
launch. Backwards-compatible: columns get safe defaults for older rows
(streamable=1, parental_warning=0, hint=NULL) so users upgrading from
1.2.12 don't see a regression.
cc
The local session restore today saves the full queue only on track-change
(debounced 2s), pause, clear, the 15s playback tick, and app-close. Pure
queue mutations — add/addNext/setQueue/clearQueue/moveQueueTrack/
removeAfter/stop-after-consume — left the persisted queue stale until the
next track boundary, which meant a crash mid-album lost any tracks
queued after the playing one.
queueStore exposes registerQueueMutationObserver so the route component
can plug debouncedFullSessionSave into the mutation path without the
store knowing about session-save internals. Each mutator that funnels
through syncQueueState now also calls notifyMutation, the observer
coalesces via the existing 2s debounce, and the SQLite write happens on
the same path the track-change save already uses (single source of
truth, idempotent on rapid mutations).
The cursor-only mutators (next/previous/playQueueIndex) intentionally
do NOT notify — they are already covered by the track-change effect at
+page.svelte:5055 which saves on current_index change.
cc
The /track/getList endpoint caps at 50 IDs per call. Sending more in a
single POST either errors out or silently truncates, both of which take
the entire call site down.
For QConnect this surfaced as: pushing a >50-track playlist from the
Qobuz Android app to QBZ caused the materialization step (corebridge
get_tracks_batch hydration) to return an error, abort, and leave only
the 1-track placeholder queue from the earlier align-cursor pass. The
visible symptom was "only the first track loads on Connect playlists
above 50 tracks".
The fix is at the helper level rather than in QConnect: split inputs
larger than 50 into 50-ID windows fetched serially, preserve input
order in the returned Vec. Single-window path is unchanged for the
common case. Same return shape, same error type, so the four call
sites (corebridge.materialize_remote_queue, qbzd qconnect, V2
v2_get_tracks_batch, qbzd catalog) all benefit transparently without
edits to QConnect orchestration code (auto-advance, deletion timing,
queue ordering are untouched).
Serial loop instead of the concurrent fan-out used by get_playlist —
lower risk for the first fix; if QConnect playlists of 200+ tracks
start feeling slow we can revisit with try_join_all.
cc
Clearing the error flag also drops any pending stream_error_message.
A fast record_stream_error -> set_stream_error(false) -> polling-tick
sequence will silently swallow the toast — that is the intent (a
recovered error is not user-actionable), but it surprises future
readers, so document it inline.
Follow-up to #418 (karaoke playback overhaul). In CPU mode the
background-clip: text repaint plus the per-frame --line-progress
interpolation that drives the gradient stop are both costly under
software compositing. Immersive already swaps the gradient for solid
white (kept), but sidebar/static/compact surfaces still ran the
expensive path.
Adds a global override under html.no-hwaccel that zeroes the gradient,
restores a solid accent color, and kills the --line-progress transition.
Active-line emphasis still reads via the font-size/weight/scale from
.lyrics-line.active, which is unchanged. The immersive solid-white rule
keeps winning on specificity (0,0,5,0 vs 0,0,4,1), so this only takes
effect on the non-immersive surfaces where the gradient was the cost.
cc
Adds a tri-state Select-All checkbox in the Tracks tab toolbar of
FavoritesView, mirroring the local-library tracks tab. State is computed
over the currently filtered tracks so genre/search filters narrow the
selectable set, matching user expectation for the visible-set semantics
established in #381.
cc
Completes the multiselect rollout in LocalLibraryView and the folder/album
view:
- Select-All checkbox in the folder-album track listing, mirroring the
tracks-tab toolbar pattern.
- Shift-click anchor and ctrl-a effect for track rows in the folder-album
view.
- Cross-context mutual exclusion ("apagador") between tree-select,
album-select, track-select and the folder-album view's selection mode:
entering any context clears the others' selections and turns off their
selection mode, so two contexts cannot be active simultaneously.
The mutex is plumbed via parentSelectionActive prop + onSelectionEntered
callback between LocalLibraryView (orchestrator) and the
LocalLibraryFolderAlbumView child, matching the simpler single-switch
mental model the user requested.
cc
subscribeLyrics fires per rAF tick (~60Hz with extrapolation). The
previous version wrote all six $state slots unconditionally, which
re-triggered the lyricsSidebarLines $derived (a .map allocating N
objects per call) every tick even though lyricsLines itself only
changes per-track. Adding reference/value guards short-circuits the
fan-out for unchanged fields — the per-tick path now only writes
lyricsActiveProgress (and sometimes lyricsActiveIndex).
Two related fixes to the active-line rAF loop:
- The previous guard reassigned updateRafHandle *after* updateActiveLine
returned. Any listener that synchronously re-entered
startActiveLineUpdates during notifyListeners() saw a null handle and
scheduled a second parallel rAF chain. Now the handle is claimed
before the work runs, so re-entry is a no-op.
- Drops the inter-tick progress threshold. With playerStore extrapolating
audio time between backend events, every rAF tick has a freshly-changed
progress value. Threshold-throttling would skip the edge samples where
the snap-to-1 and indexChanged transitions need to land — re-introducing
the "starts midway"/"ends before 100%" bugs. Downstream consumers
equality-guard their $state writes, so fan-out only fires on real
changes.
The Rust backend emits playback:state at 250ms cadence. Frontend
getCurrentTime() was returning that staircase value — for the karaoke
rAF loop running at 60Hz, every 15 frames got the same answer, then a
250ms jump. This caused two visible artifacts:
- Active line appears to "start midway" when detection of the new index
lags by up to 250ms past the line's timeMs (audio is already that far
into the line by the time we see the boundary).
- Active line gets demoted before its highlight reaches the end, because
the last in-line notification reports progress ~0.92 (one tick before
bound) and the next backend tick has already crossed into the next
line — the snap-to-1 never gets a chance to fire.
Audio position is wall-clock-based on the backend (see the 250ms emit
loop comment in lib.rs); we now do the same math in JS: anchor
(positionSecs, performance.now()) on every event-driven update, then
return anchor + elapsed while playing. Cap extrapolation at +1s so a
stalled backend doesn't run away. Existing 33 playerStore tests pass
unchanged — they read currentTime directly, not getCurrentTime().
Pre-pretext, the karaoke gradient applied to a single span shared the same
horizontal cut across every wrapped visual line — line 2 appeared partially
sung when only line 1's worth of vocals had played. Pretext lays out the
active lyric into visual lines; each renders as its own block-level span
with its own 0->100% gradient, so progress fills sequentially.
Also adds race/perf safeguards layered on top:
- Cancellation token on tick().then(layoutActiveLine) so rapid activeIndex
changes (seek-scrub, fast songs) don't queue stale microtasks against
the current DOM.
- ResizeObserver coalesces via rAF and ignores sub-pixel width deltas, so
window-drag and the active-line scale animation don't trigger Pretext
re-measurement every callback.
- segmentBounds prefix array memoizes cumulative widths, dropping per-
segment progress lookup from O(i) to O(1) inside the each-block.
- EMA writes equality-guard measuredBlockMs/Delta and lookaheadEnabled so
Svelte signals don't fan out no-op updates 60 times per second.
- Lookahead clamped at 1/30 and disabled on backward dp so a coarse audio
jump or in-line seek can't poison the visual lead.
- measuredBlockMs seed lowered (>=20ms, dur * 0.01) since rAF-rate data
converges the EMA within 2-3 ticks; the prior 80ms floor visibly lagged
the gradient on the first frame of every new line.
- LyricsLine type unified from store (single source of truth).
Listen for the backend audio:init-failed event and show a user-facing
error toast (8s) with the backend-provided cause. Mirrors the
audio:device-missing listener pattern alongside it. Surfaces the
silence when macOS CoreAudio init fails, instead of leaving the user
guessing why playback didn't start.
Add localized strings for the new backend audio init failure toast
(en, de, es, fr, pt). Reason placeholder receives the backend's
already user-friendly message (e.g. "macOS audio device changed its
sample rate during stream open...").
The playback-event polling loop now drains
SharedState::take_stream_error_message and emits a Tauri
audio:init-failed event with the user-readable cause. Drain semantics
guarantee the toast fires exactly once per error instead of every
tick of the polling loop.
Pairs the existing stream_error AtomicBool with an Option<String> that
the audio thread can populate when a stream init failure has a
meaningful cause to surface to the user (currently: the macOS
CoreAudio rate-mismatch path).
set_stream_error(false) also clears the message; record_stream_error
sets both atomically; take_stream_error_message drains so the UI
fires its notification exactly once per error.
evaluate_stream_recreate runs on every track change on the audio
thread, and each call issued two HAL syscalls
(resolve_output_device_id + get_nominal_sample_rate). Cache the result
per-thread for 750ms — long enough to absorb the bulk of repeats
within an album, short enough to notice a system rate change.
Cache invalidates on device-name change, so switching the output
device still triggers a fresh query.
Comprehensive set of changes that make immersive mode usable on
machines without hardware-accelerated GPU compositing (Wayland NVIDIA
with the broken driver path, software-rendered llvmpipe, VMs, etc.).
Detection lives in `graphicsState.ts` — when `bootstrapGraphicsState()`
resolves and `hardware_accel_enabled` is false, we add an
`html.no-hwaccel` root class. Every CPU-mode rule below gates itself
on that class so GPU users see zero change.
Chrome-level work (ImmersivePlayer wraps every panel):
- Blanket CSS rule on `.immersive-player` and descendants kills
every `transition`, `animation`, `box-shadow`, and `text-shadow`.
Box-shadows with 32-60px blur radii were the dominant per-frame
cost — confirmed game-changer when stripped (user-tested on
Visualizer with `0 8px 32px + 0 20px 60px` halo around the
artwork).
- `.player-bar`, `.window-menu`, `.tabs`, `.viz-dropdown`,
`.viz-submenu`, and the quality-badge backdrop become opaque
`#000` and drop `backdrop-filter` (40px / 16px / 12px blurs).
- Whitelisted animation exceptions: the 4-bar equalizer in
Coverflow's now-playing indicator (4 x 3px scaleY, basically
free) and `fadeInUpLite` for LyricsFocus line changes
(opacity + transform only, no `filter: blur`).
Per-panel LOW_PROFILE flag (captured from `isHardwareAccelEnabled()`):
- Oscilloscope: skip `shadowBlur: 8` glow, fake with fat-underlay
+ thin-opaque stroke pair; force dpr=1.
- Lissajous: skip shadowBlur: 6 with same trick, trail 8 -> 3
frames, drop the 85-fillRect-per-frame dot cloud, hide the
blurred watermark, dpr=1.
- EnergyBands: drop per-band energy-driven shadowBlur (up to
~20px x 5 rings); halo-arc + ring trick; dpr=1.
- Visualizer: taller cubes (14px vs 6px, half the count per bar);
drop the per-cubelet gradient entirely so the whole frame uses
a single `fillStyle`; dpr=1.
- Coverflow: snap side-cover transitions (only `.center` keeps
its 500ms transform); neutralize hover transforms on side
covers (rotateY + scale 1.05 forces re-rasterization under
software perspective); side covers go to opacity:1 so they
don't pay alpha compositing.
LyricsLines split mode in immersive: restore line transitions for
opacity, color, and transform (all compositor-only). Skip the
font-size transition because that one forces re-layout per frame.
New per-panel enable/disable store (`immersivePanelsStore.ts`):
- localStorage-backed `Record<ImmersivePanelId, boolean>`.
- In CPU mode the five inherently-heavy panels default to
disabled: AlbumReactive, NeonFlow (Laser), TunnelFlow,
CometFlow, TransientPulse. These rely on shaders, particle
systems, or dense per-pixel filter passes that simply cannot
work in software compositing.
- `applyCpuModeDefaultsIfNeeded()` re-applies defaults after
`bootstrapGraphicsState()` resolves, so first-launch CPU users
don't have to relaunch to see the heavy panels hidden. Wiring
lives in `bootstrap.ts` to avoid a circular import between
the store and graphicsState.
- ImmersiveHeader filters the visualizer dropdown and Neon
submenu by enabled state; if all three Neon variants are off,
the submenu item disappears entirely. The `Visualizer` main
tab falls back to the first enabled viz option instead of
hardcoded spectral-ribbon.
First-time CPU-mode warning modal (`CpuModeWarningModal.svelte`):
- Built on ModalLite. Triggered from `+page.svelte` via $effect
when immersive opens, HW accel is off, and the user has not
dismissed the warning before. Disarmed for the rest of the
session after fire.
- "Don't show again" checkbox writes
`qbz-cpu-mode-warning-shown-v1` to localStorage when checked.
- Explains which panels are hidden and points to Settings ->
Appearance -> Composition and -> Immersive Panels.
Settings UI: new "Immersive Panels" collapsible section above the
existing "Immersive FPS" section in Settings -> Appearance. Per-panel
toggle, with a GPU badge + warning paragraph on the five heavy panels
when running in CPU mode.
QualityBadge unification (out of CPU-saver scope, addressed in same
branch by user request): every immersive callsite that previously
used the reactive `QualityBadge` (compact or full) now renders
`QualityBadgeStatic` — the same component used in Collection /
Mixtape detail lists. Sixteen callsites total: nine canvas panels
(compact mode), five center-content panels (full mode), plus
ImmersivePlayer split mode and ImmersiveControls. `QualityBadgeStatic`
gains `text-align: start` on its `.badge-text` block so it renders
correctly inside parents that center their content (VisualizerPanel,
StaticPanel, etc.).
i18n: new keys for `settings.appearance.immersivePanels.*` (title,
summary, desc, cpuWarning, heavyTooltip, warningModal.{title,body,
hint,dontShowAgain,acknowledge}) across en/es/de/fr/pt.
cc
User request: show the album cover thumbnail next to each track in
the Local Library Tracks and Folders list views (same UX the Qobuz
tracks and playlist views already offer).
Default OFF per the 2026-05-12 user call: a library with 16k+ local
tracks would render that many decoded images per scroll session,
and the user shouldn't opt into that without knowing. The setting
lives in `libraryPerformanceStore` (`showTrackArtwork: false` by
default) alongside the other library-perf knobs.
Frontend wiring:
- `libraryPerformanceStore.ts` — new `showTrackArtwork` field,
`isTrackArtworkEnabled()` getter, plumbed through `updateSetting`.
- `LocalLibraryView.svelte` — subscribes to the store, passes
`showArtwork={showTrackArtwork}` and a
`getArtworkUrl={(track) => getArtworkUrl(track.artwork_path)}`
bridge to `VirtualizedTrackList`. `VirtualizedTrackList` and
`TrackRow` already supported these props (used by Playlist
detail view).
- `SettingsView.svelte` — new toggle in Appearance, next to the
"Show playlist cover collages in sidebar" toggle. Uses the same
Toggle component and same persistence pattern.
i18n: new `settings.appearance.localLibraryTrackArtwork` +
`settings.appearance.localLibraryTrackArtworkDesc` keys across all
five locales.
cc
User-reported: Local Library Albums view showed the folder name as
the album title even when the album tag in the track metadata had
a different value — e.g. folder `Alle Songs` shadowed metadata
`ALBUM.`. Cause: the three metadata-grouped album queries (full-load
`get_albums_metadata_grouped`, chunked `get_albums_metadata_page`,
and `count_albums_metadata_for_page`) projected the title via
`COALESCE(album_group_title, album, 'Unknown Album')`.
`album_group_title` is the snapshot the scanner wrote — it
contains the tag's album when the tag was present at scan time,
otherwise the folder name. So whenever a tag was missing or
changed after scan, the folder name would win over the live
`album` column.
Fixed the priority by querying `album` first and falling back to
`album_group_title` only when the live metadata is empty / NULL /
'Unknown Album':
COALESCE(
NULLIF(NULLIF(TRIM(album), ''), 'Unknown Album'),
album_group_title,
'Unknown Album'
)
Folder-grouped queries (which use `album_group_key` first and
intentionally prefer folder-derived titles) are unchanged.
Closes#411
cc
Two related bugs surfacing after the AlbumCardLite migration in
Search > Albums:
1. `albumGridCols` over-computed the column count because the
constant `ALBUM_CARD_WIDTH = 210` was stale — AlbumCardLite is
actually 220px wide post-migration. The math thought N+1 cards
fit per row when only N did, the last card per row wrap-around
to a visual second line inside the same virtual-scroll-item,
and visually piled on top of the next virtual row's cards.
Bumped the constant to 220.
2. `AlbumQuickMenu` (the kebab popover) used `position: fixed` but
was rendered inline inside the card, which lives inside the
virtual scroller's `transform: translateY(...)` wrapper. Per the
CSS spec, `position: fixed` resolves relative to the nearest
ancestor with a transform, not the viewport — so the menu
opened way off where the user clicked. Added a small `portal`
action that appends the menu to `document.body` on mount,
keeping it in viewport coordinates regardless of where the
trigger lives in the tree.
Bonus: reverted the speculative `contain: paint` on `cover-wrap`
from 5045096e — that was attacking the wrong symptom (the user
reported the issue was rooted in #1 above, not in cover-image
clipping). `contain: paint` would add a per-card layer cost under
SW compositing without buying anything now that the real cause is
fixed.
cc
Third pass at the SearchView > Albums overlap bug. `overflow: hidden`
+ `position: absolute; inset: 0` on the img weren't enough to keep
some artwork inside the 220x220 box — the `cachedSrc` action applies
`transform: translateZ(0)` to the img under HW acceleration (the
WebKit 2.50+ texture-eviction workaround) and the composited layer
that creates can escape the parent's clip rect in certain layouts.
`contain: paint` on the parent forces it to be a paint containment
boundary at the rendering-layer level — anything painted by
descendants, composited or not, gets clipped to this box.
cc
Two cleanups in one:
1. Cover img positioning. User reported some portrait-aspect album
artwork in Search > Albums was visually escaping cover-wrap's
`overflow: hidden` and bleeding upward into the row above. The
img was `width: 100%; height: 100%; object-fit: cover` but in
normal flow, while `cachedSrc` applies `transform: translateZ(0)`
to it under HW acceleration (the WebKit 2.50+ texture-eviction
workaround). Combined, the transform was lifting the img into
its own composited layer in a way that escaped the parent's
clip box for some configurations.
Fix: `.cover` (and `.cover-placeholder`) are now
`position: absolute; inset: 0`. Same containment pattern
AlbumCardLibraryLite already uses; strictly bounds the painted
image to the 220x220 cover-wrap box regardless of any transform
the image carries.
2. HomeView.svelte and ForYouTab.svelte are deleted. They were
legacy /home renderings that DiscoveryView (Discovery V2)
replaced — `+page.svelte` only mounts DiscoveryView under
`activeView === 'home'`, and the only remaining `HomeView` and
`ForYouTab` references were the two files referencing each
other. The legacy `AlbumCard.svelte` (used only by those two)
goes with them. `AlbumMenu.svelte` stays for now — `AlbumDetailView`
and `PlaylistDetailView` still use it for page-header menus.
cc
User-reported visual bug after the AlbumCardLite migration: some
album covers in Search > Albums appeared to overlap into the row
above. The `.albums-grid-row` flex container used the default
`align-items: stretch`, which stretched each wrapper to the tallest
card in the row. With AlbumCardLite's optional Hi-Res pill the
rows had heterogeneous heights, and stretched wrappers let the
absolutely-positioned cover from neighbouring cards visually
encroach on previous rows.
Two clamps:
- `align-items: flex-start` on `.albums-grid-row` — every card's
cover top-aligns to the row baseline.
- `width: 220px` on `.album-card-wrapper` (replaces the old
`min-width: 160px`) — matches AlbumCardLite's intrinsic width
exactly, no flex stretch room left.
cc
Profile C path (purchased albums grid). Reused
`AlbumCardLibraryLite` rather than the full AlbumCardLite because
Purchases never needs favorites, the genre overlay, the menu, or
the artist link — it's a read-only grid of bought albums that
either click through (downloadable) or render as unavailable.
The legacy passed a formatted purchase date through the
`releaseDate` slot. AlbumCardLibraryLite doesn't surface a date
field; the purchase date is recoverable from the album detail
page, so the surface loses one secondary cue but stays
functional.
The remaining legacy `AlbumCard.svelte` callers are now only
`HomeView.svelte` and `ForYouTab.svelte`, both Discovery V2
replacement candidates that are slated for deletion once parity
is signed off.
cc
FavoritesView (3 inline grid callsites, one per Discography / EPs &
Singles / Live Albums section per the in-favorites artist-detail
layout) and VirtualizedFavoritesAlbumGrid (one callsite inside the
virtualizer's grid-row branch) both swap to AlbumCardLite. Same
`makeArtistClickHandler` pattern as the other Profile B views.
Same prop drops + renames as before.
cc
Three more Profile B views swap to Discovery V2's AlbumCardLite:
- AwardView: single discography grid; `makeArtistClickHandler`
pattern for the per-album artist link.
- AlbumDetailView: the Related Albums section renders cards for
other albums by the same artist. `onArtistClick` closes over
the page's main `album.artistId` (all related albums share
it). All the relatedAlbum-prefixed handlers route through the
Lite props with the same per-album closures.
- ArtistsByLocationView: three identical-shape grids (Discography
/ EPs & Singles / Live Albums) — slim invocation, no menu
actions, just `onClick` + `onPlay`.
Same prop drops + renames as the earlier migrations.
cc