Skip to content

feat(desktop): now playing with playback controls and queue (P3-11)#84

Merged
forkwright merged 2 commits intomainfrom
p3-11/now-playing
Mar 14, 2026
Merged

feat(desktop): now playing with playback controls and queue (P3-11)#84
forkwright merged 2 commits intomainfrom
p3-11/now-playing

Conversation

@forkwright
Copy link
Owner

@forkwright forkwright commented Mar 14, 2026

Summary

  • Add full now-playing bar (transport controls, progress bar, volume, quality indicator) to the desktop app's fixed bottom area
  • Implement Rust Tauri playback backend: DesktopQueue with shuffle/repeat, stream download via HTTP, akroasis-core Engine integration, 18 IPC commands
  • Add features/now-playing/ TypeScript feature: Zustand store, hooks (usePlaybackState, useQueue, useSignalPath, useKeyboardShortcuts), components (NowPlayingBar, TransportControls, ProgressBar, VolumeControl, TrackInfo, QualityIndicator, ExpandedView), pages (QueuePage, SignalPathPage)
  • Wire library integration: double-click-to-play and per-row play/add-to-queue on TracksPage; play-album/shuffle-album/add-to-queue overlays on AlbumsPage
  • Add /queue and /signal-path routes; keyboard shortcuts (Space, arrows, M, N, P, S, R)

Blast radius

  • desktop/src-tauri/Cargo.toml — new deps: snafu, tracing, rand, akroasis-core, tokio sync/time
  • desktop/src-tauri/src/lib.rs — registers 18 new playback IPC commands
  • desktop/src-tauri/src/playback/ — new module: mod.rs, queue.rs, stream.rs, signal_path.rs, commands.rs
  • desktop/src/types/playback.ts — new shared TS types
  • desktop/src/features/now-playing/ — new feature directory (store, hooks, components, pages)
  • desktop/src/components/Layout.tsx — replaces placeholder with <NowPlayingBar />
  • desktop/src/App.tsx — adds /queue and /signal-path routes
  • desktop/src/features/library/TracksPage.tsx — double-click-to-play, play/add-to-queue buttons
  • desktop/src/features/library/AlbumsPage.tsx — album play/shuffle/add-to-queue overlays
  • desktop/src/api/client.ts — adds listTracksForAlbum

Validation gate

All gates pass:

  • cargo check — zero errors
  • cargo clippy -- -D warnings — zero warnings
  • npm run lint (eslint) — zero errors
  • npm run build (tsc + vite) — clean build, 382 KB bundle

Test plan

  • Build desktop app with npm run tauri dev
  • Verify now-playing bar renders at bottom of layout
  • Verify transport controls (play/pause/next/prev/shuffle/repeat) invoke IPC
  • Verify progress bar click-to-seek works
  • Verify double-click on a track row in Tracks tab starts playback
  • Verify ▶ and + buttons appear on track row hover
  • Verify album card shows play/shuffle/add overlays on hover
  • Verify /queue route renders drag-to-reorder queue page
  • Verify /signal-path route renders signal path chain
  • Verify keyboard shortcuts: Space (play/pause), N/P (next/prev), S (shuffle), R (repeat), M (mute)
  • Verify expanded view opens/closes via button and Escape key

Observations

  • listTracksForAlbum calls /api/music/release-groups/{id}/tracks; this endpoint is not yet in Mouseion. A follow-up backend PR is needed. Album play actions fail gracefully (empty tracks → no-op) until then.
  • akroasis-core Engine requires unsafe impl Send + Sync for PlaybackEngine because Arc<Engine> cannot be proven Send automatically; Engine declares these traits explicitly via unsafe impl in the core crate.
  • Stream download fetches the entire audio body before writing to a temp file. For large lossless files this is a concern. Chunked streaming write is a future optimization.

@github-actions
Copy link
Contributor

⚠️ Large PR detected — 26 files, 3088 lines changed.

Consider splitting into smaller PRs for easier review. Not a blocker, just a signal.

@forkwright forkwright changed the title feat(desktop): now playing view with playback controls (P3-11) feat(desktop): now playing with playback controls and queue (P3-11) Mar 14, 2026
Cody Kickertz added 2 commits March 14, 2026 02:03
…d (P3-11)

Add double-click-to-play and per-row play/add-to-queue buttons to TracksPage.
Add play-album, shuffle-album, and add-to-queue overlays to AlbumsPage.
Fix cargo fmt style in dsp and playback modules; remove unused stopPlayback
binding from TransportControls; add listTracksForAlbum to api client.
@forkwright forkwright merged commit 93fdf14 into main Mar 14, 2026
12 checks passed
@forkwright forkwright deleted the p3-11/now-playing branch March 14, 2026 02:08
This was referenced Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant