The save and state tooltips only repeated the filename and the exact
time, which every row, tile and preview now shows (and the group head
already flags a core that cannot load). Stream's save summary renders
its size and time through AssetChips and AssetTimestamp like the other
asset views, which retires play.save-data-detail and rom.created.
Flow cells start at 260px: three per row on a 1440px screen instead of
two oversized ones, four on 1920px.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AssetTimestamp's align and inline props only ever moved together, so one
`stacked` prop (relative over exact, flush right, for a trailing time
column) replaces both; side by side is now the default. Drops the unused
inline + end rule, the list layout's own alignment override, a dead
flex reset on grid tiles, and the duplicated inline test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep an end-aligned timestamp flush right when it goes inline, put every
tile layout but the list's fixed time column on the inline timestamp, and
test which layouts get it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
State cards in the flow grid were narrow enough that labels, chips and the
timestamp stacked them taller than wide. Cells now start at 300px (shrinking
on a phone rather than overflowing), which also gives the screenshot room.
The relative and exact time now render through AssetTimestamp everywhere:
side by side on state cards, the launch view preview and phone save rows,
where the exact moment is no longer hidden. The preview drops its own
clock icon and dot separator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v2 patterns rule asks for type-to-confirm on anything that touches the
filesystem, and deleting a save or state removes the file from disk. Every
delete in the tab now takes it, single and bulk alike, through one
`rom.delete-keyword` so the three call sites share a home.
`delete_saves` walks its list and raises on the first id it cannot find, so
a rejected bulk delete can still have removed the assets ahead of it. The
error path now refreshes too, instead of leaving rows on screen that are
already gone.
Addresses the Greptile review on #4725.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
A shallow watch source makes Vue fire the watcher on every dependency
trigger, so `watch([subTab, () => props.rom.id], ...)` ran on each refresh
and wiped the selection right after a bulk favorite or label write. Both
tabs now read their sources through getters, with a test for each
direction: a replaced rom object keeps the selection, a different rom
drops it.
The checked tile in a state strip keeps its tint under the pointer, the
`--static` hover reset having outranked a single class. `reportBulk` is
now `reportAndRefreshBulk`, the bulk delete body says what leaves the
filesystem in all 18 locales, and the firmware tab's move onto
`useIdSelection` gets the selection tests it had none of.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
Fold gating replaces the expand-on-select-all hook: a checkable list never
folds, so select-all cannot reach a row the user could not see. The fold
control and `useGroupFold.openAll` go with it, along with the `defineExpose`
on both list components.
The favorite write is one helper for the single and bulk paths, the fourth
copy of the checkbox pattern (DeleteFirmwareDialog) moves onto
`useIdSelection`, `useIdSelection` drops its `idOf` argument for an
`{ id: number }` bound, and `files-selected-of` and `assets-selected-of`
merge into one `selected-of` key across the 18 locales.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
A slot folds its older versions out of sight, showing only the newest
and any favorites. Select-all took those hidden versions too, so a bulk
delete could remove rows that never showed a checkbox.
Select-all now opens every group first, so what it selects is what the
user can see. Clearing still just clears.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
A bulk write had no in-flight guard, so a second click on the heart
re-fanned the whole batch, computed its direction from pre-refresh state
and raced the refresh. Delete also cleared the selection before the
request, so a failed delete left the rows on screen unchecked.
The firmware toolbar still counted raw ids while its actions operated on
the list-intersected selection, so a row dropped by a refresh could
leave the count and the enabled state lying.
The selection set moves to shallowRef: a plain ref deep-wraps a Set in a
reactive proxy, which both costs a proxy on every read and made the
docstring's stated reason for cloning wrong.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
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
* feat(metadata): read a fan translation's tag and target language
A translated dump is playable in the language it was translated into, but the
tag saying so was kept verbatim, so the rom was filed under no language at all
and the filter drawer grew one throwaway value per patch: "T+Eng1.1_RPGe" and
"T-Eng0.98_DeJap" are the same thing to a reader and two different facets to
the gallery.
The GoodTools, TOSEC and plain spellings now resolve to one "Translation" tag,
and the language the patch targets joins the rom's languages, so a Japanese
game translated into English answers a search for English and reaches an
emulator as English. A translation into a language RomM cannot name is still
tagged, and a tag that merely starts with "tr", like "Trainer", is left alone.
The group and patch version the raw tag carries are dropped, since nothing
reads them and keeping them is what splits the facet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4mTJZ63Bvafv3stpiGsHC
* feat(metadata): read the spaced form of a GoodTools translation tag
"[T Fre]" separates with a space rather than a sign, and it is the spelling a
real ScreenScraper dump carries: its entry for "Super Mario Bros. (W) [T Fre]"
is flagged as a translation into French. The tag was read only as "T+Fre" or
"T-Fre", so that dump came out untranslated and unlanguaged.
A space carries no meaning of its own, unlike the sign, so this spelling counts
only when the word after it names a language: "(T Rex)" stays an ordinary tag.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4mTJZ63Bvafv3stpiGsHC
* style(metadata): trim the translation alias comment to two lines
Greptile flagged it against the repo's comment discipline: four lines, and
the product as the actor.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4mTJZ63Bvafv3stpiGsHC
* feat(metadata): resolve the short forms of a translation tag's language
"[T-En]" already resolved through the filename language vocabulary; the
non-ISO abbreviations "Ge", "Sp", "Du", "Gr" and "Jp" did not, so those
dumps were tagged without a language. Tests now cover both forms.
Also trims three comments and four test docstrings Greptile flagged
against the repo's comment discipline.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4mTJZ63Bvafv3stpiGsHC
* fix(metadata): stop reading a hyphenated word as a translation
"(T-Rex)" matched the GoodTools superseded form and became a Translation
tag. A superseded patch carries its version and group, so require that,
or a language the vocabulary names, before the bare "T-" form counts.
"[T+Tha]" still tags, since no ordinary word takes that shape.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4mTJZ63Bvafv3stpiGsHC
* style(metadata): trim the translation regex comment to two lines
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4mTJZ63Bvafv3stpiGsHC
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Fold the viewport presets into one map, drop the threshold ranges from
preset names, omit the default isRotated, and cut the duplicated docs.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drop the manual data-bp pin in RTable MobileCardStack (it now uses the
phone viewport global), give each RomM preset its own tier, remove the
no-op install from storybook.test.ts, and correct the related docs.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Set limit-severities-for-sarif, since trivy-action otherwise unsets the
severity filter for SARIF output and every severity was reported.
- Key the code scanning category by image ref, so a dispatched scan of an
older tag can't replace the analysis of latest.
- Validate and compact caller-provided JSON before writing it to outputs.
- Correct the build.yml comment: the weekly run rescans latest only.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
aquasecurity's IP allow list rejects GitHub API calls from hosted
runners, so pinact 403s verifying the trivy-action tag comment. A
.pinact.yaml rule skips verification for aquasecurity actions only once
they are pinned to a full SHA, so an unpinned ref is still flagged.
zizmor (enabled on master) wants the $/ self-repository syntax for the
reusable workflow call, but actionlint 1.7.12 rejects it, so the finding
is suppressed inline for now.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
HowLongToBeat's firewall now answers any tool-style "Name/version" user
agent, including RomM/<version>, with a 403 HTML page. That failed the
heartbeat (shown as "Connection failed" in Settings) and the /init session
mint, so scans and manual matches silently got no HLTB data.
Send a fixed browser user agent instead. Every HLTB call goes through
base_headers(), so the session stays bound to the same agent.
Claude-Session: https://claude.ai/code/session_01Q4AcvMx1hNfc94xqEeqjzw
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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
LimitOffsetPage.create is annotated to return LimitOffsetPage but builds
cls, so subclass pages failed return-value checks. A shared
TypedLimitOffsetPage narrows create() to Self, and resolve_params()
results are annotated with each page's params class.
CustomLimitOffsetPage.total keeps its intentional widening to None
(with_total=false) behind a narrow assignment ignore.
The OpenAPI schema is byte-identical before and after.
Claude-Session: https://claude.ai/code/session_01SPpv6W2ygP9tQ61fTQxdYp
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
test_extract_chd_hash_permission_error removed read permission with
chmod(0o000), but root ignores permission bits, so the read succeeded
and the test failed in root containers (Docker dev environments, cloud
sandboxes). Patch the open inside extract_chd_hash to raise
PermissionError instead, so the handling is exercised for every user.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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
* fix(backend): make type ignores match what mypy reports
Third in the staged series clearing the errors #4655 made visible.
Whole-project mypy: 91 errors in 26 files -> 64 in 23.
Twenty `# type: ignore[assignment]` comments in
endpoints/responses/rom.py never suppressed anything. The request-scoped
values `from_orm_with_request` attaches to a Rom (rom_user, has_notes,
user_saves and the rest) are not declared on the model, so mypy reports
`attr-defined`; it does so under 1.19 as well as 2.3, so the code was
wrong when the comments were written rather than drifting since. They
now name the error they were meant to silence.
Seventy-nine ignores across 24 files suppressed nothing at all under
`--warn-unused-ignores`, and are removed. One of them,
`utils/zip_cache.py`, keeps its `attr-defined` code for the private
`zipfile._get_compressor` and drops only `assignment`. The unused set is
identical under mypy 2.3.0 and 2.3.1, and removing them leaves the error
count unchanged under both, so none was quietly needed.
The two `filter` helpers typed as `[QueryT: Select | Update | Delete]`
bound the TypeVar to the union, so `query.filter(...)` returned the union
and could not be assigned back to `QueryT`. Constraining it to the three
types lets mypy check each one separately, and the callers are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPpv6W2ygP9tQ61fTQxdYp
* fix(backend): replace mypy and ASYNC240 trunk-ignores with real fixes
A `trunk-ignore` only suppresses when Trunk runs the linter. Plain mypy
does not read them, so the 13 on mypy findings were all still errors to
`mypy .` and would fail a whole-project check. Each now has a fix.
endpoints/tasks.py: `common_data` was a plain dict literal unpacked into
eight TypedDict constructors, so mypy saw `dict[str, Any]` and could not
match its keys. It holds exactly the fields of BaseTaskStatusResponse and
is now annotated as one, so the unpacking is checked.
handler/metadata/gamelist_handler.py: both media maps were inferred as
`dict[str, str]`, so indexing the TypedDict with their keys was
unprovable. Their keys are now typed `GamelistMediaKey`, the Literal of
the TypedDict's fields. A misspelt map key is now an error at the entry;
before, only the index site could have noticed, and it was suppressed.
handler/metadata/playmatch_handler.py: `attr` was a bare `str`. A TypeIs
guard narrows it to the five lookup attributes, and the frozenset is
derived from that Literal so the names live in one place. mypy now checks
that each name is a real PlaymatchRomMatch key. It does not check that
each takes an int, since mypy is lenient about value types on a union key;
that still rests on which five names are listed.
endpoints/search.py: the per-source tuples mixed ROM-list and handler
types, which mypy joined to `object`. The dict is now annotated with what
the loop uses: Mapping rows and the MetadataHandler base.
tests/handler/metadata/test_launchbox_handler.py: `Path.stat()` inside an
async test (ASYNC240) now goes through `anyio.Path`, as the rest of the
codebase already does.
Whole-project mypy: 64 errors in 23 files -> 51 in 20, identical under
2.3.0 and 2.3.1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPpv6W2ygP9tQ61fTQxdYp
* fix(backend): keep gamelist media keys in one place
Review pointed out that `GamelistMediaKey` repeated all fourteen fields
of GamelistMetadataMedia. Python has no `keyof`, so any Literal of a
TypedDict's keys is a second declaration of them, and a field added to
the TypedDict would be left out of it without any error.
The three index sites go back to suppressing `literal-required`, now as
`# type: ignore[literal-required]` so plain mypy reads it as well as
Trunk. The TypedDict stays the only declaration of the key set.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPpv6W2ygP9tQ61fTQxdYp
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>