Skip to content

Music player: rail controls, now-playing equalizer, folder-linked playlists, auto-advance - #20

Merged
DevMando merged 6 commits into
mainfrom
feature/music-player-ui
Jul 27, 2026
Merged

Music player: rail controls, now-playing equalizer, folder-linked playlists, auto-advance#20
DevMando merged 6 commits into
mainfrom
feature/music-player-ui

Conversation

@DevMando

@DevMando DevMando commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a music player to the Desktop — player controls on the left rail, an animated now-playing indicator, and user-defined playlists — and rolls the engine pin to pick up the fix that makes music play through a playlist instead of going silent after one song. The code was reviewed by four independent cleanup passes (reuse, simplification, efficiency, architecture) and refactored accordingly before this description was written.

What's new (plain language)

1. A music player on the left rail. Clicking the music icon opens a small panel: play/pause, next, stop, a volume slider, and a playlist picker. No page navigation — it works like a system-tray player.

2. You can see that music is playing, and what. While a song plays, the rail icon becomes a small animated gold equalizer (the Desktop's answer to the CLI's title-bar visualizer). Hovering it names the current song. The indicator stays truthful no matter how playback changes — panel buttons, /music chat commands, songs advancing on their own, or an audio-device failure — and any playback error is shown in the panel the moment it happens.

3. Bring-your-own playlists. "Add playlist" points the player at any folder of MP3s on your disk. Nothing is copied or moved — the app creates a lightweight folder link under ~/.mandocode/music, which means the CLI sees the same playlists too. The new playlist is selected immediately; re-adding a folder that's already a playlist just selects the existing one (no duplicates). "Remove" deletes only the link, never your files, and only ever appears for playlists added this way. Your selected playlist and volume both survive an app restart.

4. Music now plays through the playlist (engine fix). Previously a song played once and then went silent forever while the player still claimed to be playing — in both the CLI and Desktop. The engine now detects the end of a song and advances to a random next track (a one-song playlist repeats). Fixed upstream in MandoCode PR #67; this PR rolls the pin to pick it up.

Scope / risk

  • New UI is additive: one rail button + flyout, one code-behind file, and a small playlist service. No changes to chat, agents, or approvals.
  • Playlist operations only ever create or delete folder links under ~/.mandocode/music; deleting a playlist structurally cannot touch the music files it points at.
  • The engine pin roll contains exactly the music fix (verified: two commits, one file + changelog).
  • Known limitation: playlist folders must be on a local disk (no network shares) — a constraint of admin-free folder links.

Verification

  • Built clean (0 warnings) on every commit; engine test suite 486/486 on the pinned commit.
  • Manually verified end-to-end: a finished track flows into the next; the equalizer animates only while audio actually plays; /music stop from chat settles the icon within ~2 seconds; adding a playlist selects it and switches playback; re-adding the same folder reuses the existing playlist; removing a playlist leaves the source folder untouched; the playlist pick survives closing and reopening the panel.
  • Post-review hardening: playlist file operations run off the UI thread; a playlist pointing at an unplugged drive can no longer stall the window; the state poll stops when the window closes.

DevMando added 6 commits July 26, 2026 18:51
A music icon opens a compact flyout: play/pause, next, stop, volume,
and a playlist picker. While music plays the rail icon becomes an
animated gold equalizer and its tooltip names the current track; a 2s
state poll keeps the icon truthful when playback is driven from /music
chat commands. Add playlist points at any local folder of MP3s via a
directory junction under ~/.mandocode/music (nothing copied, CLI sees
the same playlists); Remove deletes only the pointer and only offers
itself on junction-backed playlists.
Picks up DevMando/MandoCode#67: tracks end honestly and auto-advance
through the current playlist instead of going silent after one song.
The DispatcherQueueTimer was referenced only by a local, so the GC
collected it mid-flight and the rail icon froze in its last state until
a flyout open forced a refresh. Rooted in a field for the window's
lifetime.
Adding a playlist now selects it immediately (switching live playback,
or arming it for the play button), matched case-insensitively since
discovery may re-case folder names. Picking a folder that's already a
playlist selects the existing one instead of minting a numbered twin —
matched by where the junction points, not by name.
Add-playlist's folder picker closes the flyout and unloads the combo,
and the next RefreshMusicUi re-selected from the service's current
genre — snapping the dropdown back to the previous playlist. Any
selection (user or programmatic) now records itself as the service's
genre, so every refresh re-derives the right selection.
Playlist plumbing (junctions, naming, rediscovery) moves out of the
window class into Services/MusicPlaylists, reusing NoteStore's filename
scrub and SnapshotNaming's uniquifier instead of third copies. Genre
picks now route through ConfigCoordinator and persist. The poll compares
a state key and refreshes the open flyout too, so auto-advance updates
the track line and device errors surface immediately; it stops on window
close. Rediscovery runs off the UI thread, junction checks no longer
resolve targets (a junction to an unplugged drive can't block the UI),
derivable state and duplicate XAML collapsed into a shared style.
@DevMando DevMando changed the title Music player: rail flyout, now-playing equalizer, user playlists, and the track-end fix Music player: rail controls, now-playing equalizer, folder-linked playlists, auto-advance Jul 27, 2026
@DevMando
DevMando merged commit 5a7afb2 into main Jul 27, 2026
1 check passed
@DevMando
DevMando deleted the feature/music-player-ui branch July 27, 2026 02:21
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