The `ref<Set<number>>` plus clone-and-swap plus all/some computeds had
been written three times: the Files tab, the Firmware tab, and the Save
data tab this branch added. `useIdSelection` now owns it, and all three
call it.
It keeps the stale-id defence the Files tab had and the other two
lacked: the count comes from intersecting with the live list, so an id
left behind by a delete elsewhere cannot inflate it. The set is replaced
rather than mutated, since Vue does not track `Set` writes.
The toolbar's count moves onto RCheckbox's own `label`, which is what
associates the two. Wrapping the checkbox in a bare `<label>` failed
vuejs-accessibility/label-has-for in CI, because the rule cannot see
that the component renders an input. The Firmware tab already did it
this way.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
Cleaning up a slot meant deleting one save at a time, confirming each.
Owned saves and states now carry a checkbox and a select-all row, the
way the Files tab already works, and the selection can be favorited,
labelled or deleted in one go.
The checkbox rides a new `checkable` prop rather than the existing
`selectable`, which already means the player's single-asset picker. A
save and a state can share an id and both panels stay mounted, so each
kind keeps its own set, and switching subtab or ROM clears them.
Delete goes through the bulk routes that already take arrays. Favorite
and labels have no bulk route, so they fan out and report what landed.
A bulk label edit adds to each asset rather than replacing, so it can
never wipe a label it never showed.
Community items stay read-only: nothing there is the user's to change.
Closes Norna RomM #31
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
Escape closes the labels dialog while a save is in flight, so the
completing request closed whichever editor the user had opened since,
discarding those edits. It now clears the target only if it is still the
one it opened.
The dialog's header also still described suggestions as coming from the
whole ROM, which stopped being true when they narrowed to the user's own
assets.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
The brand border, the tinted wash and the brand-coloured name already
say which row or tile is picked, so the check icon was a fourth voice
saying it again. Removing it from the rows, the tiles and the list
layout also frees the corner the heart was stepping around.
With that gone the state preview's heart moves to the top left, leaving
the clear button alone on the right, and both hand-tuned dodge offsets
disappear with it.
A state's name now wraps instead of truncating: it sits under a
full-width stage with room for it, unlike a save's in a dense row. The
play rows also lose the trailing grid track that only ever carried the
management buttons.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
Scoping the absolute placement to the stage took the last `position`
off the button itself, and the ::before that widens the tap target to
44px is absolutely placed. With no positioned ancestor left it resolved
against the page and stretched to cover it, swallowing clicks well away
from the control.
The base rule is `relative` again; the stage still overrides it with
`absolute`, which anchors the pseudo-element just as well.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
Labels and the file size read as plain chips now: the tag and weight
glyphs said nothing the text did not. In the resume preview the size
also outranked the labels and the slot while being the least telling
fact about a save, so it drops to the same quiet treatment the list
rows already give it.
`normalize_asset_labels` gains direct unit tests. It is a pure function,
so this covers the trimming, the case-insensitive dedupe and both caps
without a database, where the endpoint tests need one.
`AssetList` gains two regression tests for the fold count, which the
simplify pass rewrote: one asserts only the truly hidden version is
counted, the other that no fold is offered when every version is pinned
on screen. The i18n stub now keeps the pluralisation count so a wrong
one fails.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
The folding rule was written three times in two phrasings: as a filter,
as its own inverse inside the auto-open check, and as an arithmetic
difference for the chevron count. A slot band now partitions into
`pinned` and `hidden` once where it is built, so the rule has one home
and the filter stops re-running per render.
Also:
- A band carries its newest asset instead of the id, so ranking no
longer scans the band to find it again inside a sort comparator.
- `HIDDEN_ASSET_ANNOTATIONS` derives from `AssetAnnotations`, so a third
annotation field cannot be added without also being masked.
- `normalize_asset_labels` keys the dedupe off a dict, folding each label
once, and rejects an oversized set as soon as it crosses the cap
instead of after walking the whole body.
- The clear button's absolute placement moved onto the stage that wants
it, so the inline variant no longer un-sets it.
- Two duplicated label ternaries became computeds.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
A shared save or state no longer carries its author's annotations. The
write routes were owner-gated but the read path was not, so a label
naming a private run rode along into every other user's community list.
Also:
- The fold button counted every version past the first, but folding now
keeps favorites visible too, so it over-reported and could offer to
unfold a band with nothing hidden.
- The labels dialog passed its caption through a slot RComboboxField
does not define, leaving the field with no visible or accessible name.
- In the list layout the heart sat inside the truncating name, so a long
filename clipped it away.
- Label suggestions came from every visible asset, offering other users'
labels; they now come from the user's own.
- aria-pressed vanished when is_favorite was absent, the dialog emitted
its live array, and the phone layout carried a dead duplicate block.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
The heart sat immediately before the labels, reading as one more chip. It
now belongs to whatever shows it: beside a save's name, over the top
right of a state's screenshot. AssetAnnotations splits into AssetLabels
and AssetFavoriteMark so each surface places the mark itself.
Also here:
- A state card wraps its filename instead of truncating it. The compact
list row keeps its single line.
- A selected tile kept its brand border and wash under the pointer.
`:hover` outranks a lone class, so the selected rule has to match it.
- The inline clear button inherited the stage variant's absolute offsets
while in flow, which pushed it off centre.
- On phones the save preview reads like a save row: thumbnail and name,
then labels, facts and the timestamp each across the full width.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
The preview piled the heart, every label, the slot, a relative time, the
size and the core into one wrapping row, then repeated the timestamp
underneath. It now reads in three bands: the owner's marks, the file's
own facts, and one time line carrying both the relative and the exact
stamp.
A save loads in any core, so naming one on a save is noise; a state only
loads in the core that wrote it, so that tag stays.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
A filename and a timestamp cannot tell apart a 100% run from a speedrun
seed, so saves and states carry two owner-only annotations: a favorite
heart that sorts them ahead of their band, and a set of free-text labels.
Backend adds `is_favorite` and a JSON `labels` to both tables, with
`PUT /{saves,states}/{id}/{favorite,labels}` mirroring the existing
visibility toggle. Labels are trimmed, de-duplicated case-insensitively
and capped. Both routes write with `touch=False`, so annotating a save
leaves `updated_at` alone: it is not a write to the bytes, and device
sync reads that column to decide staleness.
In v2 the Save data tab grows a heart and a labels button per row, the
labels dialog suggests the labels already used on the ROM, and favorites
lead their slot or core without ever folding the newest version away.
The heart glyph shows only on the launch screens, where the toggle that
would otherwise say it is not there. Phones give the row four bands:
name, labels, facts, buttons.
Closes#942
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
useInputModality now skips untrusted keydowns, so useGamepad's synthetic
arrows stay pad input at the source instead of each dispatch site
re-asserting the pad.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Defer the Play focus claim to a task so the key that switched modality
keeps its default action, re-claim the pad after d-pad repeats, and share
one playReady computed between each Play button and usePlayFocus.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A `[` needs no closing bracket, so on notes carrying unclosed ones the
skip-the-existing-link alternative scanned to the end of the text for
each of them: quadratic, and measurably so, 2s over 100KB of them and
33s over 400KB. Capping the label and the target, far above the longest
link the notes actually carry (134 characters), holds it to a line's
worth of work per bracket: 42ms and 159ms for the same two, and the
same output on every published release.
Raised by @gantoine in review of #4705.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
Trim the usePlayFocus module comment to two lines and type the useGamepad
test fixture fully instead of casting through unknown.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Annotate the new filter_values endpoint tests and their helper, and build
the galleryRoms null-coercion test's platform with a typed factory
instead of casting a bare literal.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The ROM list and /roms/filters responses already validate every
filter_values key as a list, so the API never sends nulls. Make that
contract explicit: the handler now returns RomFiltersDict directly
(moved to handler/database/rom_filters.py to avoid an import cycle),
which drops the mypy typeddict-item ignores in the endpoints. Endpoint
tests pin that every key is present and a list, including for a ROM
with no metadata and with with_filter_values=false.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drop the one-line listOrEmpty wrapper and the setter test the
galleryRoms test already covers.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Addresses Greptile's review of #4705.
The rewrite matched a reference anywhere but right after a link's
bracket, so one written inside code was turned into markdown the preview
then printed verbatim, and one inside a longer link label nested a link
in a link. Code spans, fenced blocks and whole existing links are now
matched first and handed back untouched. A trailing query no longer
splits a reference either: `?` joins the guard that already kept
`/files` and `#issuecomment-1` whole.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
Make the null filter_value tests fail without the guards they cover,
and drop the FilterDrawer fallback the store setters make unreachable.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
GitHub's generated release notes credit each change with the pull
request's full URL, which the changelog dialog printed in full: every
entry wrapped onto a second line of `https://github.com/...`.
Bare pull request and issue URLs are now rewritten the way GitHub
renders them, `#4252` here and `owner/name#12` for another repository,
before the notes reach the markdown preview. A URL that is already a
link, and a deeper page of one (`/files`, `#issuecomment-1`), are left
as they are.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
v2's UA-drawn chrome currently follows Vuetify's runtime theme, which injects
`:root { color-scheme: dark }` while a dark theme is active and nothing at the
root for light. That holds only because RomM.vue keeps vuetifyTheme.change() in
sync, and v1 plus Vuetify are slated for deletion: once their stylesheet is
gone the root is undeclared again, where Chrome falls back to light chrome and
a dark v2 UI gets light form controls.
Declare the scheme next to each palette so it travels in the same scope class
the v2 tokens already own, rather than depending on a v1 framework's runtime
theme.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Addresses Greptile's review: nothing stopped a later NGINX_VERSION pin from
reintroducing the "js vm init njs" notice this PR removes.
njs 0.9.7 dropped the notice, but the njs build is not a function of the nginx
version alone: nginx's apk repo published 1.30.0 against njs 0.9.6 before
rebuilding it against 0.9.7 and 0.9.8, so 1.30.1 is the first release that
never logs it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
master refreshed the Alpine 3.23 digest and added the python-runtime
stage; this branch moves the same pins to Alpine 3.24 and nginx 1.30.5.
Kept 3.24 and re-resolved every tag to its current manifest-list digest,
so the base images carry the patches master was reaching for.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Keep `typecheck` to vue-tsc and move the tsconfig.node.json pass to
`typecheck:scripts`, run as a separate CI step so a failure names the
pass that broke. Drop the JSON-invalid comments from tsconfig.node.json.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A player's setup screen has no spatial navigation for a d-pad to walk, and
useGamepad maps no button to Tab, so the Play CTA is the only way a pad gets
into the view. JsDos and Ruffle never focused it at all, leaving DOS and
Flash games unstartable on a controller; Pico8 and Stream only checked the
modality at mount, so picking up a pad after a mouse click stranded the user
the same way #4397 described.
The behaviour moves into usePlayFocus, which claims the CTA once the screen
is ready, again on a switch to a directional device, and again when a running
game hands the screen back. PlayerShell owns it for the three players it
renders; Stream and EmulatorJS, which lay themselves out, call it directly
and drop their hand-rolled copies.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The stick is translated into synthetic Arrow keydowns, which bubble to
useInputModality and read as a keyboard press. Buttons re-assert the pad
right after dispatching; the stick never did, so a stick-only user settled
in "key" modality and the grid-nav autofocus, which only claims a page for
"pad", never fired. Nothing was focused, so the arrows had nowhere to go.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>