feat(slint): immersive Album Reactive mode + mode scaffold + provisional selector

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
This commit is contained in:
vicrodh committed 2026-06-13 07:48:53 -06:00
1 parent 9546656734
commit 92052a3c2a
4 files changed
+377 -1

No files matched your search

+8 -1
View File
@@ -4931,7 +4931,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// layouts land.
("npb-view", "immersive") => {
if let Some(w) = weak.upgrade() {
w.global::<ImmersiveState>().set_open(true);
let im = w.global::<ImmersiveState>();
// Open deterministically into Album Reactive (mode 0):
// the only real foreground this session. Property default
// is already 0; set explicitly so a prior session's mode
// (once persistence lands) never reopens onto an empty
// atmosphere-only placeholder.
im.set_mode(0);
im.set_open(true);
w.global::<VisualizerState>().invoke_set_enabled(true);
}
}