Commit Graph
5310 Commits
Author SHA1 Message Date
vicrodh e4835b6c55 fix(i18n): move titlebar block from settings.appearance to settings root
The Task 9 SettingsView consumer reads settings.titlebar.* directly
(see lines 1030, 1037, 4666, 4678 of SettingsView.svelte). The original
Task 11 commit placed the block under settings.appearance.titlebar
which would not resolve. Moving the block one level up.

cc
2026-05-03 20:30:25 -06:00
vicrodh 4e854072fa i18n(titlebar): add mode labels, disabled hints, sandbox caveat
Five locale files updated in lockstep: en, es, de, fr, pt. Mexican
Spanish dialect for es.json per project convention.

cc
2026-05-03 20:26:02 -06:00
vicrodh 0546dbf5cb feat(layout): mount TitleBar by mode + Sidebar consumes effective getters
The +page.svelte mount gate now reads shouldShowTitleBar() so layout
reacts to mode changes. Sidebar reads the effective search-location
and titlebar-nav getters so search and nav fall back to the sidebar
in system/hidden modes regardless of user pref. miniplayerService
reads getMode() instead of the removed legacy boolean.

cc
2026-05-03 20:14:23 -06:00
vicrodh d69c67ad34 fix(settings): include current mode in fallback availableModes
When v2_available_titlebar_modes fails, the dropdown's selected value
may not appear in its options. Include the user's current titlebarMode
in the fallback list to ensure the selected value is always present.

cc
2026-05-03 20:09:49 -06:00
vicrodh b7c686e99c feat(settings): mode dropdown replaces hide/system toggles
Single Dropdown drives the titlebar mode. Orthogonal toggles
(window controls, match-chrome, search location, titlebar nav) are
shown disabled with explanatory tooltips when the active mode does
not apply them. Sandbox caveat is shown inline when Plasma mode is
selected inside Flatpak/Snap.

cc
2026-05-03 20:01:36 -06:00
Afonso Jorge Ramos 1e3f5ab981 fix(audio): populate macOS output device picker 2026-05-04 00:31:21 +02:00
vicrodh b8ef96d600 fix(titlebar-store): align getTitleBarHeight with rendered CSS
The CSS at .titlebar / .titlebar.variant-full was already 44px before
this branch, and +page.svelte / Sidebar.svelte hardcode 44px in their
calc() reservations. The store was returning 40 — a latent lie waiting
for Task 10's layout consumers. Change qbz mode to return 44 so all
sources agree before they get wired together.

cc
2026-05-03 15:42:17 -06:00
vicrodh a811e2b032 feat(titlebar): variant-aware rendering (full vs stripped)
The full variant matches current behavior. The stripped variant (used
in plasma mode) drops drag region, dblclick maximize, window controls,
and rounded chrome — KWin SSD owns those. Search and per-item nav
remain in the strip below the SSD.

cc
2026-05-03 15:35:31 -06:00
vicrodh b47222d8cb feat(stores): effective getters that read titlebar mode
Search bar falls back to sidebar in system/hidden modes regardless of
user pref. Titlebar nav is N/A outside qbz/plasma. Both getters are
non-destructive: the user's persisted preference is preserved and
resumes when the mode allows it again.

cc
2026-05-03 15:30:30 -06:00
vicrodh 8d9e38d3ab fix(titlebar-store): pessimistic setMode + drop unconditional backend sync
Two issues raised in code review on Task 6:
1. setMode now invokes the backend before mutating local state, so a
   backend rejection leaves frontend state untouched and consistent.
2. Drop the unconditional v2_set_titlebar_mode invoke in initTitleBarStore.
   The migration path already covers the legitimate divergence case;
   firing it on every launch was overhead with no functional benefit.

cc
2026-05-03 15:27:46 -06:00
vicrodh 0dd509305b feat(titlebar-store): mode-based store with legacy migration
Replaces hideTitleBar/useSystemTitleBar booleans with a single mode
enum. First-run migration reads localStorage legacy keys, derives the
new mode deterministically, and pushes it to the backend. setMode
restarts the app only when the change crosses the decoration boundary.

cc
2026-05-03 15:21:31 -06:00
vicrodh 2794860bc0 feat(main): set GDK_BACKEND=x11 when titlebar_mode is Plasma
Reads the persisted titlebar mode at startup via WindowSettingsStore::new_readonly()
then composes the X11-forcing condition with the existing graphics force_x11
setting. Plasma mode now produces real KWin SSD on Wayland sessions without
requiring users to set the env var externally.

cc
2026-05-03 15:16:23 -06:00
vicrodh 4215b075a2 feat(lib): wire titlebar_mode into window builder, register new v2 commands
Window builder now derives decorations from TitlebarMode::wants_decorations()
which returns true for System and Plasma. Transparency gate now requires
mode=Qbz so plasma/system/hidden modes do not build a transparent window
that would leak through KDE/system chrome. The v2 command registry is
updated to expose the new mode commands and drops the legacy boolean
setter.

cc
2026-05-03 15:11:34 -06:00
vicrodh e444d3594d feat(commands-v2): add v2 titlebar-mode commands, drop v2_set_use_system_titlebar
The new commands cover get, set, and platform availability. The legacy
boolean setter is removed because the mode enum is now authoritative.

cc
2026-05-03 15:03:50 -06:00
vicrodh dae22574a6 feat(window-settings): add available_titlebar_modes and is_sandboxed helpers
Detection of KDE+Wayland for Plasma-mode availability. The is_sandboxed
helper drives the frontend caveat hint about Flatpak/Snap.

cc
2026-05-03 14:50:04 -06:00
vicrodh 045236f716 feat(window-settings): add TitlebarMode enum and titlebar_mode column
Adds a 4-value mode enum (Qbz | System | Plasma | Hidden) to the existing
WindowSettings store, with column migration that infers mode from the
legacy use_system_titlebar flag. Setter is write-through so the legacy
column stays consistent for any remaining readers.

cc
2026-05-03 14:44:41 -06:00
DoubleGateandCopilot Autofix powered by AI c46922c408 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-03 02:29:24 -04:00
DoubleGate 6578e81712 fix(sidebar): skip isOffline $effect on initial subscription
Svelte 5's $effect on a derived store fires on its initial
subscription, causing loadUserPlaylists() to run a second time
right after onMount(). Guard with a flag so the effect only fires
on actual offline -> online transitions.

Refs #382
2026-05-03 02:21:45 -04:00
vicrodh 773fa390eb i18n(settings): make qconnect startup-mode title explicit
"Auto-connect on startup" → "Auto-connect Qobuz Connect on startup"
(and equivalents in es/de/fr/pt). The earlier wording was ambiguous —
it could read as auto-connecting QBZ itself, not the QConnect feature.

cc
2026-05-01 16:01:51 -06:00
vicrodh 63745a480f fix(qconnect): trigger startup auto-connect after OAuth restore, not during setup
The auto-connect spawn was firing at the end of the Tauri setup hook,
before the frontend invoked runtime_bootstrap. At that point the API
client is not yet initialized (bundle tokens not extracted, no auth),
so service.connect always failed silently and the lifecycle stayed Off
even when startup_mode was On or Remember-last-on.

Move the trigger into v2_runtime_bootstrap, right after the OAuth token
restore + session activation + CoreBridge auth complete. The CLI
override (--enable-qconnect / --disable-qconnect) is exposed via a
managed QconnectCliOverride wrapper so bootstrap can read it.

cc
2026-05-01 15:58:14 -06:00
vicrodh 74775aaebf Merge branch 'feature/internal/qconnect-startup-persistence' into pre-release 2026-05-01 14:25:59 -06:00
vicrodh aa0f3c97eb i18n(settings): add qconnect startup mode strings (en/es/de/fr/pt)
Six new keys under settings.integrations.qconnect.startupMode covering
the dropdown labels, description, and local-library compatibility note.

cc
2026-05-01 13:34:11 -06:00
vicrodh 56951c6510 feat(settings-ui): qconnect startup mode dropdown + local-library hint
Adds the three-state dropdown to Settings > Integrations next to the
device-name field, plus a permanent compatibility note about local
library being incompatible with QConnect.

cc
2026-05-01 13:30:23 -06:00
vicrodh a6fb1cd018 feat(qconnect): write-through last_known_state on connect/disconnect
When startup_mode == RememberLast, persist the latest on/off state so
the next launch can restore it. No-op for Off/On modes.

cc
2026-05-01 13:10:39 -06:00
vicrodh 7bbe68d5b0 feat(qconnect): register v2_qconnect_get/set_startup_mode in invoke handler
cc
2026-05-01 13:08:57 -06:00
vicrodh 398b4ea807 feat(qconnect): add v2_qconnect_get/set_startup_mode commands
String-typed wire shape for predictable serde behavior across the
Tauri invoke boundary. Validates against QconnectStartupMode::from_str.

cc
2026-05-01 12:39:43 -06:00
vicrodh d5ae31aa1b fix(qconnect): move startup auto-connect to end of setup hook
The auto-connect spawn was running on a worker thread before CoreBridge
inner init completed, risking undefined behavior in service.connect.
Moving it to the end of setup ensures all init runs first.

cc
2026-05-01 12:37:48 -06:00
vicrodh 6f38362b9f feat(qconnect): apply startup_mode + CLI override during app setup
Spawns a background auto-connect task during the Tauri setup hook when
the effective startup decision says so. Failures log a warn and leave
lifecycle in Off; no infinite reconnect loop on first-time failure.

cc
2026-05-01 12:30:32 -06:00
vicrodh 27cb2ab6cc feat(qconnect): parse --enable-qconnect / --disable-qconnect CLI flags
Volatile per-launch override. Both flags together → enable wins
deterministically with a warn log. The override is threaded into
lib::run() and consumed in the next task.

cc
2026-05-01 12:20:35 -06:00
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