Establishes the skeleton for a Discovery rebuild under "cero efectos"
constraint after a perf debug session confirmed the original home view's
vertical scroll cost was structural and accumulative, not a single
offender. Spec: qbz-nix-docs/specs/2026-05-11-discovery-v2-clean-room.md.
Adds:
- src/lib/discovery-v2/AlbumCardLite.svelte: 5-element card (cover,
title, artist, permanent play button). Cero `transition`, cero
`:hover` paint, cero `will-change`, cero `backdrop-filter`.
- src/lib/discovery-v2/DiscoverySection.svelte: titled inline CSS grid
of cards + "See all" link. No `overflow-x: auto` carousel — sections
wrap onto rows naturally.
- src/lib/discovery-v2/DiscoveryView.svelte: top-level. Same Props as
`HomeView.svelte` for drop-in mount swap. Toolbar with three tab
buttons (Home / Editor's Picks / For You) on the left and a slot
for the genre selector on the right — fixed 56px height, static
(no `position: sticky`), part of the main paint pass.
- i18n keys `discovery.{comingSoon,seeAll}` across en/es/de/fr/pt.
Swaps the mount in `src/routes/+page.svelte:5826` from `<HomeView>` to
`<DiscoveryView>`. `HomeView.svelte` stays in the tree as rollback. Real
sections will be wired incrementally in follow-up commits, each measured
against the perf baseline established by the scripts/measure-cpu-window.sh
tooling.
cc
Samples /proc/PID/stat directly (no pidstat dependency) for the qbz binary
and any WebKit child processes. Outputs mean/p50/p95/max per process plus
appends a CSV row to /tmp/qbz-cpu-measurements.csv for cross-run comparison.
Usage:
./scripts/measure-cpu-window.sh <label> [duration_seconds]
Built during the 2026-05-11 perf debug session to replace seat-of-the-pants
"does it feel faster?" with comparable numbers across changes.
cc
The bar declared `background: var(--bg-secondary); backdrop-filter: blur(20px)`.
`--bg-secondary` is opaque across all themes, so the blur was computed for
nothing — WebKit applied the per-frame blur computation to pixels under the
bar that the opaque bg then completely overdrew. Pure waste under software
compositing.
cc
The action was applying `will-change: transform` + `transform: translateZ(0)`
to every cached <img> as a workaround for WebKitGTK 2.50+ texture eviction
flicker on hover/scroll.
Under hardware-accelerated compositing this is cheap — each image is a GPU
texture handle. Under software compositing (QBZ's default), each forced
layer materializes its own CPU framebuffer. With 100+ AlbumCards in the
home view, that's 100+ extra buffers the compositor must manage every
frame, dominating the structural paint cost of scroll.
User confirmed in the 2026-05-11 perf session that the flicker the hack
was meant to prevent does not reappear after removal on his setup. If it
shows up again on other reports, the re-introduction should be guarded by
the hardware-acceleration setting (apply only when GPU is on).
cc
The `.artwork-bg` layer rendered the playlist cover scaled-up + heavily
blurred behind the contain-fitted main image. Under software compositing,
filter:blur(30px) saturate(1.5) on N playlist cards × visible row = paint
cost proportional to card surface, paid every frame the row repaints
during vertical scroll.
For square playlist art (the common case) `.artwork-main object-fit: cover`
covers the whole container — the blurred bg was invisible anyway. For
non-square art the original cover shows through at the letterbox edges
without the blur. Acceptable trade.
cc
Removed under software compositing the changes that proved either wasteful
or hot during scroll:
- `:hover` marquee animations on title/artist (infinite keyframes that kept
WebKit's paint loop alive while hovered, especially across cards passed
during scroll)
- `.action-overlay` `backdrop-filter: blur(12px)` (computed every frame even
at opacity 0; the bumped opaque background covers visually)
- `.editorial-ribbon` `backdrop-filter: blur(4px)` (multiplied by N cards
with badges; minor individually, significant in aggregate)
Added `content-visibility: auto` + `contain-intrinsic-size: 230px 320px` on
`.album-card`. Confirmed in the 2026-05-11 perf session to substantially
help horizontal scroll under software compositing by skipping offscreen
card render entirely.
cc
Wire isTrackRemovedFromQobuz into TrackRow consumers (VirtualizedTrackList,
AlbumDetail, DynamicSuggest, TopQ, WeeklySuggest). Tracks marked unstreamable
by the API or hit by a TrackUnavailable error this session now render dimmed,
non-draggable, non-clickable, with the i18n tooltip player.trackUnavailable.
Reactivity for the {@const} reads uses a $state counter bumped from the
unavailable-tracks store subscription so the dim state updates live without
forcing the whole list to re-render.
cc
The error strings flow up through stream_error and end up in user-
visible logs. Replace the internal-shaped messages ("opened at XHz
while device nominal rate is YHz") with text that names the cause,
the remediation, and the reason the fallback path is refused.
CPAL caches device configs and can briefly return a stale sample rate
right after CoreAudio changes the device nominal rate. Before this
change, opening at the stale rate failed the post-open validation and
returned Err, leaving the user with no audio on the first track after
a rate change.
Drop the bad sink, re-resolve the device, re-query nominal rate and
try once more with a 50ms backoff. Two attempts in total. Turns the
racy window into transparent recovery.
Extract the boolean decision out of evaluate_stream_recreate into a
pure function so the truth table can be tested without faking a
MixerDeviceSink or AudioSettings mutex. Eight cases cover the matrix:
no stream, unchanged format, format change with and without each
bit-perfect backend, and the CoreAudio shared-mode rate-mismatch path.
The rate-mismatch detection block was duplicated between the Play and
Stream handlers, and each handler acquired thread_settings.lock() three
times in a row. Extract into one helper that reads settings once and
returns every flag the recreate decision needs.
Also drops a dead else-branch that logged "Creating initial audio
stream" — unreachable inside if stream_opt.is_some() — and the
redundant info-log that re-announced the rate-mismatch reason at
recreate time (the warn-level log inside the helper already says
"Recreating stream to avoid wrong-speed playback").
The field tracks the decoded source format, not the output stream's
hardware rate. The names are now explicit so future readers don't
conflate the two — on macOS shared mode these can legitimately differ
since Rodio resamples internally.
Hotfix release. Reverts titlebar-mode-selector and PR #406 (broken
window chrome on Linux); preserves PR #407 (sticky home header) and
adds PR #408 (macOS native icon and tray variants by @Vudgekek).
cc
v1.2.12 hotfix: revert the titlebar-mode-selector merge and PR #406
which together caused all titlebar modes to render incorrectly in the
production binary (empty top space, gap above now-playing bar). The
v1.2.10 model (use_system_titlebar + hide_title_bar booleans) is
restored; Plasma mode is dropped pending a less brittle redesign.
PR #407 (sticky home header fix) is preserved.
Reverts merge f7623154 which built macOS support on top of the variant
rendering infrastructure introduced by titlebar-mode-selector. With the
variant system gone (previous revert), PR #406's changes (class:macos,
stripped strip with traffic-light reservation, macOS-aware drag bands)
reference dead architecture.
Most of PR #406 was already removed by the previous revert via file
checkouts; this commit cleans up the residual macOS-specific cosmetics
in Sidebar.svelte and +page.svelte (padding-top 36→32, drag-region
height 32→28, macos main-content padding restored to generic rule).
PR #407 (sticky home header fix, ac627d43) is preserved — independent
from titlebar work, only touches HomeView.svelte.
cc
Reverts merge 1be46f1a which introduced the 4-mode titlebar enum
(qbz/system/plasma/hidden), variant-aware rendering (full/stripped),
GDK_BACKEND=x11 coercion for Plasma, and per-mode mounting in +page.
The "stripped strip mounted alongside Plasma SSD" architecture caused
all titlebar modes to render incorrectly in the production binary —
empty space at top, separation gap above the now-playing bar, controls
visible without a backing strip. Reverting restores v1.2.10 behavior:
two booleans (use_system_titlebar + hide_title_bar), no variants, no
GDK coercion. Plasma support is dropped pending a less brittle redesign.
Conflicts in SettingsView.svelte resolved by taking the pre-merge side
for the four titlebar UI blocks; non-titlebar additions in this cycle
(Discord RPC settings, reserve-DAC, offline cache nav) preserved.
cc
Update qbzVersion + srcHash + npmHash for the v1.2.11 tag (commit
cc98b7f7). Hashes computed via 'nix-prefetch-url --unpack' and
'prefetch-npm-deps package-lock.json' against the tagged tree.
cc
PR #406 was the macOS titlebar unification (mentioned separately in the
Title bar section); the sticky home header pop-in fix is PR #407. Both
from @afonsojramos in the same merge round.
cc
Discord RPC now reaches Discord-Flatpak's IPC socket without making the
integration opt-out at the sandbox layer. Bridge symlinks are created
lazily on first connect after the user enables the toggle; users who
never enable Discord RPC see no sandbox changes.
* prepare_flatpak_discord_socket_links in discord_rpc.rs runs from the
lazy connect path, gated on FLATPAK_ID env var
* Manifest gains xdg-run/app/com.discordapp.Discord:create filesystem
permission, kept alongside the existing static path
Discord-Flatpak writes its IPC socket to
\$XDG_RUNTIME_DIR/app/com.discordapp.Discord/discord-ipc-N rather than
the \$XDG_RUNTIME_DIR/discord-ipc-N path the discord-rich-presence crate
searches by default. The naive way to bridge that gap — a startup
wrapper that unconditionally symlinks every iteration before the binary
launches — works, but it pulls the integration off-script: every other
optional integration in QBZ (Last.fm, ListenBrainz, MusicBrainz, Plex)
is opt-in, with zero telemetry and zero filesystem reach until the user
flips the toggle. A startup wrapper would silently turn Discord RPC
into opt-out at the sandbox layer; the symlinks would exist for users
who never touched the integrations panel.
Move the bridge into the lazy connect path instead. The first time the
user actually connects — i.e. the first track plays after they enabled
the toggle — prepare_flatpak_discord_socket_links runs:
* No-op outside Flatpak (no FLATPAK_ID env var)
* No-op when \$XDG_RUNTIME_DIR/discord-ipc-N already exists (native
Discord, or a previous lazy run in this Flatpak instance)
* No-op when the Discord-Flatpak source path doesn't exist (Discord
not running)
* Otherwise, symlinks 0..9 from \$XDG_RUNTIME_DIR/discord-ipc-N to
\$XDG_RUNTIME_DIR/app/com.discordapp.Discord/discord-ipc-N
Symlinks die with the Flatpak instance — \$XDG_RUNTIME_DIR is per-
instance, so there's no cross-session pollution. Users who never enable
Discord RPC keep the same sandbox surface as before.
Manifest: keep the static xdg-run/discord-ipc-0 permission for native
Discord, add xdg-run/app/com.discordapp.Discord:create so the lazy
symlink path is allowed when the user opts in. The two coexist; the
crate's default search path covers Discord-native, the symlinks cover
Discord-Flatpak.
cc
Drains the wiki "23 warnings" baseline back to zero so future regressions
stand out:
* Drop 16 unprefixed \`app-region\` CSS lines across TitleBar, TitleBarNav,
ImmersiveHeader, ImmersivePlayer, MiniPlayerFooter and MiniPlayerWindowControls.
Tauri's webview is WebKit / Chromium on every platform we ship to, so
\`-webkit-app-region\` already covers the chrome-drag region; the
unprefixed property only existed to keep stylelint quiet but the CSS
spec doesn't define it and svelte-check warns on every site.
* Remove 2 empty rulesets in AlbumCreditsModal and NowPlayingBar (leftover
comment-only blocks from earlier refactors).
* Pair \`-moz-appearance: textfield\` with the standard \`appearance: textfield\`
in LocalLibraryTagEditorModal so the rule no longer trips the
property-companion warning.
* Delete the unused \`.quality-text\` selector in NowPlayingBar.backup.svelte
(file is a frozen snapshot of an older NPB iteration; the live NPB
doesn't use that class).
* Annotate Tooltip.svelte and immersive/panels/VinylPanel.svelte with
\`svelte-ignore a11y_no_static_element_interactions\` plus a comment
explaining the context — both are decorative wrappers (a tooltip hit
area; a 3D tilt effect on artwork) where adding an ARIA role would
misrepresent the semantics.
* Add \`@types/node\` as a devDependency (^22) so the tsconfig resolution
for the SvelteKit-extended config stops complaining about the missing
type definition.
cc
Open Folder — play music ad-hoc without adding to library.
* Backend: ephemeral_library module (in-memory HashMap, synthetic
high-positive ids, CUE support, format whitelist, artwork cache,
gapless prefetch).
* Frontend: Open Folder button in Folders > Tree toolbar; pane mirrors
album-detail layout with cover-art per group + disc sections.
* Persistence: folder path survives restart (rehydrated on mount); the
ephemeral data itself is rebuilt fresh.
* Lifecycle cleanup: queue + NowPlayingBar wiped on broom click /
navigation away / inaccessible folder.
* Playback: gapless across virtual track boundaries (CUE-FLAC) with
position offset translation so the seekbar reads in virtual time.
* Action gating: favorite + playlist + track info disabled (not removed)
for ephemeral tracks across NowPlayingBar, QueuePanel, immersive.
* Folder-tree sidebar polish: search right-aligned, default 290px width.
Library-bound actions (favorite, add-to-playlist, track info) require a
DB row to operate; ephemeral tracks live only in memory and would 404
on use. Surface them disabled rather than removed so the affordance
stays discoverable in the chrome — users still see the icon, the
tooltip explains why it's inert.
Surfaces wired
- NowPlayingBar: + and ♥ disabled when active track id >= 2^48.
- QueuePanel: now-playing ♥ + per-track Add to Playlist + Track Info
in both queue and history menus disabled per-row by id range.
- ImmersiveControls + PlayerControlsCompact: ♥ disabled.
- ImmersivePlayer: passthrough prop to PlayerControlsCompact.
- MiniPlayerFooter / MiniPlayerWindowControls: no metadata actions in
these surfaces, nothing to gate.
Detection is by id range (>= EPHEMERAL_ID_FLOOR), not by source string.
The setQueueForLocalTracks mapping rewrites `source: 'ephemeral'` to
`'local'` before the track reaches the queue, so a string-equality
check would never fire — id range matches the rest of the ephemeral
codebase (gapless carve-out, CUE boundary, seek offset, queue/now-
playing wipe).
Tooltip on the disabled state uses the new
`actions.unavailableForEphemeral` key, translated for en, es, de, fr, pt.
cc
Three coupled visual bugs that surfaced once the queue advance and
gapless wiring started landing virtual track changes correctly.
Seekbar (case A: manual click / next button)
- PlayingTrack gets cueStartSecs / cueEndSecs fields and a
patchCurrentTrackCueInfo() setter on playerStore. handlePlaybackEvent
subtracts cueStartSecs from event.position when computing the
displayed currentTime, so a virtual track that lives at e.g. offset
7:26 inside its FLAC reads 0:00 at frame zero instead of 7:26 / 0:00.
- LocalLibraryView keeps an $effect on activeTrackId that looks up the
matching ephemeral track and patches the cue info into playerStore
every time the active track flips. Non-CUE / non-ephemeral tracks
fall through with null/null which clears any prior boundaries.
Seekbar (case B: CUE boundary auto-advance)
- handlePlaybackEvent gains an "underlying CUE" branch: when event.track_id
is in the ephemeral range AND currentTrack is in the ephemeral range
AND currentTrack has cueStartSecs, the strict track_id match check is
bypassed and the same offset translation runs. This keeps the seekbar
ticking in virtual-track time after the boundary watcher swaps the
displayed metadata while the audio buffer is unchanged. EPHEMERAL_ID_FLOOR
is promoted to a module constant so both branches share it.
Album art (manual next button)
- queueArtwork.resolveQueueTrackArtwork was double-converting Tauri
asset:// URLs through convertFileSrc, producing a 403 path
(asset://localhost/asset%3A%2F%2F...). Add an asset: passthrough
alongside http(s) and file:// so URLs already resolved upstream
(LocalLibraryView's queue setter pre-converts via getArtworkUrl)
reach the NowPlayingBar intact.
Quality badge ("audio downgrade")
- Boundary advance's setCurrentTrack call was passing LocalTrack.sample_rate
(Hz) into PlayingTrack.samplingRate (kHz). The badge formatted as
"FLAC 16/44100" instead of "FLAC 16/44.1", reading as a quality drop
vs. the album list. Divide by 1000 to match the rest of the
PlayingTrack contract.
cc