Skip to content

Honour "keep the one on disk", and finish Phase 7 - #16

Merged
revtex merged 1 commit into
mainfrom
feat/phase-7-close-out
Aug 14, 2026
Merged

Honour "keep the one on disk", and finish Phase 7#16
revtex merged 1 commit into
mainfrom
feat/phase-7-close-out

Conversation

@revtex

Copy link
Copy Markdown
Owner

Fixes a settings bug that silently did the opposite of what it said, and closes out Phase 7.

"Keep the one on disk" was overwriting

The existing-file policy was checked the instant a track changed — before the metadata lookup returned anything. For any template that names an album, that is the wrong path:

{artist}\({year}) {album}\{track:00} {title}

renders as Artist\Title.mp3 while {year}, {album} and {track} are still empty. The check looked somewhere nothing is ever written, found nothing every time, and let the recording proceed to a destination RenameFile then replaced without a word. For anyone whose template is more than artist and title, "Keep the one on disk" behaved as "Overwrite".

The authoritative check moves into TrackRecorder.AlreadyOnDisk, after enrichment and before the encode — the first point at which the destination is knowable, and early enough not to spend an ffmpeg run on a file about to be discarded. The early check stays as a shortcut for the simple templates it can still answer honestly, and OnEncodeCompleted keeps a last gate for two encodes of the same track racing.

Generalisable: a decision taken against a track that has not been enriched is a decision taken against different data than the one that writes the file.

The policy never said what it did

Overwriting and adding a counter both look exactly like an ordinary save from the outside, which is what kept the bug above invisible — there was no way to tell a setting that was broken from one working silently. All three outcomes now name themselves and the file:

  • Kept the file already on disk and discarded this recording of …: <path>
  • Saved …, replacing the file already there.
  • Saved …; the name the template asked for was taken.

VB-CABLE, surfaced

Reported beside the device picker rather than in a section of its own — the cable is one more endpoint to record, not a mode. Both states get a line: a user who installed it and cannot find it in the dropdown is told it is there; a user without it is told that recording an ordinary output device captures every sound the machine makes. Detection runs off the same list the dropdown was built from, so the two can never disagree, and re-runs on the refresh button. The link goes to vb-audio.com — Offstream still ships no vendor binaries (open question 9).

Switch rows

The label column had been pinned to a fixed width to keep each switch near its label. The effect was the opposite: a column of switches stranded mid-card, and every label longer than the pin broken across two and three lines. Labels now take the room and the switches sit on the card's right margin, one line each, ellipsised with a tooltip below the width where that stops fitting. The recording timer's duration field moved to the left of its switch so that switch stays in line with the others.

Clean-VM pass dropped from Phase 7

It was written to catch downlevel Windows 10 differences in the interop, the SMTC session manager and the endpoint notifications. Windows 11 only removes the question it existed to answer, and the development machine is the supported OS. Phase 8's clean-VM install → record → update → uninstall run is a different question and stays.

Phase 7 is complete.CLAUDE.md and the plan updated accordingly.

Testing

805 Core tests green, dotnet format --verify-no-changes clean. Per standing instruction the UI suite is left to manual testing; three SettingsViewModel tests covering the cable notice are included but not run here.

🤖 Generated with Claude Code

The existing-file policy was checked the instant a track changed, before the
metadata lookup had returned anything. For any template naming an album that is
the wrong path: {artist}\({year}) {album}\{track:00} {title} renders as
Artist\Title.mp3 while album, year and track number are still empty, so the
check looked somewhere nothing is ever written, found nothing every time, and
let the recording proceed to a destination the rename then replaced without a
word. "Keep the one on disk" behaved as "overwrite" for anyone whose template
was more than artist and title.
The authoritative check moves into TrackRecorder, after enrichment and before
the encode, where the destination is finally knowable. The early check stays as
a shortcut for the simple templates it can still answer, and the rename keeps a
last gate for two encodes of the same track racing.
The policy also said nothing at all, whichever way it went — overwriting and
adding a counter both look exactly like an ordinary save, which is what made the
bug invisible. All three outcomes now name themselves and the file.
Phase 7's remaining items:
- VB-CABLE's presence is reported beside the device picker, both ways round,
off the same list the dropdown was built from and re-checked on refresh. The
link goes to the vendor; Offstream still ships no installer for it.
- Switch rows on the Advanced page read left to right again. The pinned label
column had stranded the switches mid-card and broken every long label across
three lines; labels now take the room, switches sit on the right margin, one
line each. The recording timer's duration field moved to the left of its
switch so that switch stays in line with the others.
- The clean-VM pass is dropped from the phase. It existed to catch Windows 10
downlevel differences, and Windows 11 only removes the question. Phase 8's
install → record → update → uninstall run is untouched.
805 Core tests green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@revtex
revtex merged commit ef550c6 into mainAug 14, 2026
1 check passed
@revtex
revtex deleted the feat/phase-7-close-out branch August 14, 2026 02:01
Sign up for freeto 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

@revtex