Skip to content

Keep trashed songs in the Trash, and give We Recommend a shape - #545

Merged
thcp merged 1 commit into
0.16.1from
fix/trash-persistence-and-friends
Sep 1, 2026
Merged

Keep trashed songs in the Trash, and give We Recommend a shape#545
thcp merged 1 commit into
0.16.1from
fix/trash-persistence-and-friends

Conversation

@thcp

@thcp thcp commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Three problems found while testing #541 on a Windows 0.16.1 build. All three were reproduced in the packaged app, and the first two were confirmed fixed there before this branch was opened.

Closes #542
Closes #543
Closes #544

Trashed songs came back (#542)

Trash a song, restart, and it was in the library again with the Trash empty.

addTrackToLibrary deduplicates by source URL. When the match was in the Trash it deleted the catalog entry so the new import would land in the library, but it never deleted the job. The directory and its registry record outlived their only reference, and on the next launch syncWithServer found a job with no track, no trash entry and no tombstone, and re-adopted it.

Any second job sharing the source URL was enough to reach it, and processing the same YouTube URL twice is how you get one.

The trashed match is now left alone. The new track is in no folder yet, so the placement that follows still lands it in the library. Evicting the old one was never what put it there.

Introduced in #402. Present in 0.16.0. It is not what #521 fixed: that covers hard delete and the server-side deletion record, this is the client-only soft-delete path and needs no failed write.

Verified in the packaged app. A trashed job stayed in the Trash across a restart, and again across a fresh import of the same URL, where the old code wiped it at import time.

Three logos 404'd for every user (#543)

FRIENDS listed eight logo paths; five files existed. Analog4Lyfe, Empress Effects and Thomann showed a broken card on every install since they were listed, with a 404 in the backend log each time the dialog opened.

All three are bundled now. Beltr and Seratone had no logo at all and get one too.

The Instagram avatars are 100x100, which is the largest the public profile page exposes and the same size as the five already in the tree.

We Recommend was a flat list of twelve (#544)

Twelve unrelated entries in one undifferentiated list, ordered by nothing a reader could perceive, with descriptions running to full sentences of uneven length.

Now grouped into five categories: Artists & Creators, Instrument Builders & Repair, Music Gear, Music & Karaoke Technology, Media & Community. Descriptions cut to a scannable line. The masonry and per-tile tilt are gone in favour of a plain grid.

r/bass is added, which was in the README and missing from the app. The README table gains the same categories, so the two lists stop drifting.

The twelve descriptions were hardcoded English literals inside the array, so every non-English user read them in English. They are i18n keys now.

i18n

17 new keys across all ten full tables, with real translations. ptPT gets 9 genuine European-Portuguese overrides and nothing else.

library.deleteFailed has been English-only since #540. The audit script cannot print clean while it is missing, so it is filled in here. Happy to split it out if it should not ride along.

en: complete (492 own keys)          fr: complete (492 own keys)
pl: complete (492 own keys)          ptPT (+pt): complete (100 own keys)
ja: complete (492 own keys)          es: complete (492 own keys)
zhHans: complete (492 own keys)      ko: complete (492 own keys)
de: complete (492 own keys)          clean
pt: complete (492 own keys)
id: complete (492 own keys)

Test

tests/e2e/trash-persistence.spec.mjs, two cases: the trashed track survives a restart, and a sibling import does not evict it. seed.py now builds a second job sharing the fixture's source URL, and seedLibrary seeds both.

Seeding the sibling is load-bearing. Without it, every existing spec's page load would send the sibling through the dedupe branch, renaming the fixture's id and breaking the selectors most specs click.

The test was checked in both directions: it fails against the old code and passes against the new.

Verification

playwright        85 passed (1.8m)
node tests/js/*   11/11
ruff check        All checks passed
ruff format       101 files already formatted
i18n audit        clean

…mmend a shape

A trashed song came back on the next launch whenever a second job shared
its source URL. addTrackToLibrary evicted the trashed track to make room
for the sibling's import, which dropped the catalog entry but not the
job, so the directory and its registry record outlived their only
reference. syncWithServer then found a job with no track, no trash entry
and no tombstone, and re-adopted it. The trashed match is now left where
the user put it: the new track is in no folder yet, so it reaches the
library on its own, and evicting the old one was never what put it
there. A Playwright spec seeds two jobs on one source URL and holds
both halves, and seed.py grows a sibling job to make that possible.

Three of the eight logos listed in the We Recommend dialog had no file
behind them and 404'd for every user on every platform. They are
bundled now, along with avatars for Beltr and Seratone, which had none
at all.

The dialog itself was one flat list of twelve entries with no order a
reader could perceive. It is grouped into five categories, r/bass is
added so the app matches the README, and the descriptions move out of
hardcoded English into the i18n layer across all ten language tables.
The README table gains the same categories so the two lists stop
drifting apart. library.deleteFailed, English-only since #540, is
filled in at the same time because the i18n audit cannot pass without
it.
@thcp
thcp merged commit 4005ed5 into 0.16.1 Sep 1, 2026
8 checks passed
@thcp
thcp deleted the fix/trash-persistence-and-friends branch September 1, 2026 08:33
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