Skip to content

Let the check's name rows be ticked and typed into - #113

Open
jwilkins wants to merge 1 commit into
mainfrom
claude/check-edit-names
Open

jwilkins wants to merge 1 commit into
mainfrom
claude/check-edit-names

Conversation

@jwilkins

@jwilkins jwilkins commented Nov 1, 2026

Copy link
Copy Markdown
Owner

In Check, a track whose file's own name says something other than its names (often names from AcoustID) got a pair of radio buttons: the tags, or the file name. One button took the file name for the ones switched, in the collection only. Often neither answer is quite right: the fingerprint is right and the file name is a mess, or the file name is right and wants an edit's title. There was no way to say so, and no way to fix the file itself. Now each of those rows can be ticked and typed into.

What a row is now

  • Both answers, as before, each with a use button that puts its artist and title in the boxes below.
  • The boxes: the artist, the title and the file name the track is to have, all freely editable, with the extension shown and left as it is. after the names fills the file name in as Artist - Title.
  • A Change box. A row does nothing until it's ticked, and typing in it ticks it, because nobody types a name they mean to leave unused. Unticking leaves the track alone whatever the boxes say, so a row half typed into isn't half applied.
  • Change N ticked tracks does what each ticked row says:
    • renames the file on disk, carrying any lyric file beside it under the same name;
    • puts the names into the collection;
    • writes them into the file's own tags wherever those say something else.

Why it's right

This is now the one place the check writes to your files, where before nothing in it did. The README promised that, and it's been rewritten to say what's true now. What makes it acceptable is that it's a row someone ticked and typed into, not a button that sweeps. Take the files' word still never touches these rows.

The tags skip the question write_tags asks when a name looks nothing like its file (the "N files to check before tagging" sheet). The person who typed both the names and the file name has already answered it, so asking again is noise. The names are then what the file says, so the track is marked as having names from its tags, and a fingerprint that disagrees later asks before replacing them.

Refused before anything happens, so one bad row changes nothing at all instead of half of what was asked:

  • a file name a FAT or exFAT stick won't take: / \ : * ? " < > |, control characters, or a dot at the end. A file keeps its name when it goes on a drive, so a name the stick refuses would be found out on the night;
  • a file name that's already taken, or one that two rows both want;
  • a track left without an artist or a title.

The button isn't offered while a ticked row has a problem it can see, and the row says what the problem is.

Also

  • The lyric file moves with a rename. A .lrc or .txt beside the track under its name would otherwise be orphaned. This lives in rename_files, so the other rename (copies whose names a copier wrote) gets it too.
  • A rename that only changes case isn't reported as "taken" on a disk that ignores case, since it's the same file.
  • sheet_height's doc comment had been left above roughly, the same way follow_playback's was. It's back on its own function.

Tests

  • Through the window (egui_kittest): typing in the artist box ticks the row; use puts the file name's answer in the boxes; after the names fills the file name; unticking leaves the boxes but clears the tick.
  • Applying:
    • a ticked row renames the file, takes the lyric file with it, changes the names, marks them as the file's, and queues a tag write to the file under its new name, without asking again;
    • an unticked row, typed into, is left alone;
    • a row with a name a stick won't take changes nothing anywhere, including the other ticked row;
    • a taken file name, or one two rows both want, changes nothing.
  • file_name_problem and file_name_for in verify.rs.
  • The hover-help test caught the two new boxes without hover text, and now passes.

What lost

  • Keeping the radio buttons and adding an "edit" mode. That would be two ways of saying one thing. The two answers are now buttons that fill the boxes, so picking one is still one click.
  • Writing tags only when the names changed. A row whose names already match the collection may still disagree with the file's tags, and "edit the tags" means the file ends up saying what was typed. So tags are written whenever the file says something else.
  • Applying everything it could and reporting the rest. That leaves a sheet where some rows were done and others weren't, and the sheet closes on apply. All-or-nothing keeps the result clear.
  • Refusing only what the library's own disk refuses. A : is fine on macOS and fails on the stick.

Worth a second opinion

  • The check now writes to files. That's what was asked, but it changes the promise of a sheet that used to be read-only. It's gated behind a tick and a button with a count on it.
  • Not seen rendered. The layout was built from the sheet's existing pieces and driven through egui_kittest, but nobody has looked at a long list of these rows on screen. Three lines of boxes per row is denser than two radio lines.
  • Only these rows are editable. The "N matches to check" sheet after Identify also shows the fingerprint against the path, and could take the same boxes if that's the one you meant too.
  • Stems and drive records aren't touched by a rename, the same as the existing rename. A kit's parts and a drive's written record refer to the track by id, so they should follow, but that hasn't been checked on a real kit.

Gates: cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings and env -u BOOTH_WHISPER_MODEL -u BOOTH_WHISPER_BIN cargo test --workspace all pass. The tests ran without debug info to fit this session's disk.


Generated by Claude Code

Where a file's own name says something other than the track's names,
the check offered a pair of radio buttons, the tags or the file name,
and one button that took the file name for the ones switched, in the
collection only. Often neither answer is quite it: the fingerprint is
right and the file name is a mess, or the file name is right and wants
an edit's title. There was no way to say so, and no way to fix the file
itself.

Now each of those rows shows both answers, each with a use button that
puts it in the boxes below, and the boxes: the artist, the title and the
file name the track is to have, typed into freely, with after the names
to fill the file name in as Artist - Title. A row changes nothing until
its Change box is ticked, and typing in it ticks it, because nobody types
a name they mean to leave unused; untick it and the track is left alone
whatever the boxes say. Change N ticked tracks then renames each ticked
file on disk, carrying any lyric file beside it under the same name,
puts the names in the collection, and writes them into the file's own
tags wherever those say something else.

That makes this the one place the check writes to somebody's files,
where before nothing in it did. It is a row they ticked and typed into
rather than a button that sweeps, and Take the files' word still never
touches it. The tags go straight into the tag queue rather than through
the question write_tags asks when a name looks nothing like its file:
the person who typed both has answered it. The names are then the
file's, so a fingerprint that disagrees later asks before replacing
them.

Refused before anything happens, so that one bad row changes nothing
rather than half of what was asked: a file name a FAT or exFAT stick
will not take (/ \ : * ? " < > |, control characters, a dot at the end),
since a file keeps its name on a drive; a file name that is taken, or
that two rows both want; and a track left without an artist or a title.
The button is not offered while a ticked row has a problem it can see,
and the row says what the problem is.

Renaming a file now takes the lyric file beside it along, which the
other rename, of copies whose names a copier wrote, gets too; and a name
that differs only in case is not taken on a disk that ignores case,
since it is the same file.

sheet_height's doc comment had been left above roughly, as
follow_playback's was; it is back on its own function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJ1hQiKvHsnknZHKam52Ct

This branch has not been deployed

No deployments
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.

2 participants