Finish the unwired work: sync, deletion, torrents, masking, phosphor #73

Open
charles wants to merge 0 commits from feat/wire-artwork-sync into main
Owner

Five things that were built and unreachable, now reachable.

  • the mirror sync runs after every artwork fetch (stage 3)
  • ROM deletion has an API route and a two-click button
  • a system moving to a new torrent unloads the old one
  • MAME romlists are masked of machines another emulator owns; Atomiswave stays with MAME because it lives in dc_atomiswave.cpp, not naomi.cpp
  • the ROM manager is green phosphor, using the installer own values

Also fixes two wheel-index tests that dropping cabinets from LAUNCHBOX_TYPES broke in #71.

272 tests pass, the VM system builds.

Five things that were built and unreachable, now reachable. - the mirror sync runs after every artwork fetch (stage 3) - ROM deletion has an API route and a two-click button - a system moving to a new torrent unloads the old one - MAME romlists are masked of machines another emulator owns; Atomiswave stays with MAME because it lives in dc_atomiswave.cpp, not naomi.cpp - the ROM manager is green phosphor, using the installer own values Also fixes two wheel-index tests that dropping cabinets from LAUNCHBOX_TYPES broke in #71. 272 tests pass, the VM system builds.
Stage three: something finally calls the sync. It runs after the shell fetcher
rather than before, because wheels are meant to come from the free sources with
the mirror as their last resort, and that ordering lives in the fetcher.
Running the mirror first would quietly promote it to first for every kind;
running it after leaves it doing what it is for -- taking the mirror's copy of
a cabinet or marquee where they differ, and dropping what the mirror no longer
has.

Spawned rather than imported: it is a long sequence of HTTP requests, and
keeping it out of the manager's event loop means a slow bucket cannot make the
web interface unresponsive. A sync that cannot run is logged, not fatal -- the
fetcher above has already done its part.

Also fixes two tests that dropping cabinets from LAUNCHBOX_TYPES broke. I ran
the artwork suites after that change and not the whole one, and merged it
failing. They now assert the omission rather than the data: the fixture still
declares an "Arcade - Cabinet", and the index is expected not to carry it.

272 pass, 0 fail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nz3es8PajUzXmqJJiK6yRB
rom-delete.ts and its five tests have been sitting unreachable: nothing routed
to them and nothing offered a button. Both now exist.

POST /api/roms/delete takes a list of names. An unreadable body deletes
nothing rather than being read as "everything", and the names are checked
against a machine-name pattern in deleteRoms and refused rather than
sanitised -- this ends in an rm against a path built from them, and a name
that needed sanitising did not come from the catalogue.

The button confirms by being clicked twice, and the second click says how many
games it is about to remove, so the count can be checked against what somebody
thinks they selected. It is not a dialog: a dialog would be dismissed without
reading, and a count is the one fact worth reading. Focus loss cancels it.

Afterwards the removed names leave the selection and the list is re-read, so
what is on screen matches what is on disk -- otherwise they sit there selected,
inviting a second delete of games already gone.

cloneof on DatfileMachine is optional now. Making it required broke every
construction site that had no parentage to give, which is most of the tests;
absent and null mean the same to every reader and mergeIndex already defaults
it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nz3es8PajUzXmqJJiK6yRB
supersededTorrent has been tested and unreachable: nothing called it. Parking
a system's torrent now takes the previous one back out of Deluge.

When a set rolls forward -- a new MAME release, a re-cut collection -- the old
torrent stayed in the session wanting all of itself, paused one resume away
from filling the disk, and its files counted in every progress total.

Both paths, not just the new-torrent one. A set that rolled forward while its
replacement was already parked by hand arrives through the already-parked
early return, and the old torrent is just as present there.

The data stays on disk. "Unload the old torrent" is not "delete the games it
brought", and the play set was copied out of it -- removing the data would
take the collection with it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nz3es8PajUzXmqJJiK6yRB
driver-routing.ts has been tested and unreachable since it was written. It now
runs, over the romlist, straight after --build-romlist writes it.

A cabinet with NAOMI configured listed every NAOMI game twice: once as MAME's,
wanting the cartridge dump and often running it badly or not at all, and once
as Flycast's. The frontend has no idea they are the same machine, so half the
entries disappointed.

Atomiswave stays with MAME, which was the thing worth checking rather than
assuming: MAME keeps it in sega/dc_atomiswave.cpp, not sega/naomi.cpp -- 28
machines against 97 -- so claiming naomi.cpp takes the NAOMI games and leaves
Atomiswave where it plays. No special case needed, and now a test saying so.

The systems are named by the module rather than discovered by the tool.
knownSystems() falls back to every system this repository knows about, and
masking against that would hide NAOMI games on a cabinet that has none. A named
system is skipped anyway unless its own romlist has entries: configured but
empty is not "the cabinet has it", and hiding a game to offer nothing in its
place is worse than the MAME copy.

Non-fatal by design. A masking pass that cannot run leaves duplicates in a
list, which is untidy; failing the romlist build leaves a cabinet with no games
at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nz3es8PajUzXmqJJiK6yRB
The same screen the installer and the OS picker are drawn on, using their
values rather than a fresh guess: #33ff66 phosphor, #2f9f5f for an unselected
line, #b6ffcf for a selected one. Those were settled by looking at a cabinet,
which is a better source than my eye on a desk monitor.

Scanlines are a fixed overlay, not a background on body: a background scrolls
with the page and the lines crawl, which is the one thing a real CRT's do not
do. 3px apart rather than 2 -- at 2 they alias into a moire on any display
whose pixels do not divide evenly, and this is opened on more than the
cabinet's panel. pointer-events: none, because an overlay that swallows clicks
is a very confusing bug to hand somebody.

The glow is deliberately faint. At any strength that looks impressive in a
screenshot, an hour of reading it is unpleasant.

Two things stay as they were. Red is still red: a destructive action on a
green screen has to be the one thing that is not green, or "Delete 191 games"
reads like every other button. And the radius drops to almost nothing, because
0.5rem corners on every control were the most modern-looking thing on the page.

Scanlines are dropped under prefers-reduced-motion -- texture nobody asked for
is still texture nobody asked for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nz3es8PajUzXmqJJiK6yRB
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/wire-artwork-sync:feat/wire-artwork-sync
git switch feat/wire-artwork-sync

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/wire-artwork-sync
git switch feat/wire-artwork-sync
git rebase main
git switch main
git merge --ff-only feat/wire-artwork-sync
git switch feat/wire-artwork-sync
git rebase main
git switch main
git merge --no-ff feat/wire-artwork-sync
git switch main
git merge --squash feat/wire-artwork-sync
git switch main
git merge --ff-only feat/wire-artwork-sync
git switch main
git merge feat/wire-artwork-sync
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/arcade-nix!73
No description provided.