Skip to content

Tell the shell what is playing, not what the report is about - #33

Merged
revtex merged 1 commit into
mainfrom
fix/now-playing-vs-report-subject
Aug 15, 2026
Merged

Tell the shell what is playing, not what the report is about#33
revtex merged 1 commit into
mainfrom
fix/now-playing-vs-report-subject

Conversation

@revtex

@revtex revtex commented Aug 15, 2026

Copy link
Copy Markdown
Owner

What was wrong

Every track after the first showed nothing but artist and title. The album, cover art and destination appeared about a second into the song and vanished a moment later — while the files themselves were tagged correctly, so the lookup was plainly working and only the page was wrong.

A progress report names the track it is about. Encoding, tagging and saving all happen to the previous song while the next one is already recording, so those reports name a track that has finished. The shell read that as the now-playing line:

  1. The finalisation report set the now-playing line back to the finished song.
  2. That is exactly the signal OnNowPlayingChanged uses to drop the album, art and destination — so the recording track's card was cleared.
  3. The next elapsed tick, a seventieth of a second later, set the line forward again and cleared them a second time.
  4. Nothing re-runs a lookup for a track already under way, so the card stayed bare for the rest of the song.

The first track of a session escaped because nothing was finishing behind it.

What changed

RecordingProgress now carries what is playing (NowPlaying) separately from what the report is about (Track), plus ConcernsNowPlaying — whether the two are the same recording, compared by reference, so two plays of the same song are told apart where a name comparison would not. Both are computed inside RecordingSession.Report rather than at its eleven call sites, so a new report cannot forget them or disagree about what "now" means.

The Record page and the tray tooltip take the now-playing line from NowPlaying, and leave the elapsed counter and the transport alone for a report about anything else — which also stops the counter jumping to the previous track's length and the transport flickering out of REC each time a file lands.

Found while testing

The first regression test failed for a second reason: SpotifyPoller.Start seeds an empty Track so that whatever is already playing counts as a change, and Spotify's idle window title parses to the same empty thing. Both render as the bare word "Spotify", so the page announced a song called Spotify and the tray offered to be recording it, from the instant the user pressed start. A placeholder for the absence of a track is now reported as no track.

Testing

  • Two new RecordViewModelTests, both confirmed failing against the unfixed view model before the fix went in — one for the details surviving the previous track's finalisation, one for the counter and transport.
  • DeliverAsync, a helper that waits on the controller forwarding the reported instance rather than on a property. The existing ReportAsync waits on a property changing, which is useless for a report whose whole point is that it must change nothing: the condition is already true, so the assertion runs before the report has been seen and passes for the wrong reason.
  • One new RecordingSessionTests case for the session reporting both facts.
  • 1092 tests green, run three times over to rule out ordering flakiness. dotnet format --verify-no-changes clean.

🤖 Generated with Claude Code

Every track after the first showed nothing but artist and title. The album,
cover art and destination appeared a second in and vanished a moment later,
while the files themselves were tagged correctly — so the lookup was working
and only the page was wrong.

A progress report names the track it is about. Encoding, tagging and saving
all happen to the previous song while the next one is already recording, so
those reports name a track that has finished. The shell read that as the
now-playing line: it snapped back to the finished song, which is the signal to
drop the album, art and path of the song actually recording, and the next
elapsed tick a seventieth of a second later snapped it forward and dropped
them again. Nothing re-runs a lookup for a track already under way. The first
track of a session escaped because nothing was finishing behind it.

Reports now carry what is playing alongside what they are about, and a flag
saying whether the two are the same recording — by reference, so two plays of
the same song are told apart. Both are computed in one place rather than at
the eleven call sites. The Record page and the tray take the now-playing line
from the former, and leave the counter and the transport alone for a report
about anything else, which also stops the counter jumping to the previous
track's length and the transport flickering out of Recording as each file
lands.

Uncovered by the first regression test: the poller seeds an empty track when
it starts listening, and Spotify's idle window title parses to the same empty
thing. Both render as the bare application name, so the page announced a song
called "Spotify" from the moment the user pressed start. A placeholder for the
absence of a track is now reported as no track.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@revtex
revtex merged commit a1fb671 into main Aug 15, 2026
6 checks passed
@revtex
revtex deleted the fix/now-playing-vs-report-subject branch August 15, 2026 02:52
@revtex
revtex restored the fix/now-playing-vs-report-subject branch August 15, 2026 02:52
@revtex
revtex deleted the fix/now-playing-vs-report-subject branch August 15, 2026 02:53
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