Repository navigation
feat(ui): show recovery, refusals and notices after an export - #102
Merged
Merged
Conversation
WIP: one switch over every IPC error class gives a what-to-do line per surface (row, confirm step, banner) after the engine's why; errorCopy and rowErrorCopy now use it. The recovery store keeps the whole status and can forget a pending change. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
Stale loudness tags, Serato Autotags and FLAC re-analysis notices on written rows, the confirm step and the footer; the start-up recovery banner with a Forget confirm step. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
The Forget step's state lives in the recovery store, so the table's keys wait while it is open. Tests cover running, pending with Forget, a refused Forget, finished, undone, failed and skipped. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
?demo=recovery runs the check, then leaves two changes pending with Forget; ?demo=recovery-failed and ?demo=recovery-finished show the others. The export demo now writes a FLAC, an AIFF with stale loudness tags and a WAV with Serato Autotags. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
PRODUCT.md items 5 and 6 say what the start-up recovery banner shows and what Forget does, how refusals read in three lines, and the stale loudness tag, Serato Auto Gain and rekordbox FLAC notices; the README lists the recovery demos. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
The table's keys wait while Forget asks; the stand-in recovery is picked by the URL and forgets as the shell does. The whole-flow stand-in tests get room past the 5 s default. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
On exFAT and FAT a copy into a folder holds its name with an empty file before the rename. A change forgotten before that rename now lists the placeholder in kept when it is still empty, or when its folder cannot be reached, so the user can find and remove it; a later export would otherwise skip that name as another file. Nothing is deleted. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
A file or folder name with '. ' and a capital (Artist feat. Rihanna.wav, Mr. Brightside) split the refusal there. The advice is now looked for only after the words the engine puts after the path: the in-place refusal's reason, the USB message's fixed sentence, the free-space numbers. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
A pending change now says whether it was a copy into a folder (PendingChange.toFolder), so the Forget step says what is left in that case: no copy yet, an empty file holding its name, or the new copy. Once forgotten, every kept file is listed by its path and what it is; the hidden temp file may be a whole output and the Finder hides it. A refused Forget reads the status again and drops a row whose change ended meanwhile; one still pending says why without the class name. A failed status read is retried three times (250, 500, 1000 ms) before the banner says the check could not be read. One live region is mounted from the start and only its text changes; the pending list is an explicit region. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
The footer counts only the files of the last export, not rows an earlier batch left with old loudness tags. The rekordbox FLAC notice now shows only for FLAC files written in place: rekordbox still knows such a file by its path, and its seek index no longer matches the new frames. A copy in another folder is new to rekordbox and is analysed when it is added. The notice adds what keeps the exported grid: import the track from the rekordbox XML after the analysis, then turn on Analysis Lock. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.com>
What Forget keeps for a copy into a folder and how it lists it, the status read retried before the banner says it failed, and the rekordbox FLAC notice for files written in place only. Signed-off-by: Ilham Deneri <ilhamdeneri@gmail.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.
Summary
This PR builds the trust surface around an export. A banner above the table shows what the start-up recovery found, and a pending change can be forgotten after a step that says what Forget does. Every IPC error class has a what-to-do line for each place it can be shown. Written rows say which loudness tags were left at the old level, when Serato's Auto Gain is out of date, and when rekordbox must analyse a FLAC written in place again.
src/lib/ipc/refusalCopy.ts):switchoverIpcErrorKindwith anevercheck gives a what-to-do line per surface:row,confirm,banner.Artist feat. Rihanna.wavor a folderMr. Brightsidetherefore stays whole.errorCopyandrowErrorCopynow use this, and their callers keep working.src/state/recovery.ts):RecoveryStatus.forgetChangecallsforget_pending. If the engine refuses, the store reads the status again: a row whose change ended meanwhile goes, and one still pending says why, without the "invalid argument:" prefix.src/features/recovery/:RecoveryBanner,ForgetConfirm, their copy):PendingChangegainstoFolder, so the UI knows a change was a copy into a folder.sc_io::txn::forgetnow lists inkeptthe empty placeholder that a copy to an exFAT or FAT folder holds its name with. It is listed when it is still empty, or when its folder cannot be reached. Without that, a later export to that folder would skip the name as another file's. It is not deleted.src/features/export/notices.ts):staleLoudnessTagsis named in plain words (Album ReplayGain, Track ReplayGain, R128 gain, RVA2, iTunNORM), and the notice says when the engine cut the list short.GEOB:Serato Autotags/SERATO_AUTOGAIN/SERATO_AUTOTAGSamong the stale tags exactly then, because the render reports none without a gain change. If that list was cut short, the Serato tags read when the file was added say the same.User-visible behaviour
/?demo=recovery: the check runs for 2.5 s, then two changes are left pending (a copy to an unplugged stick and a change in place) and one is finished./?demo=recovery-failedand/?demo=recovery-finishedshow the other two states.Tests run
New test files:
src/lib/ipc/refusalCopy.test.tssrc/features/export/notices.test.tssrc/features/export/ExportConfirm.notices.test.tsxsrc/features/recovery/RecoveryBanner.test.tsxsrc/state/recovery.test.tssrc/dev/mockNotices.test.tsxsrc/dev/mockRecovery.test.tsNew Rust tests in
crates/sc-io/src/txn/forget/tests.rs:to_folder.Extended tests:
errors.test.ts,ExportDetail.test.tsx,cells.test.tsx,ExportConfirm.test.tsx,Footer.test.tsx,sc-enginegate tests.IpcErrorKindthrough aRecordover the type, so a new class fails to compile there. For each class it checks there is a non-empty what-to-do line on every surface that class reaches.Artist feat. Rihanna.wav,Mr. Brightside.wav,Dr. Dre - Still D.R.E. Remix.aiff, a folderMr. Brightside/Live. Then Encore.wav, and a volume/Volumes/Mr. DJ.case(tsc);kept(sc-io);Output change
PendingChangegains a field. No audio, grid, tag or sidecar byte changes.Output-Change: yes; this ships in a minor release.Docs and dependencies
docs/PRODUCT.md/docs/ARCHITECTURE.mdupdated if behaviour or crate boundaries changed. (PRODUCT.md items 5 and 6; the README lists the recovery demos.)