Acquire org.freedesktop.ReserveDevice1.Audio<N> before opening the PCM,
hold for the entire stream lifetime, release on Drop after the PCM
closes. Closes the path where exclusive open would silently fight an
active PipeWire route.
Field order in AlsaDirectStream is significant: _reservation is the
last field so it drops AFTER the PCM closes, ensuring the kernel-level
exclusive lock is released before the D-Bus bus name is freed and
PipeWire reclaims the device.
This is the canonical Lifetime-A consumer the device_reservation
acquire doc-comment's tight-coupling rule allows: a DeviceReservation
created immediately before a real PCM::new() and held for as long as
the PCM is open. A 50 ms defensive sleep gives PipeWire time to vacate
the device after releasing the reservation.
cc
- Document the load-bearing tight-coupling rule on acquire(): never
construct a DeviceReservation without an immediate device consumer.
Cambridge DacMagic Plus was stranded by a standalone reservation
churn during initial Task 2 smoke testing on 2026-05-07.
- Document the Connection lifecycle: zbus does not pool session-bus
connections, so acquire() pays a SASL handshake per call. Task 5
will add acquire_with_connection() to reuse a long-lived bus.
- Refactor resolve_contention to open a single holder Proxy and read
Priority + ApplicationName through it, instead of opening two.
- Specificity polish on the QBZ_APPLICATION_NAME dead-code comment;
defensive-InQueue comment; release_name From-chain comment;
clippy doc-list-overindentation fixes.
No behaviour change.
cc
Implements the full priority-resolution algorithm: request bus name
with DO_NOT_QUEUE; on EXISTS look up holder Priority via the
Properties interface; if our priority (5) is higher, call
RequestRelease and retry with REPLACE_EXISTING; if equal-or-lower,
return HigherPriorityHolder. AlreadyOwner is treated as success for
same-connection idempotency. Drop releases the bus name and logs
the ReleaseName reply variant.
D-Bus failure paths degrade to a no-op guard so playback continues
exactly as before in environments without a session bus.
Smoke-tested against PipeWire/WirePlumber via dbus-monitor.
cc
- Add ReservationError::AlsaError variant; stop conflating ALSA
enumeration errors with DbusError.
- Mirror ReservationError variant set on the non-Linux stub so cross-
platform pattern matching compiles on every target.
- Add empty Drop to stub for RAII symmetry with the Linux variant.
- Collapse ReservationState to its real Task 1 shape (Degraded only);
Task 2 reintroduces Active when it has real fields.
- Rewrite acquire() doc-comment to honestly describe Task 1's behaviour
and hint at Task 2's full failure-mode set.
No behaviour change. Foundation commit for Task 2.
cc
Adds the new module that will host the org.freedesktop.ReserveDevice1
D-Bus client. This commit only ships the public surface, the parser
helpers (hw:N -> Audio<N> bus name, hw:CARD=name resolution) and unit
tests for them. acquire() currently returns a degraded guard; D-Bus
implementation lands in the next commit.
cc
Discord Rich Presence (#336): when the user opts in, QBZ pushes the current
track as Listening status in Discord with cover, progress bar, and Get QBZ
button. Off by default, silent degrade when Discord is unavailable, sandbox
override block in Settings -> Integrations.
cc
Adds --filesystem=xdg-run/discord-ipc-0 to the self-hosted Flatpak manifest
so Discord Rich Presence can reach the IPC socket from inside the sandbox.
The Flathub manifest is updated separately at release time.
Refs #336.
cc
Adds a Discord Rich Presence section to Settings -> Integrations:
- Toggle wired to discordRpcService (off by default, persisted in localStorage)
- Collapsible override block under the toggle with the flatpak override
command and a Snap fallback note. Always shown - runtime detection isn't
worth the complexity for a help block.
Refs #336.
cc
Adds settings.integrations.discordRpc keys (label, description, overrideHeader,
flatpakNote, snapNote) to en/es/de/fr/pt for the Discord Rich Presence settings
toggle and sandbox override block.
Refs #336.
cc
Calls discordRpcService.initDiscordRpc() once from +page.svelte onMount so
the backend state matches the persisted toggle and the playerStore subscriber
is registered when the user has opted in.
Refs #336.
cc
Creates discordRpcService that:
- persists the user toggle in localStorage (qbz-discord-rpc-enabled, off by default)
- on enable, subscribes to playerStore and forwards (track_id, is_playing) transitions
- dedupes by (track_id, is_playing) so currentTime ticks don't spam the backend
- silently ignores backend errors (headless, sandbox-blocked, etc.)
Refs #336.
cc
Adds src-tauri/src/discord_rpc.rs with DiscordRpcState (Mutex<Option<client>>
+ AtomicBool enabled) and three V2 commands:
- v2_discord_rpc_set_enabled
- v2_discord_rpc_update
- v2_discord_rpc_clear
Lazy connect on first update; silent degrade when Discord is unavailable.
Hardcoded Application ID 1501835855587708988 (public identifier).
Refs #336.
cc
Apply the album/artist detail backdrop overhaul:
- Blurred artwork background instead of a flat palette gradient
- Gradient extended to artist detail, sharing the existing toggle
- Image cache plumbed through extractPalette so artist images bypass
Qobuz CDN's missing CORS headers and Vibrant can read pixels
- Per-view height tuning so each fade lands above its own toolbar
- Artist jump-nav transparent at rest, gains its background only when
pinned (IntersectionObserver sentinel)
- Reactive text + action button overrides extended to artist view
cc
Promote the album/artist detail header gradient from a flat
palette-color fade to a Qobuz/Feishin-style blurred backdrop, and
extend it to the artist page.
- artworkPalette: route the URL through getCachedImageUrl before
handing it to Vibrant. Qobuz CDN sends Access-Control-Allow-Origin
for album covers but not artist images, which tainted the canvas
Vibrant uses and made pixel reads fail. The cache resolves to a
local asset:// path and primes the disk store for next time.
- AlbumDetailView and ArtistDetailView: ::before now renders the
artwork itself with filter:blur + saturate, masked to fade into the
theme background; ::after carries the contrast scrim so the blur
layer doesn't muddle it. The CSS variable --art-image-url carries
the locally-resolved URL so the backdrop image is served from disk
instead of being re-downloaded.
- Heights tuned per view: artist's header is taller (image + bio +
actions) than album's, so artist gets 340 × scale(1.1) and album
gets 280 × scale(1.15) so each fade lands above its respective
toolbar / JUMP TO bar.
- ArtistDetailView jump-nav: now transparent at rest and gains its
background only when stuck (IntersectionObserver against a 1px
sentinel placed right above it). Stops the bar from cutting a
flat-color stripe across the gradient when it's not pinned.
- Reactive text + action button overrides on .has-art-bg apply to
the artist page too: back button, bio text, bio toggle, and the
action-btn-circle family read in white-tinted variants over the
colored backdrop.
cc
Custom sort had two parallel selection systems: an inherent per-row
checkbox column (selectedTrackKeys) used solely to enable Move Up/Down
in a separate batch toolbar, and the toolbar's multiSelectMode for
bulk actions. They had different stores, different widths, and one
disabled the other. Consolidate onto multiSelectMode; drag and the
existing per-row reorder controls cover ordering, and the wrapper
propagates dragTrackIds for group moves.
- Drop selectedTrackKeys, isSelectionMode, toggleTrackSelection,
clearSelection, selectAllTracks, moveSelectedUp, moveSelectedDown
and the associated batch-controls toolbar / col-checkbox header
branch / inherent per-row checkbox.
- Move the multi-select checkbox out of TrackRow into the wrapper so
the column order in custom sort reads [checkbox][reorder][TrackRow];
TrackRow's internal track-checkbox is hidden via :global so its
click + keyboard handlers stay wired through selectable=true.
- Reserve 24px for the row-checkbox and the header col-select-all at
all times and animate opacity (180ms) instead of width. Toggling
select no longer reflows the columns to its right; the checkbox
fades inside a slot that was always there.
- Stable each-key for virtualized rows: use track identity
(`<namespace>-<id>-<number>`) instead of `${visibleTrackRange.start
+ loopIdx}-${track.id}`. The old key mixed scroll state into the
identity, so a re-render that bumped trackListScrollTop reused row
instances against new data — rows showed mismatched track / # /
album combinations until the next paint.
cc
- Reduce table-header left padding to 4px and switch the # column to
text-align: left so track numbers line up with the bare quality badge
in the toolbar above. Track rows in the album-detail context get the
same 4px left padding via a :global override on .track-list and the
track-number column switches to flex-start so the row stays aligned.
- Match the select-all checkbox width to the track-row checkbox (24px)
and shrink the checkbox itself to 15x15 so the header checkbox lands
on the same x as the per-row ones.
- Always render the select-all and track-row checkbox containers and
animate width + opacity in/out (180ms ease) so toggling select mode
no longer pops the column into existence.
- Move the AlbumMenu (...) trigger to the end of the action row so the
bulk-action triggers (CassetteTape, multi-select) sit before the
overflow menu — same convention as other detail views.
cc
Album detail UX overhaul:
- Artwork-derived gradient backdrop on the album header (opt-out toggle in
Settings > Appearance > Album header gradient).
- Bare mode for QualityBadgeStatic so quality reads inline without a
pill container.
- Shrink label/awards sidebar by ~20%.
- Inline tracks count and duration with the metadata row, format duration
as Xh Ym Zs.
- Plumb album description with sanitized HTML and click-to-expand.
- Tracklist toolbar with track search and inline quality badge.
- Featured artists and explicit (parental warning) badge in the artist
line.
- Reactive divider between header and tracklist (visible only when the
gradient is off), reactive action button colors, metadata centering
when there is no description.
cc
Inline UX iteration for the album detail header and tracklist:
- Tracklist toolbar above the table: bare quality badge on the left,
borderless search input on the right (filters tracks by title or
artist), with min-height alignment so badge and input share a baseline.
- Artist line renders the explicit badge (when parental warning) before
the main artist and appends featured artists separated by a dot, each
clickable to its discography. Featured names use a quieter weight and
size to keep the main artist primary.
- Reactive divider between header and tracklist: visible only when the
artwork gradient is off; when on, the gradient itself provides the
demarcation.
- Symmetric vertical breathing room around the toolbar (20px top to
optically compensate for the 40px-tall table-header below) and the
same offset on the album sidebar so the LABEL section aligns with the
toolbar row.
- Action buttons in the header (play/shuffle/heart/etc.) react to the
gradient backdrop with white-tinted strokes and a brighter hover.
- Metadata column vertically centers against the artwork when the
album has no description.
i18n keys added in all five locales: tracklist.searchPlaceholder,
tracklist.noMatches.
cc
Add Album.parental_warning and Album.artists (with the new AlbumArtist
struct) to qbz-models so the /album/get response surfaces both fields.
Mirror them in the QobuzAlbum / AlbumDetail TypeScript types and
populate featuredArtists (filtered to non-main contributors) and
parentalWarning in convertQobuzAlbum. Wire onFeaturedArtistClick from
the route so featured artist names route to their discography.
cc
Pass Qobuz album.description through adapter and AlbumDetail prop, then
render below the metadata row with a 2-line clamp and a Read more / Show
less toggle. Description HTML (Qobuz CMS markup with paragraph and
emphasis tags) is sanitized through the existing allowlist before being
inserted as HTML so the formatting renders cleanly without exposing
data-* attributes.
cc
Folds the standalone .album-quality and .album-stats lines into the
existing date/label/genre row, since the quality string moves to the
tracklist toolbar in a follow-up. Plumbs durationSeconds through
AlbumDetail and the Qobuz adapter, plus bitDepth/samplingRate so the
inline QualityBadgeStatic can render the same tier label as Mixtape and
Collection rows. Total duration renders as Xh Ym Zs (no leading zeros).
cc
The right-side sidebar was carrying too much weight versus the tracklist.
Drops the column from 280px to 224px and proportionally reduces avatar,
icon, and font sizes so the label/awards stack reads as supporting
metadata rather than competing with the track table.
cc
When bare={true}, the badge drops its background, border, padding,
min-width, and fixed height so it can render inline above a tracklist
toolbar without visually competing with the table header.
cc
Extracts the dominant color from album artwork (via node-vibrant) and
paints it as a soft top-down gradient behind the album header, with an
appearance toggle to opt out. Adds the .has-art-bg state class plus
contrast-lifted overrides for back button, info text, and artist link.
cc
Local Library follow-ups:
- fix tracks tab empty on initial load (active tab loader trigger)
- relocate edit-tabs button into folder management toolbar with sort icon
- give Albums tab the full Folders action bar (group/filter/sort/view/select)
- include Plex albums in metadata-grouped Albums view
- show Albums in Edit Library Tabs modal
- declare standard line-clamp alongside -webkit-line-clamp
cc
svelte-check warned about missing standard property next to the
-webkit-line-clamp prefix in 9 spots across 8 components. Add the
standard line-clamp declaration with the same value to clear the
warnings without changing rendering.
cc
The modal sanitizer filtered tab_order against availableTabs, which
omitted 'albums', so the metadata-grouped Albums tab never appeared
in the order/visibility editor. Add it to both availableTabs and
DEFAULT_TAB_ORDER to match the backend default and LocalLibraryView.
cc
loadMetadataAlbums only queried the local SQLite library, so the new
Albums tab was missing all Plex-cached content while the Folders tab
showed it. Mirror the merge pattern from loadLibraryData: fetch Plex
cached albums in parallel and concatenate after mapping.
cc
Albums was a stripped-down VirtualizedAlbumList over metadataAlbums with
no controls. Folders had the full toolbar (group dropdown, quality/format
filter, sort, view toggle, multi-select with bulk actions, alpha index).
The user wants Albums to be 1:1 with Folders, no reinvention.
Implementation:
- Extracted the album-controls block into a Svelte 5 snippet
`albumControls(alphaGroups)` declared at the top of the library-view
template. The snippet body references the existing shared state
(group/filter/sort/view/select); only `alphaGroups` differs per source.
- Extracted the body of `filteredAndGroupedAlbums` into a helper
`buildFilteredAndGroupedAlbums(source)` and added a parallel
`filteredAndGroupedMetadataAlbums` derived for the Albums tab.
- Generalized album-selection state: `currentAlbumsSource` switches
between `albums` and `metadataAlbums` based on activeTab; Select All
and the keyboard shortcut now operate on the active list. Bulk action
handlers look up album IDs across both lists (the two ID spaces don't
overlap) so playlists/queues/mixtapes work from either tab.
- Moved the album BulkActionBar out of the Folders branch so it renders
once for either tab.
- handleTabChange clears in-flight album selection when crossing tabs.
- metadataAlbums state declarations moved up to live next to `albums`
because the new selection derivations reference them earlier in scope.
cc
The gear icon mounted next to the tab buttons inside .jump-links was
visually noisy and overloaded a UX area meant for navigation. Moved it
into the folder-actions toolbar of the Library Settings panel, alongside
the existing folder management icon-btns (FolderPlus, PenLine, Trash2),
where ordering controls sit naturally. Swapped the icon from Settings
(generic) to ListOrdered (semantically a list-ordering action).
Removed the orphaned .jump-link.tab-edit-btn CSS rule.
cc
The visible-tabs rework moved tab order behind LibraryPreferences, so the
initial activeTab can be any of folders/albums/artists/tracks. Mount only
called loadLibraryData (folders + stats), leaving Tracks/Artists/Albums
empty until the user manually clicked a different tab and back.
Extracted the lazy-load switch from handleTabChange into
ensureActiveTabDataLoaded() and call it from both handleTabChange and
onMount once preferences (and therefore activeTab) have settled. Folders
needs no branch because loadLibraryData populates it.
cc
Includes Phase 2 (rename Albums to Folders + per-user tab order
preferences) and Phase 3 (new metadata-grouped Albums view + V2
commands + frontend wiring) of the Local Library design.
cc
Wires the new Albums tab in LocalLibraryView via the metadata-grouped
V2 commands. Default tab order in LibraryPreferences now includes
'albums' between 'folders' and 'artists'; existing users get the new
slot via sanitizeLibraryPreferences's backfill of missing default tabs.
LocalAlbum interface gains the optional source_folders field exposed by
v2_library_get_albums_metadata. fetchAlbumTracks branches on the album
record's source_folders presence: metadata rows fetch via
v2_library_get_album_tracks_metadata, folder rows keep using
v2_library_get_album_tracks. No separate viewMode plumbing is needed
because the discriminator travels on the row itself.
The Albums tab renders through the same VirtualizedAlbumList component
as Folders (single ungrouped group, no controls in this initial pass),
loaded lazily on first visit via loadMetadataAlbums. Cache invalidates
on every loadLibraryData, post-scan, and library-clear so a re-scan
surfaces fresh metadata grouping.
cc
v2_library_get_albums_metadata and v2_library_get_album_tracks_metadata
mirror the existing folder-grouped commands but call the new
get_albums_metadata_grouped and get_album_tracks_metadata. Frontend
wiring lands in the next commit.
cc
New album_grouping module exports the SQL CASE-WHEN expression for the
metadata group key shared by both new queries. The expression has three
priorities: (1) usable album tag => album|artist key, (2) fallback to
existing folder-based album_group_key, (3) orphan bucket
'__unknown_album__'.
get_albums_metadata_grouped runs the grouped query and returns
LocalAlbum rows with directory_path empty and source_folders populated
with the comma-separated list of contributing folders. Pinned 'Unknown
Album' to the bottom via ORDER BY.
get_album_tracks_metadata fetches all tracks belonging to a metadata
group, ordered by disc/track number.
Adds idx_local_tracks_album_lookup index on (album, album_artist,
artist) to keep the GROUP BY index-backed at 16k+ track libraries.
LocalAlbum gains an optional source_folders field (None for folder-
grouped rows; Some(comma-separated) for metadata-grouped rows). The
existing folder-grouped query continues to populate it as None so no
downstream consumer breaks.
Hidden filter (album_settings.hidden) does not apply to metadata-
grouped rows in this iteration; revisiting requires extending
album_settings to support metadata keys.
cc
Frontend half of Phase 2: rename the existing 'Albums' tab (which has
always shown folder-grouped data) to 'Folders' so the label matches
the behavior. NorinB filed issue #380 because of this discrepancy.
Wires LocalLibraryView to the new per-user library_preferences backend
(landed in the previous commit). LibraryEditModal is a clone of
FavoritesEditModal trimmed to the Library prefs scope (tab_order +
hidden_tabs only).
Tabs render in the user-defined order, hidden tabs are skipped. Active
tab on session start is the first visible tab. Default order matches
the current tab list with 'folders' in place of the old 'albums';
Phase 3 will add the new metadata-grouped 'albums' to the default.
i18n updated in 5 locales: new library.folders key + library.editTabs
block. Existing 'Library Folders' settings header moved to the new
library.folderListTitle key to free up library.folders for the tab
label.
cc
Mirrors the FavoritesPreferences pattern so the Local Library can have
a user-configurable tab order and hidden-tabs list, persisted per user
in library_preferences.db. Adds the LibraryPreferences struct, the
single-row SQLite table, the LibraryPreferencesState lifecycle, and
the V2 get/save commands.
Default order matches the current LocalLibraryView tab list with the
renamed 'folders' tab in place of the old 'albums' tab. Phase 3 will
add 'albums' (the new metadata-grouped view) to this default.
Frontend wiring lands in the next commit on this branch.
cc
A code review of the previous commit surfaced a second scan loop in
legacy_compat.rs that had the same destructive update_album_group_artwork
pattern. Apply the same fix: per-folder cache + drop the destructive
call. Same intent and shape as the main loop fix.
The deprecated marker also surfaced three callers that are NOT bugs
and stay as-is, with #[allow(deprecated)] + a comment to make the
intent explicit:
- CUE ingestion: a CUE sheet is one physical album, so a single cover
for all CUE tracks is semantically correct.
- v2_library_set_album_artwork: user-initiated set-cover-for-album, by
design propagates to all tracks.
- Discogs backfill: only fires for albums with no existing artwork, so
there is nothing per-track to destroy.
cc
The scan loop called update_album_group_artwork after every successful
track insert, which propagated one track's artwork to every track in
the same group. Tracks with unique embedded covers ended up sharing
whichever cover was processed last. Drop the call; per-track artwork
is resolved correctly by extract_artwork (embedded) + find_folder_artwork
(cover.jpg fallback) before insert_track.
Replace the propagation's caching effect with an in-memory per-folder
HashMap that memoizes find_folder_artwork for the duration of the scan
run, avoiding repeated folder walks for tracks without embedded art.
Mark update_album_group_artwork #[deprecated] so no future caller
reintroduces the bug. Keep it compilable.
Existing libraries already have collapsed artwork paths in the DB and
need a re-scan to recover per-track covers; called out in release notes.
cc
Fixes#387: seeks issued from the official Qobuz mobile app while qbz
acts as the active renderer were silently dropped — audio kept playing
from the original position while the controller's progress bar locked.
Two independent gates were swallowing the command between the
WebSocket and the audio thread; either alone is enough to break the
flow, so both move together.
1. Upstream filter (crates/qconnect-app/src/app.rs)
The is_echo guard treated every SET_STATE with playing_state=None
AND current_track=None as a pure server echo and skipped emitting
RendererCommandApplied. iOS sends a real seek as exactly that
shape (only current_position_ms set, the rest unchanged), so the
command never reached the bridge handler.
Add current_position_ms.is_none() to the guard. Pure echoes still
match (server echoes carry only next_track); position-only seeks
pass through.
2. Downstream gate (src-tauri/src/qconnect/corebridge.rs)
The seek branch was conditioned on peer_renderer_active — i.e. it
only acted when qbz was the controller observing a peer renderer,
never when qbz was the renderer itself. Removed; the existing
is_echo_reset and abs_diff > 2 checks already filter the redundant-
seek case the gate was originally added to defend against (147bcbd7).
Drop the now-unused is_peer_renderer_active import.
Verified manually: seeks from iPhone (renderer_id=3) targeting qbz
(renderer_id=2) at ~1/4 and ~5/6 of a 150s track now translate to
local audio jumps to the correct positions.
cc
The previous adaptive scheme dropped to 5s when idle and 1s when
paused-with-track. PLAYBACK_STATE_WAKEUP catches synchronous V2
mutations (pause/resume/stop/seek) instantly, but play_data() is
asynchronous: it queues an AudioCommand::Play over a channel and
returns. The audio thread sets is_playing/start_playback_timer only
after decoder + device init (500-2000ms), so the wakeup fires too
early — the loop reads stale state, decides 'idle' or 'paused', and
sleeps for the full long branch before catching the actual transition.
current_position() is wall-clock based (now - playback_start_millis),
so by the time the next idle tick arrives, position is already past
second 1 and the seekbar appears to jump straight to 2+.
Polling uniformly at 250ms catches the async transition within one
cadence and keeps the seekbar showing 0:00 -> 0:01 -> 0:02 from the
start. Cost is negligible (~10 atomic reads x 4 Hz), and should_emit
filters every no-change iteration so the frontend wire is unaffected.
cc
The background task in lib.rs that emits playback:state to the frontend
sleeps adaptively: 250ms while playing, 1s when paused-with-track, and
5s when idle. The 5s idle branch leaves the seekbar blank for several
seconds on cold start because the loop only reads new state — and only
then emits — after the sleep ends, even though audio is already playing.
Add a tokio::sync::Notify (PLAYBACK_STATE_WAKEUP) shared via the
existing commands_v2::helpers module. Race the sleep against
PLAYBACK_STATE_WAKEUP.notified() with tokio::select. Each V2 command
that mutates playback state (play_track, pause, resume, stop, seek)
calls notify_one after the underlying bridge call succeeds, so the
loop wakes within milliseconds and emits the new state immediately.
notify_one stores up to one permit when no waiter is parked, so a
notification fired between iterations is delivered on the next select.
Make commands_v2::helpers a pub(crate) module so the static is
reachable from lib.rs and the V2 command modules.
cc
Adds a pencil icon next to the usage bar in the manager's stats header.
Click opens a Modal (shared Modal.svelte) with a number input bound to
the current limit in GB plus Save / Cancel buttons. Validates >= 5 GB
client-side and surfaces a toast on success or error. Save calls
v2_set_offline_cache_limit which now persists across restarts. New
i18n keys land in all five locales (en/es/de/fr/pt).
cc
Pre-flight check_cache_limit reads the current total_size_bytes and
returns an informative error if the cache is already at or over the
configured limit. Wired into v2_cache_track_for_offline (single) and
v2_cache_tracks_batch_for_offline (batch). Re-download paths are not
gated since they target tracks already counted toward the total. The
check intentionally does not predict the new track's size; preventing
cache from growing further once at the limit is enough for v1.
cc
Adds cache_limit_bytes column to offline_settings (idempotent ALTER
TABLE) plus get/set methods on the OfflineState store. v2_set_offline_cache_limit
now writes the value to disk in addition to the in-memory cache_state.
At session activation, OfflineCacheState::apply_persisted_limit reads
the stored value and seeds the in-memory limit so the user's chosen cap
survives app restarts. Legacy installs with NULL persisted value keep
the in-memory 5 GB default seeded by init_at.
cc
Hi-res FLAC tracks at 24-bit/192 kHz routinely run 60-100 MB each, so a
2 GB cap held only ~25-30 album downloads before users had to clear
space. 5 GB is the new floor for the default; users can raise it from
the manager view and the value persists across restarts (next commits).
cc
The old label implied the entire album would be downloaded, but the
action only re-fetches tracks that were previously cached. Updated in
all 5 locales (en/es/de/fr/pt). The translation key stays
offlineManager.row.actions.redownloadAlbum.
cc
Replaces the static '⟳' / '…' status glyphs with the same SVG progress
ring used by DownloadButton. Album-row ring shows the average progress
across currently-downloading tracks; track-row ring tracks per-track
progressPercent. Queued state renders an indeterminate spinner
(75%-fill rotating). Same pattern, no new dependencies.
cc
Backend cache rows do not store an artwork URL, so on each fresh load we
hydrate per album_id via v2_get_album in batches of 8 with parallel
Promise.all and an in-memory cache. Failures per album are tolerated and
recorded as null so the row falls back to the placeholder. Re-rollups
triggered by progress events and remove operations re-apply the cache so
covers do not flicker on state updates.
cc
Auto-expand every album's track list on each rollup so the user sees
per-track status (size, badges, action menus) without needing to click
each row open. The set is sticky for the session — collapsing an album
manually persists until the next loadAll, and a fresh load re-expands.
cc
v2_check_albums_fully_cached_batch returns a HashMap<String, bool> which
serializes as a JSON object, not an array of tuples. The previous typing
made new Map(result) silently throw with object-is-not-iterable, which
aborted loadAll before buildRollup ran and forced the empty state on
every load. Use Record<string, boolean> + Object.entries instead, and
log loadAll errors so future shape mismatches do not fail silently.
cc
Repoints the handler from v2_open_offline_cache_folder to navigateTo('offline-manager').
The encrypted CMAF bundle layout makes the folder content meaningless to
users; the new in-app manager is the correct affordance for free-up-space
and per-album/per-track operations.
cc
Wires the new OfflineCacheManagerView into +page.svelte's view switch with
onBack returning to settings, onGoToAlbum delegating to handleAlbumClick,
and onGoToFavorites returning to the user's last favorites tab. Adds
'offline-manager' to the ViewType union so the new branch type-checks.
Excludes 'offline-manager' from last_view persistence by routing it through
getSessionFallbackView('offline-manager') -> 'settings' (its entry point),
guarding against Phantom CSS Error Cause 3 on rehydration when the cache DB
is not yet ready at first paint.
cc
Album rows show cover placeholder, title/artist, cached ratio, dominant
quality, size, and status badge. Menu actions: re-download album, retry
failed (visible only when applicable), remove from offline (with ask()
confirm), go to album. Expanded rows show per-track actions
(re-download, remove). Singles pseudo-album omits redownload-album and
go-to-album; remove iterates per-track.
cc
Rail groups artists by leading letter with sticky headers. Horizontal
alphabet bar above scrolls the rail to the chosen letter. Inactive
letters dimmed.
cc
Header + stats section with usage bar, sort dropdown, and Show only failed
toggle. Loading and empty states are placeholders for the next tasks
(left rail in P6.2, right pane in P6.3, empty CTA in P6.4).
cc
Adds the runtime API: loadAll, subscribeToProgress, removeAlbum,
redownloadAlbum, redownloadTrack, removeTrack, selectArtist,
toggleExpand, setSort, setShowOnlyFailed. Reuses buildRollup on every
mutation so derived ArtistGroup state stays consistent.
Subscribes to four downloader events: caching_started, caching_progress,
caching_processed (the canonical Ready signal), and caching_failed. The
intermediate caching_completed event is intentionally ignored since
caching_processed already covers post-processing completion.
Renamed the file to offlineCacheManagerStore.svelte.ts because Svelte 5
runes ($state, etc.) are only legal inside .svelte / .svelte.ts /
.svelte.js modules. Updated the vitest import in the sibling .test.ts
to match the new path.
cc
Pure function maps flat CachedTrackInfo[] into ArtistGroup[] with album
sub-groups, status rollup, quality dominance, and Singles bucket for
albumId-less tracks. Covered by vitest with 7 cases.
cc
Five-locale update for the new offline cache manager view (en/es/de/fr/pt).
Repurposes the settings.offlineLibrary.openFolder button label to point at
the manager view; the underlying handler is changed in a later task.
cc
v2_remove_cached_album, v2_redownload_cached_album (with failed_only flag),
and v2_redownload_cached_track. Thin dispatchers over offline_cache::*
following V2 cleanroom rules.
cc
Pure logic, no Tauri state. remove_album_cached_tracks bundles the
SQLite delete with on-disk CMAF cleanup. select_redownload_targets
enforces the rule that re-download skips in-flight Downloading tracks
and optionally restricts to Failed only.
cc
The previous commit added a Pending variant to OfflineCacheStatus, but
the existing Queued variant already represents 'freshly inserted,
awaiting downloader pickup' (insert_track writes status='queued').
Reusing Queued keeps reset_track_for_redownload semantically aligned
with insert_track and preserves the in-flight count SQL that already
matches WHERE status='downloading' OR status='queued'.
cc
get_album_tracks returns rows of any status (needed for re-download
which targets ready+failed but skips downloading). reset_track_for_redownload
clears progress and error so the downloader can restart cleanly.
Also adds OfflineCacheStatus::Pending (serializes/parses as 'pending') so
reset_track_for_redownload has a target state distinct from Queued and
Downloading. The frontend type union (per plan) already includes 'pending'.
Factors out row_to_cached_track_info as a private free function so
get_track, get_all_tracks, and the new get_album_tracks share the same
15-column row decoder.
cc
The previous filter_map(.ok()) silently dropped per-row decode errors,
which would have caused the returned ids vec to be truncated while the
rows were still counted in the byte total and physically deleted. P2.2
and P2.3 will use the returned ids to clean filesystem artifacts; a
silent truncation would leak files. Promote row errors to the function
boundary instead.
cc
Single-transaction batch delete keyed by album_id. Returns the deleted
track_ids and the total bytes freed so callers can clean filesystem
artifacts and report freed space.
cc
Moves spawn_track_cache_download and try_cmaf_offline_download from
commands_v2/legacy_compat.rs to offline_cache/downloader.rs as
pub(crate) functions. No behavior change. Prepares the V2-clean path
for the upcoming offline cache manager commands.
cc
The script was created when commands_v2 was a single file. After the
refactor to a directory, the path was stale and the script errored on
missing file. Also switch from rg to grep so the check works in
environments without ripgrep installed.
cc
Frontend (62 components, ~64 rules):
- Replace hardcoded `color: white` / `#fff` with `var(--btn-primary-text)`
in every rule that paints text on `var(--accent-primary)`. Covers in-rule
cases (BulkActionBar, GenreFilterButton, KeybindingsSettings, settings
views, login, modal primary buttons, wizard steps, etc.) plus descendant
selectors (`.parent.selected .child`).
- Semi-transparent rgba(255,255,255,X) over selected accent rows now use
`color-mix(in srgb, var(--btn-primary-text) X%, transparent)` so the mute
level inherits the per-theme token color.
Theme tokens in app.css (--btn-primary-text fixes):
- rose-pine-dawn: #faf4ed → #575279 (was the bg color, ratio 2.60 FAIL;
now 5.71 AA against coral accent)
- kurosaki: #fbf9f2 → #262424 (was the bg color, ratio 1.76 FAIL;
now 8.33 AA against gold accent)
- snow-storm: #eceff4 → #2e3440 (was the bg color, ratio 3.50 AA-Large;
now 6.13 AA against blue accent)
- stratego: #0a0a0a → #ffffff (visual choice; 4.14 AA-Large is
acceptable for button labels and matches palette intent)
Auto-theme generator (src-tauri/src/auto_theme/generator.rs):
- pick_btn_text_for_accent_set(): WCAG-aware FG selection that holds
across accent / hover / active states. Replaces the broken
`luminance < 0.5` threshold which produced 2.0:1 ratios on mid-luminance
accents (Catppuccin lavender, Dracula purple, rose-pine coral).
- ensure_text_contrast_target(text, bg, is_dark, target): generalize the
iterative contrast helper to accept a target ratio. Apply to
text_secondary (4.5) and text_muted (3.0).
- Add --btn-danger-text and --btn-warning-text tokens via
pick_btn_text_for_bg for future status-button consumers.
Misc fixes:
- SettingsView.svelte: extract initialTitlebarMode to const, avoids the
Svelte 5 state_referenced_locally warning.
- QueuePanel.svelte: wrap .stop-after-marker in :global() (the class is
forwarded to a Svelte component child, not a native element) and fix
var(--accent) typo to the correct var(--accent-primary).
Tests: 13 generator tests pass (8 prior + 5 new). svelte-check 0 errors,
31 warnings (down from 33).
cc
Bumps Node 20 to Node 24 in CI workflows and Flatpak manifest.
Cherry-picked from PR #377 (Mar0xy), Discord IPC parts intentionally
deferred until that feature actually exists.
cc
Cherry-picked from PR #377 (thanks @Mar0xy) — Node-only portion, no
Discord IPC additions:
- 4 workflows (release-{linux,linux-aarch64,macos,flatpak}.yml) now
install Node 24
- packaging/flatpak/com.blitzfc.qbz.yml: SDK extension node20 → node24,
build append-path and npm_config_nodedir aligned
Forcing function: @icons-pack/svelte-simple-icons@7.x already in use
declares engines.node >=24, so Node 20 produces an EBADENGINE warning
in CI. Node 20 also reached EOL on 2026-04-30. Node 24 has been LTS
since October 2025 (~7 months of maturity).
Discord IPC permissions and qbz-wrapper script from #377 were
intentionally NOT cherry-picked — there's no Discord RPC feature in
QBZ today (#336 is still planned but not implemented), so adding the
sandbox permission and the launch wrapper now would expand the
attack surface for nothing. They'll land together with the actual
feature when it ships.
cc
Adds full multi-select coverage to the local library album detail view
per #381 — select-all checkbox, shift-click range, and Ctrl/Cmd+A
scoped to the open album with cross-view selection preserved.
cc
The album detail view (after drilling into a local album) had the
select-mode toggle button but was missing the rest of the multi-select
UX:
- Select-all checkbox in the track-list-header (only renders when
select mode is active). State is derived from albumTracks vs
selectedTrackIds so it accurately reflects partial / all / none
for the currently-open album.
- Shift-click range support: TrackRow's onToggleSelect now passes
the MouseEvent up. A new toggleAlbumDetailTrackSelect computes
the absolute index in albumTracks (so ranges work across discs)
and reuses applyShiftRange.
- Ctrl/Cmd+A while in album detail now scopes to the open album
and unions with any selection already built up in other views,
rather than replacing with library-wide tracks.
The toggle button itself (SquareCheckBig) was already wired — only
the missing pieces are added here. Cross-view selection composition
(tracks tab + album detail share selectedTrackIds) is preserved.
cc
Fixes#386 (duplicate-track selection collapse in playlist editing) plus
two related multi-select issues found while testing:
- Left-click on TrackRow checkbox now reliably toggles selection
(input made pointer-transparent, parent div owns the click).
- Selected row background bumped from 12% to 22% accent so the
visual cue is readable next to the saturated checkbox.
cc
Two related issues uncovered while testing the playlist duplicate-track
fix in multi-select mode:
1) Left-click on the checkbox did nothing while right-click marked it.
The input had onclick={(e) => e.preventDefault()} to suppress the
browser's native toggle, relying on the parent div's onclick to
dispatch onToggleSelect. Under webkit2gtk this combination
intermittently absorbed the left-click without bubbling cleanly.
Replace with style="pointer-events: none" on the input — clicks pass
straight through to the parent div, which owns the toggle. The input
is now purely visual, the div is the only event target. No more
bubble-vs-default-action conflict.
2) Selected row background was too subtle to read against the heavy
accent-coloured checkbox. Bump TrackRow's .track-row.selected from
12% to 22% (hovered variant 20% to 30%) and align
PlaylistDetailView's .track-row-wrapper.multi-selected wrapper
rule to 22% so the two sources of truth stay in sync.
Affects every view that uses TrackRow with selectable=true — Album,
Artist, FavQ, Playlist, etc — all benefit from the consistent
pointer-events pattern and more visible selected state.
cc
The explicit checkbox+label markup with onclick+preventDefault on the
input desynced the input's internal checked state from the rendered
checked attribute on click. Result: row background highlighted but
checkbox stayed visually unchecked.
Replace with the standard TrackRow.selectable/selected/onToggleSelect
pattern used by AlbumDetailView, FavQView, ArtistDetailView. Side
benefits:
- Shift/ctrl+click on row body now works for range/toggle multi-select,
matching UX in those other views
- Single source of truth for the checkbox visual (TrackRow internal),
no two-checkboxes risk
- Custom-order-mode checkbox preserved as-is - it uses onchange not
onclick and was never affected
cc
Bulk-edit selection used `${trackId}:${isLocal}` as the Set key. Two
duplicate tracks (same trackId+isLocal appearing twice in a playlist)
collapsed into a single entry, causing:
- clicking duplicate A selected duplicate B and vice versa
- background highlight and checkbox indicator desynced
- bulk delete removed both duplicates instead of the selected one
Fix: include the row index in getTrackKey so duplicates get distinct
selection keys. All 18 call sites updated to pass the index from the
local iteration context. The {#each} key was already index-aware
(visibleTrackRange.start + loopIdx + track.id) so Svelte's element
tracking is unaffected.
For Qobuz tracks the existing remove path uses playlistTrackId
(per-entry unique) so the correct entry is removed. Local-track
duplicates depend on backend semantics of v2_playlist_remove_local_track
keyed by localTrackId — that's a separate consideration outside this
UI fix.
Closes#386.
cc
Adds the 4-value titlebar mode selector (qbz | system | plasma | hidden)
replacing the three mutually-conflicting boolean toggles. Plasma mode
delivers KDE-native SSD via Xwayland on Wayland sessions; system mode
now also mounts a stripped strip below OS chrome when the user has
search-in-titlebar or any titlebar-nav item enabled.
cc
Bumped only for src-tauri's qconnect-discovery path. qbz-cast (chromecast/
DLNA) stays on 0.11 because mdns-sd 0.19 changed the address API
(HashSet<IpAddr> → HashSet<ScopedIp>) and adapting qbz-cast is real
work outside dependabot scope. Workspace now carries both versions
in the graph; both compile and operate independently.
cc
Plasma and system mode become structurally symmetric — both render OS
chrome on top (KWin SSD via Xwayland for plasma, GTK CSD / WM SSD for
system) plus an optional stripped QBZ strip below for search and nav.
Same content-driven rule applies to both: the strip mounts only if the
user has search-in-titlebar enabled OR any titlebar-nav item enabled.
With both off, the user sees just the bare OS chrome, matching the
previous system-mode behavior.
Effective rules table:
- showWindowControls / matchSystemChrome: user pref in qbz only
- searchBarLocation / titlebarNav: user pref in qbz/plasma/system,
forced/n-a only in hidden
i18n disabledHint strings updated to reflect the new rules across all
five locales.
cc
If the user has search-in-titlebar off AND no titlebar-nav items
enabled, plasma mode would render an empty 42px strip below the KWin
SSD. Gate shouldShowTitleBar() in plasma on whether either is enabled.
+page.svelte's search-location and titlebar-nav subscriptions now
also recompute showTitleBar so the layout reflows immediately when
the user toggles those settings.
cc