Commit Graph
4231 Commits
Author SHA1 Message Date
vicrodh 40851ad58e feat(qconnect): add startup_mode + last_known_state persistence helpers
Reuses qconnect_settings.db with WAL pragma. Fail-open on any error so
a corrupt DB falls back to Off and never blocks app startup.

cc
2026-05-01 12:16:28 -06:00
vicrodh 1b01c95898 feat(qconnect-app): add QconnectStartupMode + compute_effective_startup
Pure enum + decision function for QConnect auto-connect-on-startup.
Persistence and CLI parsing stay in the Tauri adapter; this crate
remains UI-agnostic.

cc
2026-05-01 12:12:09 -06:00
vicrodh c6fb25275e poc(about): add Kawarp attribution
Adds @kawarp/core (MIT, by better-lyrics) to the About modal's
"Built with" section, in the same Lucide-anchored slot. New i18n
key about.attributions.kawarpDesc landed in all five locales.

cc
2026-04-29 09:03:36 -06:00
vicrodh 3ab83e6224 poc(immersive): retire standalone KawarpPanel — Static now uses kawarp via ImmersiveBackground
After the central refactor in c106928a, ImmersiveBackground in 'full'
mode renders kawarp directly. Static (and every other panel that
consumes ImmersiveBackground — Coverflow, Lyrics, Queue,
AlbumReactive, TrackInfo, Suggestions, the split modes) now inherits
the kawarp look automatically.

The standalone KawarpPanel was a temporary A/B vehicle for the POC
benchmarks; with the new architecture it's redundant and would only
confuse the panel selector.

Removed:
  - src/lib/components/immersive/panels/KawarpPanel.svelte
  - 'kawarp' from FocusTab and ImmersiveViewKey type unions
  - Menu entry in ImmersiveHeader
  - Routing branch in ImmersivePlayer
  - i18n key in en/es/de/fr/pt
  - 'kawarp' from the bg-skip exclusion list (no longer needed —
    Static no longer has its own canvas, it uses ImmersiveBackground)

cc
2026-04-29 02:58:47 -06:00
vicrodh c106928a53 poc(immersive-bg): replace WebGL2 path with kawarp in 'full' mode
ImmersiveBackground feeds every panel that doesn't render its own
canvas (Static, Coverflow, Lyrics-focus, Queue-focus, AlbumReactive,
TrackInfo split, Suggestions split, the legacy split lyrics/queue),
so refactoring it once swaps the bg engine across all of them in a
single change.

