Tell the shell what is playing, not what the report is about - #33
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
OnNowPlayingChangeduses to drop the album, art and destination — so the recording track's card was cleared.The first track of a session escaped because nothing was finishing behind it.
What changed
RecordingProgressnow carries what is playing (NowPlaying) separately from what the report is about (Track), plusConcernsNowPlaying— 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 insideRecordingSession.Reportrather 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 ofRECeach time a file lands.Found while testing
The first regression test failed for a second reason:
SpotifyPoller.Startseeds an emptyTrackso 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
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 existingReportAsyncwaits 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.RecordingSessionTestscase for the session reporting both facts.dotnet format --verify-no-changesclean.🤖 Generated with Claude Code