Skip to content

fix(ui): make the confirm step match the job - #96

Merged
wow merged 5 commits into
mainfrom
fix/confirm-matches-job
Nov 5, 2026
Merged

wow merged 5 commits into
mainfrom
fix/confirm-matches-job

Conversation

@wow

@wow wow commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Six small fixes so that what the export confirm step says is what the job does. Only rows that plan a write take a file name, and the confirmation carries that decision to the job instead of the job recomputing it. Turning the XML on brings back a row only the XML could carry. The preview runs the in-place refusals, writing nothing. One plan runs at a time. The analysed event carries exportStale. The same-name skip has wording true to each case, with what to do.

User-visible behaviour

  • A same-name batch where the first file changed since its analysis now says "Write 2 files" and writes 2; before, it said 1 and wrote 2.
  • A 96 kHz A/track.wav first in the list no longer skips B/track.wav; B is written.
  • A row the confirm said was skipped for its name stays skipped, whatever else drops out of the job.
  • With "Write rekordbox XML" turned on, a row skipped as nothingToWrite comes back, and Export no longer says "Nothing new to export".
  • An export in place shows a symbolic link, a locked, read-only or hard-linked file, or one on a rekordbox USB export as "Refused" on its row and "1 refused" in the summary line. It stays out of the job and the count. The row keeps the refusal in the table once the summary closes, as a failed export does.
  • Write stays disabled until the current plan has answered and no older plan is still running, so Cancel then Export on a big batch no longer risks busy.
  • A source that changed on disk and is analysed again for another reason (a BPM range change) shows as new work at once, not only after a reload. The row's details say "The grid or the file changed since this export".
  • A skipped row keeps its skip reason on the Action column's second line; it no longer reads "Exported without the rekordbox XML", since it was never exported.
  • New wording. Name taken in this export: "a file earlier in this export takes this name in the folder; rename one, or choose another folder". Copy in the folder: "the folder has a copy of this name that SoundCheck made from another file, or from this one before it was moved and changed; rename one, or choose another folder". The command line keeps its own "what to do" line with its flags.

IPC: ConfirmedFile.sameName, JobEvent::Analysed.exportStale and the skip reason sameNameInBatch are new; bindings regenerated. No persisted schema changed.

Tests run

PASS  file-size               13s
PASS  test-files               0s
PASS  cargo-fmt                1s
PASS  cargo-clippy            12s
PASS  cargo-test             217s
PASS  fe-typecheck            16s
PASS  fe-lint                 11s
PASS  fe-test                 33s
RESULT PASS

1127 Rust and 404 frontend tests pass. Each fix was broken on purpose and a test failed, then it was restored:

Fix Broken how Test that failed
1 a skipped row claims a name regression_a_row_that_stays_a_skip_takes_no_name
1 an unplannable row claims a name regression_a_row_that_cannot_be_planned_takes_no_name
1 the job recomputes names regression_a_row_the_confirm_skipped_stays_skipped_when_the_name_taker_drops_out
1 the UI drops the decision carries the plan's same-name decision, row by row, ...
2 xml not compared comes back when the XML is turned on
3 no check in the preview regression_the_plan_says_what_an_export_in_place_would_refuse_and_changes_nothing, a_locked_file_is_refused_in_the_plan
3 the check writes a file regression_the_plan_says_what_an_export_in_place_would_refuse_and_changes_nothing (recursive tree compare)
4 plans overlap all three in one plan at a time
5 the event omits the flag regression_the_analysed_event_says_what_the_session_says_of_the_export
5 the UI ignores the flag a file changed with no word to the UI, then read again for another reason, shows stale at once
6 the old wording a_name_taken_in_the_batch_does_not_say_a_copy_exists
6 no what to do a_name_taken_only_in_this_batch_says_so_and_what_to_do, a_moved_and_changed_source_is_told_true_of_the_copy_in_the_folder
stale line the old words says why the XML left it out, and that its grid or file changed since
refusal kept not marked on the row carries the plan's same-name decision..., a row an export in place would refuse says why, once the confirm step is closed
skip reason the difference shown instead a skipped row keeps its reason, never saying how it was exported

a_client_that_says_no_name_is_taken_still_overwrites_nothing sends sameName: false for two rows of one name from different sources. One copy is written, the other row is skipped or failed, and the first copy's bytes are unchanged. Three layers each refuse the overwrite: the job's folder check, the transaction, and the no-replace rename. The test fails only once all three are removed.

The worst-case analysed row still fits its byte budget. The UI was not driven in a browser or the packaged app; it is covered by Vitest with mockIPC.

Output change

  • No: the same input still yields the same numbers, grids and bytes.
  • Yes: no audio, grid, number or golden changes. A batch whose first same-name row writes nothing now writes the row it used to skip, and the grid report's notes column has new words on same-name skips.

Docs and dependencies

  • docs/PRODUCT.md / docs/ARCHITECTURE.md updated if behaviour or crate boundaries changed.
  • New dependencies, with licence: none.

Output-Change: yes

wow added 5 commits November 5, 2026 11:39
Only rows that plan a write take a file name, and the confirmation
carries that decision to the job. Turning the XML on brings back a
row only the XML could carry. The preview says what an export in
place would refuse, writing nothing. One plan runs at a time, and
Write waits for it. The analysed event carries the export's stale
flag. The same-name skip has wording true to each case.

Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
Move the analysed event's handling into its own method, since the
flag took the function over the line limit. Document the change in
the product and architecture docs.

A batch whose first row writes nothing now writes the row it used to
skip, and the grid report's note on a same-name skip has new words.
No audio, grid or number changes.

Output-Change: yes
Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
The test locks a file with chflags, which Linux doesn't have, so it
failed there before it could check anything.

Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
A row an export in place would refuse never enters the job, so the
table showed its plan once the summary closed. Mark it failed with
its refusal, as a failed export would be.

A skipped row could read "Exported without the rekordbox XML" in
place of its skip reason, though it was never exported; it keeps the
reason now. The stale line says the grid or the file changed, since
a changed source makes the export stale too.

Add a test that a client sending sameName false for two rows of one
name overwrites nothing: the folder check, the transaction and the
no-replace rename each refuse it.

Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
@wow
wow merged commit c07158e into main Nov 5, 2026
8 checks passed
@wow
wow deleted the fix/confirm-matches-job branch November 5, 2026 22:10
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