Conversation
Implement optional audio preview when hovering over songs in the Folders view. Features include: - Toolbar toggle button (off by default) to enable/disable hover preview - ~0.5s dwell delay to avoid accidental audio playback while scrolling - Dedicated <audio> element (never touches main player) - Equalizer indicator animation overlay on song art while playing - Per-surface localStorage persistence - Automatic fallback through preview.ogg → stems/full.ogg → stems/audio.mp3 Bump Folder Library from 1.8.0 to 1.9.0. Remove 'auto play on hover' from roadmap as it's now implemented.
Move audio member selection logic from frontend to backend. The frontend was probing multiple candidate audio files with error/retry logic, often resulting in 404s. Now the backend resolves the best available audio file (preview.ogg, stems/full.ogg, or any stem) during metadata extraction and includes it in song metadata as `audio_member`. The frontend makes a single, guaranteed request instead of multiple probes. Simplifies the preview flow and improves reliability.
Make the hover-preview feature opt-out instead of opt-in (defaults to on). Increase dwell delay from 500ms to 800ms to prevent accidental triggers while clicking/dragging. Replace 4-bar equalizer indicator with 9-bar waveform with staggered animation and fade-in entrance. Add guards to prevent preview during drag operations. Update button styling and all user-facing docs to reflect new defaults.
Remove audio member resolution from folder_library and delegate hover-preview audio to the canonical song_preview plugin endpoint. This separates concerns: folder_library now only builds the preview URL with the filename, while song_preview handles manifest resolution (preview: key, stem fallback) and Range support. Changes: - Remove _audio_member() resolver and audio_member field from pack metadata - Update _previewUrl() to point to /api/plugins/song_preview/audio?file=<filename> - Add _previewMissing cache to avoid re-requesting packs with no preview - Add HEAD probe to check preview availability before playing - Add test coverage for _previewUrl with special character encoding
Expose a has_preview boolean from pack manifests and use it to gate hover previews. backend: plugins/folder_library/routes.py now (optionally) reads sloppak.load_manifest to set m['has_preview'] (guarded so plugin still loads without sloppak). frontend: plugins/folder_library/screen.js skips preview requests when song.has_preview is false and removes the HEAD-probe + previewMissing cache. docs: plugins/folder_library/CLAUDE.md updated to document has_preview and the preview behavior. This prevents unnecessary HEAD/audio 404s and console noise.
📝 WalkthroughWalkthroughFolder Library cards and rows now use the standard ChangesFolder Library preview integration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Remove the developer note about manually bumping plugin.json version when changing screen.js
|
I think we already have this exact functionality in a plugin already https://github.com/got-feedBack/feedBack-plugin-song-preview |
Folder Library now uses the standard data-fn/data-v3-play markup so the song_preview plugin handles hover-previews, the same way it does for grid and list views. Removes ~200 lines of preview-specific code: dedicated audio element, indicator rendering, toolbar toggle, and backend manifest checking. The preview experience is now unified across all library surfaces.
I'd been building a custom hover-preview into Folder Library, but you're right that it already exists as a plugin. Ripping all of that out and instead just giving the folder cards/rows the standard data-fn + data-v3-play markup the grid and list views use. song_preview's observer already watches #v3-songs (and the folder tree renders inside it), so it will preview folder cards on hover with zero changes to song_preview. Changes are ready for review |
What
The Folders view didn't preview songs on hover. This brings it to parity with the
grid and list views.
Rather than add preview code to Folder Library, it wires the folder cards/rows
into the existing
song_previewplugin — the same one that already handlesthe grid and list. song_preview looks for
#v3-songs [data-fn]elementscontaining a
[data-v3-play]descendant; the folder tree renders inside#v3-songs, so once the cards carry that markup its observer picks them up withzero changes to song_preview.
Changes:
_songCard/_songRownow emit the standard preview markup —data-fn(rawfilename; was
data-filename, which song_preview never matched since it keys ondataset.fn) plus a[data-v3-play]surface on the art wrap (cards) / thumb(rows).
<audio>, waveformindicator, toolbar toggle, and the backend
has_previewmanifest read) that anearlier iteration of this branch had added — song_preview owns preview now.
Credit to @topkoa for pointing out song_preview already exists as a plugin.
feedpak surface
Checklist
CHANGELOG.md[Unreleased]updated (user-visible changes)git commit -s) — not yet; rungit rebase --signoff main