Swap the winit renderer femtovg(GL) -> femtovg-wgpu (+ unstable-wgpu-28,
slint pinned =1.16.1) and render a WGSL plasma fragment shader into a wgpu
texture composited under ImmersiveView. The shader is fed by the existing
30fps visualizer drain (sub-bass energy + decayed transient) and toggled
in-view with the 'g' key via ImmersiveState.shader-mode; when active it
replaces the atmosphere + mode panels as the bottom layer, chrome stays on
top. Device/queue captured from Slint's rendering notifier so Image::try_from
shares Slint's wgpu device.
Phase 0 spike: validates the app-wide renderer swap with no font/UI/tray
regression. Pending macOS Metal smoke before the swap lands on slint-mvp.
cc
On large windows the panels left big empty space; on small they were fine.
Make the art/covers grow to fill while keeping small-window behavior.
- AlbumReactivePanel: art cap 460->660, width frac 0.55->0.62 (grows more,
center-anchored pulse untouched).
- StaticPanel: cap 460->640, width 0.55->0.62 (fills large windows).
- CoverflowPanel: center cover cap 440->560, width 0.42->0.52; wrap the fan +
track-info in ONE center-aligned VerticalLayout so the composition is
vertically balanced (kills the "covers clustered at top, empty bottom" look
on large windows). Persistent-element model / dual repeaters / animated
scroll / z-order all untouched — only sizing + the wrapping layout changed.
- New shared ImmersiveTrackInfo.slint (Now Playing indicator + EqualizerBars +
title/artist/album/quality badge), standardized on Static's look; all three
panels use it, removing three duplicated inline copies (they can't drift).
cc
Slint 1.16 has no per-element z-index (paint order = model/child order), so a
single Repeater painted the right (upcoming) side near->far = far covers on top
(disordered), and it also drew a ghost center card under the dedicated one.
- Split the fan into a LEFT Repeater (forward coverflow-tracks: paints
far-left->near-left, near on top) and a RIGHT Repeater over a new reversed
model coverflow-tracks-rev (walks far-upcoming->near-upcoming, near on top).
Both compute offset from the original flat index so geometry matches and the
±0.5 hand-off during a slide is seamless. Center band owned solely by the
dedicated top card -> no ghost.
- coverflow-tracks-rev is built only under the same id-sequence-hash rebuild
gate (no churn on advance) by cloning+reversing the forward QueueItems, so a
track's element holds the SAME decoded image on both lists: no source
reassignment on advance (no spike), and the animated `scroll` slide is intact.
- 3 past + center + 3 upcoming, mirror POSITIONS (scale/dim by |offset| only;
no reflection). Nav mapping (play-history / play-coverflow-upcoming) preserved.
cc
The album art appeared to drift sideways while pulsing; Tauri's art only scales
in place (transform: scale, intrinsically center-anchored) like a vibrating
loudspeaker cone, with no translate.
Cause: the Slint port animated `x, y` alongside `width, height` on the art +
glow. x/y are the centering offset (parent.width - self.width)/2; putting them
on their own 100ms easing timeline desynced the centering from the size, so the
box eased off-center mid-pulse - the reported lateral movement.
Fix: animate only `width, height`; x/y stay plain bindings that recompute in
lockstep with the animated size, so the art grows/shrinks from a rock-solid
center. Faithful to Tauri's center-anchored scale (scale source kept on
global-energy, not bass - bass only drives the glow in Tauri). Atmosphere,
other panels, player, and audio backend untouched.
cc
Rebuild that finally kills the per-click CPU spike, using the classic
coverflow architecture (the owner's reference: Addy Osmani / iPhone-2007).
Root cause of the spike (now removed): every navigation re-ran refresh_async
which REPLACED the coverflow VecModels, so Slint dropped + rebuilt all 7 bound
Image elements and re-uploaded/re-decoded every cover on each click.
New architecture:
- A single STABLE flat cover model, QueueState.coverflow-tracks =
[history oldest..newest, NOW, upcoming...], + an int coverflow-index. An
order-sensitive id-sequence hash gates the model setter: a pure track advance
(same sequence, pointer moves) does NOT rebuild the model - only the index
updates. So the Repeater is never rebuilt and visible covers never re-decode.
Rebuild happens only on a real content change (new queue / shuffle / add /
remove).
- CoverflowPanel: a Repeater over coverflow-tracks; each card's transform is a
pure function of offset = index - scroll. `scroll` is a float bound to
coverflow-index with `animate scroll { 320ms }` - GPU-composited slide that
repaints only during the transition then idles (no animation-tick / Timer, so
idle = no continuous render). Flat scaled cards (no rotateY/skew/reflection),
per-depth black-overlay dim, center painted last + non-interactive, ~7 visible.
- Windowed lazy decode (+-4) reusing the DECODED_PIXEL_CACHE; at most the one
newly-entering cover decodes per advance.
- Side cards navigate via queue-wide play_history / play_coverflow_upcoming.
- Bonus: atmosphere bg de-dupes by URL (ATMOSPHERE_LAST_URL) so a track change
no longer re-blurs the same cover. [coverflow-perf] debug timers added.
cc
Owner rebuild: cheap "rocola" of flat scaled cards, and eliminate the CPU spike
on every navigation click.
CPU spike (root cause): each queue navigation re-ran refresh_async, whose
to_item reset EVERY rebuilt row's artwork to Image::default(), discarding the
already-decoded handles for the 6-of-7 on-screen covers; each was then
re-decoded (the disk cache stored only compressed bytes, so even a hit ran a
full image::load + thumbnail). Dozens of full JPEG/PNG decodes per click.
Fix: (A) artwork.rs decoded-pixel cache (DECODED_PIXEL_CACHE keyed by url+size;
fetch_and_decode_ref consults it before any disk read/decode); (B) queue.rs
to_item_reuse + per-list prior-art id-diff carries unchanged decoded handles
across the model rebuild (no blank, no re-decode); load_artwork short-circuits
on a decoded-cache hit. Net: at most the one newly-revealed cover decodes.
Pyramid (CoverflowPanel.slint rebuilt): 7 flat cards (3 history left + center +
3 upcoming right), center declared last (paints on top), step-down scale
(1.00/0.80/0.64/0.50) + per-depth black-overlay attenuation on an inner Rectangle
(0/0.22/0.40/0.55). NO rotateY/skew/perspective, NO reflection, NO far-edge
gradient, NO root transparency. Removed the 500ms x/width/height reflow (it
re-laid-out clipped images every frame); only a 120ms GPU opacity cross-fade on
the dim overlay remains. Center drop-shadow static. 132px player clearance kept.
Correctness fix (review blocker): the coverflow upcoming cards index the
UNFILTERED next-3 (coverflow-upcoming), so routing their click through the
paged/filtered play-upcoming played the wrong track on a paged/searched sidebar.
Added QueueState.play-coverflow-upcoming -> queue.play_coverflow_upcoming, which
plays the queue-wide upcoming index directly via play_upcoming_at. History
already indexes queue-wide via play-history.
cc
The bars used a fixed cyan->purple default. Now they take contrast colors from
the album artwork, with a negative-fallback for dark covers (a near-black
Metallica album would vanish against the black background -> invert so the bars
pop).
- immersive.rs: spectrum_colors() extracts the most saturated sample as primary
+ a hue-distinct secondary (channel-rotated if none distinct); if the cover is
too dark/desaturated it uses the NEGATIVE of the average. ensure_visible_on_black()
inverts a too-dark color and lifts a dim one so both stops read on black.
- ImmersiveState gains spectrum-primary / spectrum-secondary (defaults cyan->purple
until art resolves); set in playback.rs from the same decoded artwork as
glow-color / bg-image.
- SpectrumPanel binds the bar gradient to those (base = primary, tip = secondary).
cc
The cubelet port instantiated ~80 Rectangles per column x2 mirror x14 bins
(~2240 retained scene-graph nodes) whose `visible` flipped every frame off an
animated `shown-cubes`. Audio updates at 30fps kept that animation from ever
settling, so ~2240 visible-bindings re-evaluated per frame and femtovg
re-rasterized hundreds of tiny rects - ~5fps and a large CPU spike. Tauri is
cheap because it is immediate-mode Canvas2D (fillRect), not a retained tree.
Fix: one solid gradient bar per column (2 nodes/pair, ~28 total) with an
animated height. Same geometry (28 mirrored columns, baseY 0.85H, maxBarHeight
0.7H, widths/offsets), same data binding (VisualizerState.bars, bounds-safe),
same cyan->purple default gradient (now a vertical fill instead of per-cube).
Dropped the discrete-cubelet texture for the perf win; it can return cheaply as
a static stripe overlay if wanted. Removed the unused cube-indices array.
cc
Replaces the provisional S2 ModeBar with the polished segmented mode pill,
copying the compact player's visual language (owner instruction).
- Pill tokens copied verbatim from ImmersivePlayerBar: background #00000080,
1px #ffffff2e border, drop-shadow blur 32 / #00000066 / offset-y 8 (the
shadow is the main upgrade - the provisional bar had none), radius 12.
- 4 tabs (icon + label): Album Reactive / Static / Coverflow / Spectrum, with
existing icon assets. States per chrome.md: idle #ffffffb3, hover #ffffff1f
bg / #fffffff2, active #ffffff33 bg / #ffffff; 13px, weight 500->600;
150ms background animate. Leading panel-left glyph + 1px divider (decorative).
- Mount site unchanged: same chrome-visible auto-hide opacity (on the instance,
not the root), same select(idx) => mode + wake() wiring, no second timer.
- The 4 mode foregrounds, player, volume fix, atmosphere, responsive sizing,
and ESC are untouched.
Logged nits: border alpha matches the player (0.18) not the Tauri header tabs
(0.15) - intentional for one design language; leading panel icon is inert
(Tauri's is a functional split/focus toggle, out of scope).
cc
New SpectrumPanel.slint: faithful port of VisualizerPanel.svelte (the 16-bar
spectrum, not SpectralRibbon/Oscilloscope/LineBed).
- 16 source bars, bins {1,15} excluded -> 14 active -> 28 mirrored columns.
Geometry exact to source: bar-gap 4, total-bar-width W/28, baseY 0.85H,
maxBarHeight 0.7H, xLeft/xRight per spec.
- Discrete 6px+2px cubelets with per-cubelet gradient (gradientRatio
min(c/20,1), primary->secondary). GPU path (ADR-011); CPU flat fallback not
ported (Slint is GPU by default).
- Heights driven by VisualizerState.bars (bounds-safe clamp, 30fps len-16
VecModel) + a short animate settle - NO Timer. Bars already smoothed+clamped
in qbz-audio (no double-EMA). Now-playing card reuses the sibling pattern.
- Mounted on mode==3; modes 0/1/2 untouched.
Logged minors: MAX_CUBES=80 clips full-amplitude bars on very tall / 4K
windows (raise as a cheap follow-up); two-color gradient ships the Svelte
default cyan->purple (no album-derived secondary color wired yet); smoothing
is the Rust asymmetric EMA, not the Svelte symmetric 0.6 (deliberate, shared
pipeline).
cc
New CoverflowPanel.slint: honest pure-Slint 2D rendition of CoverflowPanel.svelte.
The true rotateY/perspective 3D tilt is impossible in declarative Slint and is
deferred to a future wgpu/Skia session - NO fake tilt (owner decision).
- 5-slot fan: now-playing centered + painted on top; QueueState history fanned
left, upcoming right. Depth via scale (center / *0.68 / *0.54) + per-depth
drop-shadow + distance dim overlay + far-edge shade gradient. Zero
rotate/perspective/skew (grep-confirmed).
- ~500ms reflow on track change via pure-Slint animate x/width/height/opacity
(no queue.rs change, no changed-geometry watchers).
- Side covers navigate via QueueState play-history / play-upcoming; center is
not clickable (matches Tauri). Empty/unresolved-art guarded with visible:.
- Responsive: base derived from viewport-height (reserve 364) + width*0.42 cap,
offsets clamped inside the window; song card under the fan reuses the
Static/AlbumReactive pattern. Mounted on mode==2; modes 0/1/3 untouched.
Deferred/cosmetic (logged): cover image pops on rebind instead of physically
traveling (needs a CoverflowState slide); no reflection sheen; no explicit
badge; no CPU-mode animation degrade.
cc
New StaticPanel.slint: 1:1 port of StaticPanel.svelte. The calm, centered
now-playing card over the moving atmosphere. NON-reactive (no VisualizerState
energy, no glow halo, no breathing) - the only motion is the fixed-period
4-bar equalizer (animation-tick, shown only while playing), faithful to source.
- Responsive art reused from Album Reactive (height-driven + width*0.55 cap +
clamp 180..460), reserve 364px = pad-top 52 + spacing 20 + info ~160 +
player clearance 132 (no *1.25 since Static doesn't breathe). Metadata never
clips under the player.
- Metadata: now-playing indicator / title 28/700 / artist 18 / italic album /
centered QualityBadgeFull - matching the sibling and the Svelte source.
- ImmersiveView mounts it on ImmersiveState.mode == 1 (replaces the placeholder).
Modes 0/2/3 untouched.
Accepted parity drops (match the shipped sibling + state model): explicit
badge omitted (no NowPlayingState.explicit field), no hover lift, label not
uppercased.
cc
The art was sized min(52vh, 460px) with only an 88px bottom pad, so on shorter
windows the art-block + metadata overflowed and the quality badge was clipped
under the floating player bar.
- base-art now derives from available height: it sizes the whole group
(art*1.25 growth + 40px spacing + ~160px info + 132px player clearance) to
fit viewport-height, with a viewport-width*0.55 cap for narrow windows,
clamped to 180..460px.
- padding-bottom 88 -> 132 (clears the 90px player + 24px margin + gap);
spacing 60 -> 40. Reserve constant kept in sync with base-art.
The Static panel (S3) will reuse this same responsive sizing.
cc
Builds the foreground layer on Codex's accepted atmosphere+player base.
- ImmersiveState.mode (int, default 0): 0 Album Reactive / 1 Static /
2 Coverflow / 3 Spectrum. Compact 0..3 enum for the scaffold (Tauri has no
single integer mode; it uses viewMode + activeFocusTab strings).
- ImmersiveView layer stack: atmosphere (bottom) -> mode foreground ->
auto-hide player -> ModeBar selector. Modes 1/2/3 mount no foreground yet
(atmosphere-only placeholder, TODO S3/S4/S5).
- Provisional ModeBar selector (top-center, auto-hides with chrome-visible),
to be replaced by the polished segmented bar in the header session.
- New AlbumReactivePanel.slint: faithful port of AlbumReactivePanel.svelte
(387 lines), NOT the rejected breathing-art proof. Exact maps:
global-energy = avg(energy[0..5]); bass = avg(energy[0..2]);
art-scale 1+global*0.25; glow-spread 15+bass*200; glow-opacity
min(0.1+global*1.5,1); 4-bar now-playing equalizer driven by
animation-tick() (not a Timer). Album-derived glow from the already-wired
ImmersiveState.glow-color; energy already published by visualizer.rs.
- main.rs immersive arm sets mode=0 on open (deterministic).
Flagged minors (deferred, see overnight log): glow tint not reset on
track-change until the new cover decodes; raw energy + 100ms animate vs the
Svelte asymmetric EMA; glow drop-shadow-blur only (no spread term); explicit
badge omitted (no NowPlayingState.explicit field); clamp art-scale energy to
avoid a clip at the block boundary on loud transients.
cc
The immersive compact player's volume bar never respected the volume lock and
diverged from the Tauri VolumeSlider UX. Units were already correct (0..1
end-to-end); the bug was missing lock gating + a bare progress strip.
- Add `vol-locked` to ImmersivePlayerBar, byte-identical to PlayerBar.slint:
(backend-is-alsa && alsa-plugin-is-hw && !is-remote) || volume-locked.
Import SettingsState.
- Gate the mute button and the volume bar's changed handler on vol-locked;
dim the bar to 0.4 when locked (mirrors PlayerBar). The bottom seek bar is
left ungated (correctly).
- Bring the volume control up to Tauri shared/VolumeSlider.svelte UX: a new
VolumeBar with a hover-revealed thumb, drag/hover percent readout, and
locked-state fill pinned to 100%. Kept the custom primitive (QbzSlider is
integer 0..100 / QbzVerticalSlider is vertical; neither fits the float 0..1
white-on-glass immersive look). Centered play disc and seek bar untouched.
cc
Foundation for the ImmersiveView Slint port. Authored by Codex and accepted by
the owner after live visual iteration; committed here so the panel work builds
on top of it. The Album Reactive foreground was intentionally left out (a prior
attempt was rejected) so it can be rebuilt cleanly on this base.
Audio-transport lift (slice 1):
- qbz-audio: VizFrame/VizSink trait + spawn_visualizer_thread; FFT producer
lifted off tauri::AppHandle. Protected audio path untouched (seam =
RingBuffer.snapshot).
- src-tauri: fft_processor gutted to a thin TauriVizSink emitting byte-identical
viz:* events.
- qbz-app: AppRuntime::with_visualizer + visualizer_tap accessor.
- qbz-slint: SlintVizSink + install() publishing VisualizerState
bars/spectral/energy/waveform/transient at 30fps, zero IPC.
Immersive base (slice 2a):
- immersive.rs: host-side atmosphere generation from decoded artwork
(8x8 sample -> upscale -> blur -> saturate/contrast/normalize -> vignette),
mirroring Tauri texture-loader.ts::generateAtmosphere; plus glow_color.
- ImmersiveAtmosphere.slint: reusable animated atmosphere (4 counter-drifting
copies via animation-tick); usable static for Album/Artist headers later.
- ImmersiveView.slint: base overlay (atmosphere + auto-hide Tauri-shaped compact
player only). Foreground panels are rebuilt on this base.
- AppShell mounts the overlay; ViewMode menu opens Immersive in PlayerBar/Small.
cc