What changed:

  - 'full' mode used to dynamic-import ImmersiveAmbientCanvas (a
    bespoke WebGL2 renderer maintained in-house) and a CSS-blur
    canvas as fallback. Replaced with a kawarp WebGL canvas and
    'lite' mode as the WebGL-failure fallback (was already the
    watchdog's degradation target). Drops ~400 lines of legacy
    canvas blur code from the bundle indirectly — the dynamic
    import path is gone.
  - Kawarp is mounted directly inside the component on a bound
    canvas via $effect once the canvas is in the DOM.
    transitionDuration: 1000 ms means kawarp handles cross-fades
    natively, so when in full mode we skip the manual CSS opacity
    dance the lite/off modes still need.
  - Tuning matches the values landed on KawarpPanel after the A/B
    rounds (warp 1.0, blur 7, speed 1.15, scale 1.0, saturation 1.5,
    tint 0.06). Comments cite the rationale.
  - switchToMode disposes the kawarp instance when degrading away
    from full, so no leaked GL context after a watchdog event.
  - lite + off modes are unchanged, including their CSS-fade logic.

cc
2026-04-29 02:57:11 -06:00
vicrodh a48d1b369d poc(kawarp): saturation 1.7→1.5, tint 0.03→0.06
cc
2026-04-29 02:49:57 -06:00
vicrodh ded6537ee0 poc(kawarp): saturation 1.9→1.7
cc
2026-04-29 02:46:56 -06:00
vicrodh 0b844e53a0 poc(kawarp): bump animationSpeed 1.0→1.15
cc
2026-04-29 02:46:05 -06:00
vicrodh 30aec49b72 poc(kawarp): nudge saturation 2.0→1.9 and blurPasses 8→7
Tiny dial-back per visual feedback — saturation was clipping faintly
on bright covers, and one fewer blur pass leaves a hair more cover
texture in the warp without re-introducing blob artefacts.

cc
2026-04-29 02:45:44 -06:00
vicrodh f92ef50832 poc(kawarp): push saturation/tint further in the same direction per feedback
User feedback after the previous tweak (saturation 1.8, tint 0.08):
the result felt visually close to the demo defaults — i.e. not enough
chromatic punch from the cover yet. Push further in the same direction:

  - saturation 1.8 → 2.0 so muted palette colours register at full
    strength on low-contrast covers without amping detail extraction.
  - tintIntensity 0.08 → 0.03 effectively removes the global dark-blue
    tint pull. The trace amount keeps a faint anchor for pure-black
    regions so they don't float as flat colour, but the cover's own
    palette dominates the result.

cc
2026-04-29 02:44:32 -06:00
vicrodh 7d54bf840b poc(kawarp): boost saturation, drop tint instead of widening scale
Last tweak (scale 1.5 + speed 1.2) made kawarp surface non-dominant
colours by exposing more cover detail per frame, but the side-effect
was that kawarp started looking closer to Static — same "translate of
regions" feel — defeating the differentiation that's supposed to be
kawarp's selling point.

Different lever: keep the abstract domain-warp look (scale 1.0,
speed 1.0 — exactly the demo) but push the colour pipeline:

  - saturation 1.5 → 1.8 amplifies muted palette so secondary colours
    of low-contrast covers register without forcing detail through.
  - tintIntensity 0.15 → 0.08 halves the global dark-blue tint pull
    so the cover's own palette dominates the result rather than the
    tint dragging everything toward navy.

Result is more chromatic variance with the same fluid abstraction —
keeps kawarp clearly distinct from Static while addressing the
"non-dominant colours don't show" feedback.

cc
2026-04-29 02:42:28 -06:00
vicrodh 69023c199c poc(kawarp): wider sample area + slightly faster drift to surface non-dominant colours
User feedback after round 2 of the A/B benchmark in the immersive view:
metrics-side kawarp is fair (CPU/GPU equal to Static within noise,
+20 MB RSS for the WebGL textures), but the existing Static panel
exposed non-dominant colours from the cover better — its
ImmersiveBackground translates the blurred image so different
regions dominate the bg over time.

Two parameter bumps to bring kawarp closer to that behaviour without
abandoning its fluid-warp look:

  - scale 1.0 → 1.5: widens the area the warp samples per frame so
    the secondary colours of the cover (peach band, yellow accents,
    etc.) come through instead of being averaged into the dominant
    tone.
  - animationSpeed 1.0 → 1.2: slightly faster drift so the colour
    movement reads as movement, not slow ambience.

cc
2026-04-29 02:39:10 -06:00
vicrodh ec1f54a6a9 poc(kawarp): match upstream demo defaults + lift content over the canvas
Two fixes after first round of A/B in the immersive view:

  - The kawarp params shipped were a tamer profile (warp 0.65, slower
    speed, deeper blur, more dither) chosen defensively. On low-contrast
    monochromatic covers (e.g. Billie Eilish "HIT ME HARD AND SOFT"
    underwater shot) the result was visibly grainy and almost static
    versus the lively domain warp on kawarp.boidu.dev. Restore the
    upstream demo defaults exactly so the look in QBZ matches what
    users see on the homepage before evaluating performance fairly.

  - The canvas at z-index 0 was painted ABOVE .track-info, hiding the
    NOW PLAYING / title / artist / album lines entirely. .artwork-wrapper
    and .artwork-container have their own position:relative so the
    cover survived, but the metadata wrapper didn't. Anchor both content
    wrappers at position:relative; z-index:1 so every panel surface
    sits above the canvas regardless of its inner positioning.

cc
2026-04-29 02:27:06 -06:00
vicrodh 3ad68a175a poc(immersive): wire kawarp WebGL background into KawarpPanel
Adds @kawarp/core (vanilla TS, zero deps, MIT) as a dev dep and mounts
it on a full-bleed canvas inside KawarpPanel, behind the existing
artwork/title content. The panel signals ImmersivePlayer to skip the
global ImmersiveBackground when active so the comparison vs Static
isn't a double-blur.

Settings tuned for album art ambience:
  - warpIntensity 0.65 (subtle organic motion, not hallucinatory)
  - blurPasses 12 (avoids visible bands on high-contrast covers)
  - animationSpeed 0.6 (slow drift, doesn't fight the music)
  - transitionDuration 1000 ms (matches the gapless lead-time so the
    background is already on the new artwork before the audio swap)
  - tintIntensity 0.12 (gentle dark anchor for low-key covers)

Lifecycle:
  - onMount creates the renderer, loads the current artwork, starts
  - $effect reloads on artwork change (kawarp does its own crossfade)
  - ResizeObserver keeps the WebGL backing store in sync with layout
  - onDestroy disposes the GL context

Compositing layer hint (will-change/translateZ) mirrors the fix used
on the 1.2.10 sticky headers — keeps WebKitGTK from repainting
surrounding chrome on every animation frame.

cc
2026-04-29 02:03:35 -06:00
vicrodh 0373b9c1fc poc(immersive): add KawarpPanel as exact duplicate of StaticPanel
Baseline checkpoint for the kawarp benchmark. KawarpPanel is currently
identical to StaticPanel (same template, same CSS, same animation set
— just an equalizer on the title row when playing). Wired into the
immersive panel selector so it can be picked side-by-side with Static
for A/B measurement.

Subsequent commits will introduce the kawarp WebGL background only
inside this panel; if the GPU/CPU/RAM delta is unjustified the panel
gets removed without touching StaticPanel.

cc
2026-04-29 01:59:29 -06:00
vicrodh 79e40d1ec5 Merge pre-release into main: flake bump to 1.2.10 2026-04-29 00:43:31 -06:00
vicrodh fd7b589866 chore(flake): bump to v1.2.10
Update qbzVersion, srcHash (via nix-prefetch-url of the v1.2.10
tarball) and npmHash (via prefetch-npm-deps on package-lock.json).

cc
2026-04-29 00:43:30 -06:00
vicrodh ffa7287baa Merge pre-release into main for 1.2.10 2026-04-29 00:19:40 -06:00
vicrodh e0fd0584fa chore(release): bump version to 1.2.10 + tag notes
Hotfix on top of 1.2.9 to address the gapless-play regression
introduced by dee987c1a's tightened isGaplessTransition gate combined
with a long-standing race in the player's transition-swap atomics.

Bumped:
- src-tauri/Cargo.toml + Cargo.lock
- src-tauri/tauri.conf.json
- package.json + package-lock.json
- snapcraft.yaml (version + source-tag) — packaging/snap/snapcraft.yaml
  follows automatically via symlink
- packaging/flatpak/com.blitzfc.qbz.metainfo.xml (new release entry)

cc
2026-04-29 00:19:32 -06:00
vicrodh 4fb7f92c67 Merge bugfix/internal/gapless-transition-swap-race into pre-release 2026-04-28 23:47:49 -06:00
vicrodh 43ac3e18fa fix(player): order gapless slot reset before track_id swap to close race
The audio-thread iteration that swaps in the next gapless track
mutates several atomics in qbz-player::player::SharedState. The
polling loop in lib.rs reads those atomics independently (one load
per field) at ~250 ms cadence and emits a PlaybackEvent that the
frontend handlePlaybackEvent then classifies. When the polling load
falls inside the swap window, it can observe an inconsistent mix:
current_track_id already advanced to the new track, but
gapless_next_track_id still pointing at that same track because the
reset hasn't run yet.

The frontend's isGaplessTransition predicate
(playerStore.ts) requires both `event.track_id !== currentTrack.id`
AND `event.gapless_next_track_id === 0`. The mid-swap event
satisfies the first and fails the second, so the event is mis-
classified as an external track change. The "Track changed
externally" branch then asks the queue manager for the current
queue track (still the previous track because the gapless flow
hasn't called v2_next_track yet) and prints the now-familiar
"Queue track mismatch or null: 212171 vs event: 216597" warn.

In 1.2.8 this race was self-recovering: subsequent ticks observed
the consistent post-swap state and isGaplessTransition fired one
tick later. dee987c1a tightened the gate with
`gaplessAttemptedForCurrent`, which gets reset to null by the
mid-swap event's external-track path; subsequent ticks then fail
the new gate and the misclassification becomes permanent for the
remainder of the track. UI stays on the previous title while the
audio plays the new one, and the queue cursor never advances —
visible to the user as "the player says it's still on Viento but
Afuera is playing".

Fix the race at the producer side: in both transition swap paths
(mainline pos>=dur detection and ALSA Direct take_source_transition),
clear gapless_next_track_id and gapless_ready BEFORE storing the
new current_track_id. With SeqCst ordering, any reader that
observes the new track_id is guaranteed to also observe the
cleared gapless slot — eliminating the inconsistent intermediate
state by construction. Cheaper than coordinating reads on the
consumer side and keeps the polling loop's lock-free design.

cc
2026-04-28 23:47:39 -06:00
vicrodh 9f02efb8f8 Merge bugfix/internal/gapless-request-armed-sticky into pre-release 2026-04-28 23:26:39 -06:00
vicrodh 9e7cd2973b fix(player): clear gapless flags on transition swap so next prefetch can fire
Two regressions ride together when gapless plays a chain of more than
two tracks:

  - The pos/dur snapshot at the top of the audio-thread iteration is
    captured BEFORE the gapless transition swap. After the swap
    updates current_track_id and duration, the local pos/dur still
    point at the outgoing track, and the "approaching end" check a
    few lines below fires immediately for the new track with stale
    299/299-style values.
  - That spurious firing arms gapless_request_armed=true and sets
    gapless_ready=true. gapless_request_armed only gets cleared again
    on a future transition (which will never happen because the new
    track has no prefetch queued) or on engine empty (i.e. when
    playback has already stopped). gapless_ready also stays sticky-
    true because nothing else clears it once the false-positive fires.
  - End result: the new track plays through with the gate stuck
    closed, the real "approaching end" check at ~T-10s never fires,
    the frontend never gets prompted to call play_next_gapless for
    track #N+1, and the audio thread reaches engine empty and stops.

Fix:
  - Track whether a transition swap consumed pending in this
    iteration via a local transition_consumed_pending bool. Skip the
    "approaching end" check while that flag is set — the next
    iteration will run with fresh pos/dur for the new track and
    fire the trigger correctly.
  - Reset gapless_ready=false in both transition swap paths
    (mainline and ALSA Direct), mirroring the existing
    gapless_request_armed=false reset, so neither flag survives a
    transition.

cc
2026-04-28 23:26:33 -06:00
vicrodh 64c7b674d3 Merge pre-release into main: flake bump to 1.2.9 2026-04-28 22:31:25 -06:00
vicrodh b1904ad70d chore(flake): bump to v1.2.9
Update qbzVersion, srcHash (via nix-prefetch-url of the v1.2.9
tarball) and npmHash (via prefetch-npm-deps on package-lock.json).

cc
2026-04-28 22:31:23 -06:00
vicrodh 2acdb23fae Merge pre-release into main: drop build-qbzd workflow 2026-04-28 21:40:15 -06:00
vicrodh ec3fbf1d3f chore(ci): remove build-qbzd workflow
The qbzd daemon is still in early development and the build pipeline
isn't ready to ship artifacts. Drop the workflow until the daemon
work lands so it doesn't fire on tag push and produce broken jobs.

cc
2026-04-28 21:40:13 -06:00
vicrodh f66c8627f6 Merge pre-release into main: 1.2.9 codename in About modal 2026-04-28 21:18:24 -06:00
vicrodh ca8084f1af chore(about): codename Quiet Polish for 1.2.9
Match the in-app About modal to the v1.2.9 tag notes.

cc
2026-04-28 21:18:23 -06:00
vicrodh 17f4095f79 Merge pre-release into main for 1.2.9 2026-04-28 21:13:17 -06:00
vicrodh 93a07acd9f docs(release-1.2.9): personalise tag notes
Reorganise the release notes around the user's voice: lead with the
"polish + bugfix + perf" framing, group user-visible polish first,
QConnect cleanup and the Look-and-Feel block (sidebar collage cache,
tray live tooltip, middle-click + scroll, icon variant picker, ksni
worker thread) next, and close with a thanks-and-roadmap paragraph
about the daemon work pushing the next release out a bit.

Credits @afonsojramos for the macOS contributions.

cc
2026-04-28 21:12:43 -06:00
vicrodh f17a1733f7 chore(release): bump version to 1.2.9 + tag notes
Quiet Polish: QConnect cleanup (#316) and a long round of Linux
tray polish. Sticky-header gap fix (no more padding-top on scroll
containers), Edit folder shortcut from the playlist sidebar (#364),
shift-range + Ctrl/Cmd+A multi-select across the remaining views,
opt-in resume of seek position (#317), and Qobuz subtitle/edition
propagated through queue / MPRIS / scrobbling (#360).

Bumped:
- src-tauri/Cargo.toml + Cargo.lock
- src-tauri/tauri.conf.json
- package.json + package-lock.json
- snapcraft.yaml (version + source-tag)
- packaging/flatpak/com.blitzfc.qbz.metainfo.xml (new release entry)

packaging/snap/snapcraft.yaml is a symlink to the root snapcraft.yaml
so it tracks automatically.

cc
2026-04-28 20:29:59 -06:00
vicrodh fc402506bf chore(icons): regenerate icon.icns from current logo
The bundled icon.icns was a 1024x1024 PNG masquerading as an .icns
container (placeholder, since no proper libicns tooling is installed
on the build machine). Regenerated from the current icon.svg so the
artwork at least matches the rest of the branding. A real .icns
container with multiple Apple-spec sizes still needs to be produced
by a macOS contributor.

cc
2026-04-28 20:29:52 -06:00
vicrodh 17730e0233 fix(tray): icon variant picker with Color option and mono labels
Three issues with the 1.2.9-pre tray icon override:

  - The mono PNGs filled the entire canvas, so the tray icon read as
    larger than its panel neighbours (Plasma + GNOME).
  - The dropdown labels were inverted: picking "Light icon" produced
    the dark glyph and vice-versa, because the constants were named
    after the panel they suit ("light panel" -> dark glyph), not after
    the glyph colour the user expects to see.
  - There was no way to pick the colour vinyl logo even on desktops
    where a monochromatic glyph clashes with the rest of the tray.

Rebuild the mono pixmaps (22/32/44/64) from icon-symbolic.svg with a
2px content inset; render a new colour set from icon.svg at the same
sizes; rename the Rust constants to glyph-colour names and introduce
an IconVariant enum so the UI label, the persisted value, and the
file selection all line up.

Dropdown options now read Auto / Mono light / Mono dark / Color in
all five locales. normalize_tray_icon_theme on the Rust side and
normaliseTrayTheme in SettingsView migrate the inverted "light" /
"dark" values stored by 1.2.9-pre to the user-intent equivalents.

cc
2026-04-28 20:29:49 -06:00
vicrodh 8cdcdd45a6 Merge feature/internal/tray-icon-theme-toggle into pre-release 2026-04-28 19:12:29 -06:00
vicrodh 388a150893 feat(settings): tray icon theme dropdown for Linux
Adds an Auto / Light icon / Dark icon dropdown next to the existing
tray toggles, hidden on macOS. Wires v2_set_tray_icon_theme so the
choice persists and the live SNI tray reflects it instantly.

i18n keys settings.appearance.tray.iconTheme.* added to en/es/de/
fr/pt.

cc
2026-04-28 19:02:50 -06:00
vicrodh ee713e3f0c feat(tray): persisted icon theme override with live update on Linux
Auto-detected dark vs light tray glyph fails on GNOME, whose top bar
is permanently dark even when the system color scheme is light, so
the dark glyph disappears against it. Add a persisted user override
("auto" / "light" / "dark") that the SNI tray respects at startup
and on the fly.

Backend pieces:
- TraySettings gains tray_icon_theme: String with "auto" default and
  a normalize_tray_icon_theme() helper that clamps unknown values
  back to "auto". SQLite migration ALTERs the table to add the
  column when an older DB is opened.
- tray_linux_ksni::decode_tray_icons takes an optional override and
  resolve_dark_tray() consults it before falling back to the
  existing GNOME/GTK/KDE auto-detection. init() forwards it.
- LinuxTrayHandle gains set_icon_theme(theme); a new
  TrayUpdate::SetIconTheme variant flows through the dedicated
  worker thread so re-decoding plus handle.update() happen outside
  the tokio runtime (same panic-avoidance pattern used for
  tooltip updates).
- v2_set_tray_icon_theme persists the value, mirrors it to the
  global startup store, and pushes it to the live tray handle so
  the icon flips without restart.

cc
2026-04-28 19:02:46 -06:00
vicrodh bf81814a65 Merge bugfix/internal/sticky-header-phantom-block into pre-release 2026-04-28 18:50:51 -06:00
vicrodh a9fccc6fe8 fix(views): pin sticky headers flush by removing scroll-container padding-top
Commit e05ed48d covered a real WebKitGTK gap by painting bg-primary in
two places: as a 32px upward box-shadow above .jump-nav /
.tracks-sticky-header, and as a fill on the .artist-detail /
.playlist-detail scroll containers. The upward box-shadow rendered as
a phantom dark block above the bar even when not pinned, sitting on
top of the social-action buttons in ArtistDetailView.

The actual cause is that CSS sticky pins to the scrollport's
padding-box top, not the border-box top. With padding-top: 8px on the
scroll container the pinned bar landed 8px below the visible top
edge, leaving the gap the original commit was trying to hide.

Move the 8px out of the scroll container's padding-top and onto the
first child (.back-btn margin-top in ArtistDetailView, .nav-row
margin-top in PlaylistDetailView). The sticky bar now pins flush. Drop
the upward box-shadow and the bg-primary fills on the scroll
containers — neither is needed once the gap is gone. Add 10px
padding-top inside .tracks-sticky-header so its taller toolbar doesn't
press against the titlebar when pinned.

cc
2026-04-28 18:50:02 -06:00
vicrodh e1922d20dc Merge feature/internal/playlist-folder-edit-shortcuts into pre-release 2026-04-28 16:38:34 -06:00
vicrodh 1a7ecccaf3 feat(playlist-manager): edit pencil in folder breadcrumb
Inside a folder the breadcrumb showed the folder name with no way to
reach the edit dialog from there. Adds a small Pencil button beside
the current folder name that reuses the existing
openEditFolderModal() helper, mirroring the per-card edit affordance
on the folders grid.

Closes part 2 of #364.

cc
2026-04-28 16:34:45 -06:00
vicrodh dd512ee5ac feat(sidebar): edit folder from context menu
Adds an "Edit folder" entry at the top of the playlist-folder context
menu in the sidebar, opening the existing FolderEditModal. The modal is
mounted globally in +page.svelte (separate instance from the one in
PlaylistManagerView) so it works from any view, and uses Tauri's ask()
for delete confirmation per the destructive-dialog convention.

Closes part 1 of #364.

cc
2026-04-28 16:34:42 -06:00
vicrodh d3ccf40ddd Merge feature/internal/tray-rich-tooltip into pre-release 2026-04-28 16:22:31 -06:00
vicrodh 7714d83212 fix(tray): apply tooltip updates from a dedicated thread
ksni 0.3.4 with the "blocking" feature wraps every Handle::update in
Runtime::block_on, which panics when called from inside an existing
tokio runtime — exactly where Tauri commands and our async polling
loop run. The panic was being swallowed by the runtime, so set_track
and set_playing looked like no-ops and the SNI tooltip kept rendering
the static "QBZ / Music Player / Nothing playing" fallback.

Move all updates onto a dedicated std::thread that owns the ksni
blocking handle and processes mutations from a std::sync::mpsc
channel, fully outside any tokio context.

cc
2026-04-28 15:59:25 -06:00
vicrodh 789b0262b6 feat(tray): live tooltip and scroll/middle-click controls on Linux
Replicate the Plasma media plasmoid tray behavior on Linux SNI panels:

- Tooltip now shows live track title, "by Artist", album line, and
  "Middle-click to play/pause" + "Scroll to adjust volume" hints.
- Middle-click (SecondaryActivate) emits tray:play_pause instead of
  toggling the window — the window toggle stays on left-click.
- Mouse wheel (Scroll) emits tray:volume_delta with normalised ticks
  (~120 SNI units per notch -> +/-5% volume per tick), wired to the
  existing handleVolumeChange path on the frontend so QConnect remote
  renderers and the local player both respond.

Architecture: ksni 0.3.4's blocking Handle is now stored as
LinuxTrayHandle in Tauri state. v2_set_media_metadata pushes track
fields into the tooltip, and the playback poll loop mirrors the
play/pause flag so the hint flips while the panel popup is open.

cc
2026-04-28 15:29:04 -06:00
vicrodh a47d00cd71 Merge feature/queue-stop-after into pre-release
Adds two queue actions per #356:
- Stop after this track (single transient marker, pauses on natural
  end, queue intact). Works with both standard and gapless playback
  paths.
- Remove all tracks after this (drops queue tail, toast feedback).

Backend lives in qbz-player::queue (V2 cleanroom) so headless and
TUI clients also get the feature without UI-specific code paths.
44 unit tests in qbz-player::queue, 4 Tauri commands, 5-locale
i18n with ICU plural for the toast.

Refs #356.

cc
2026-04-28 15:10:33 -06:00
vicrodh fbbbf72220 fix(playback): suppress gapless prefetch when current track has stop-after marker
Manual verification (#356) caught that the audio engine's gapless
prefetch was bypassing the marker. Sequence: ~10s before track end
the engine asks the frontend for the next track via the gapless
callback; once a successor is queued, the engine transitions
internally without firing setOnTrackEnded — so consumeStopAfterIf
never ran and the marked track's end seamlessly continued playing.

Fix: in the setGaplessGetNextTrackId callback in +page.svelte,
return null when the currently-playing track matches the marker.
With no successor pre-queued, the track ends naturally, fires
setOnTrackEnded, and the existing consume path pauses correctly.

Known edge: if the marker is set during the last ~10s of a track,
the gapless prep already happened and the transition still fires.
Acceptable for v1 — full coverage would require backend cancel of
in-flight gapless prep.

Refs #356.

cc
2026-04-28 15:10:17 -06:00
vicrodh 0d62007a1c feat(playback): wire stop-after marker into natural track-end handler
setOnTrackEnded in +page.svelte calls consumeStopAfterIf(finishedId)
before advancing. If it returns true: stop playback, set isPlaying
to false, return without advancing. Manual skip paths (player bar
Next, click on queue track) don't go through this callback, so the
marker correctly only fires on natural reproduction. Cast/DLNA
natural-end is covered by the same callback per playerStore.ts:631-633.

Refs #356.

cc
2026-04-28 14:37:32 -06:00
vicrodh 32c7cbd2ff fix(queue): use ICU plural for tracksRemoved toast
Per code review on commit cdf30a7b: the tracksRemoved key was
hardcoded plural ("1 tracks removed" reads wrong). Convert to ICU
plural form across all 5 locales using svelte-i18n's MessageFormat
support. Also align the new handlers with the existing closeMenu()
pattern for consistency.

Refs #356.

cc
2026-04-28 14:31:35 -06:00
vicrodh cdf30a7b74 feat(queue-panel): add stop-after and remove-after menu entries
Two new context-menu entries on queue tracks:
- Stop after this track (dynamic label: shows "Cancel" if already set)
- Remove all tracks after this (hidden on the last track)

Visual indicator: marked track replaces its index display with a
small CircleStop icon in the accent color.

Refs #356.

cc
2026-04-28 14:26:58 -06:00