The list sits straight on the tab, without a section card around it, and
Add channel goes under it on the left, as Add does under the users table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An empty required field showed the browser's own validation bubble ("Please
fill out this field"), in the system's language and not the app's. RForm now
sets `novalidate`, RTextField marks the field with `aria-required` instead of
`required`, and an empty required field says so in an RTooltip whose text is
a new `required` chrome label backed by `common.required`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Changing the address saved it before sending the confirmation code, so a
code refused by the one-a-minute limit or the SMTP server left the channel
on an address that never got one. The code now goes out first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Channels tab, for every user, lists their webhooks and email addresses
with their filters and last delivery or error, and lets them add, edit,
test, turn off and delete each one. An email address is confirmed with the
code sent to it, right in its row. The form offers email only when the
server has SMTP set up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each user can add channels that forward their notifications: a webhook
posting RomM's JSON (optionally HMAC-signed), a Discord embed or an ntfy
message, or an email address confirmed with a code. A channel filters by
minimum level and by topic, and every stored notification that passes goes
out in its own RQ job, retried three times; ten failures in a row turn the
channel off and tell its owner.
Channel configs are sealed with a key derived from ROMM_AUTH_SECRET_KEY,
since a webhook URL carries its own token. Only an admin's webhooks may
reach private addresses; everyone else's go through the SSRF guard. Email
goes out over the SMTP_* settings, which the heartbeat reports as
NOTIFICATIONS.EMAIL_ENABLED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tasks endpoint passes run_by_user_id so the runner hears how the task
ended, and the enqueue assertion predated it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A failed LaunchBox or Switch TitleDB download, or an unreadable LaunchBox
archive, now fails the task instead of returning empty stats, so its
starter hears it failed rather than finished.
- The inbox replays changes made while a fetch is in flight onto its
response, so a push, read or dismissal is not undone by an older list.
- A refused mark-read turns its rows unread again, and the inbox view tries
each row once a visit so a failing server is not asked in a loop.
- Recipient resolution and sender attribution move from the endpoint into
notification_handler.
- SendNotificationSection inherits attributes again, and record_termination
loses a docstring sentence the code already says.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The admin form moves from Administration to Notifications, where an admin
gets a Notifications tab and a Send tab (`?tab=send`) and everyone else
keeps the plain inbox. The inbox becomes a component mounted only on its
tab, so opening the form marks nothing read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scan:done and scan:done_ko reach every connected user, so everyone got a
toast for someone else's scan. Only the tab that started it toasts now;
whoever else it concerns gets the scan notification.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A task reported its failure from inside run_task_by_name, which a timeout
parked in the event loop, a killed work horse and a dead worker all skip.
RomMWorker now installs report_task_failure as an RQ exception handler,
which covers cron runs too, since cron can attach no failure callback.
RQ runs neither the failure callback nor the exception handlers for a
killed horse, so the worker runs both itself, which also ends a scan whose
horse was killed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A socket joins its user's room, and an admin's the admin room, once at
connect time, so logging out or revoking a user's sessions left their open
sockets receiving notifications and the log stream. Each socket is now
recorded against the login session that opened it, and removing a session
disconnects those sockets on whichever worker holds them.
The main server takes one disconnect handler, so it moves next to the
connect handler and runs the activity cleanup as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A persisted snackbar toasts at once with the caller's options; what this
tab sends is marked with its tab id, so the socket echo of it adds the row
without a second toast. The toast no longer depends on which of the
request and the push arrives first.
- v2 logout disconnects the socket, which otherwise stays in the user's rooms
until the next login.
- notify_scan_end takes one required outcome, the stats or the error.
- Inboxes are trimmed only for users over the cap, found in one query, and
pushes go out one after another on one Redis connection.
- The log forwarder and the sync emitters use the shared write manager.
- One makeNotification fixture for the frontend tests; small dead code gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The shared write manager passes the server's json_module, which a
manager never attached to a server doesn't inherit; streaming pushes
lost it when they moved onto that manager.
- The inbox drops a list requested before a reset, so a slow response for
the previous user can't fill the next user's inbox.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trims the comments the earlier passes left long or unwrapped, and documents
the shared `socket_handler.emit_to_user` and the netplay channel split in
the backend architecture notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One home for pushing to a user's room: `SocketHandler.emit_to_user`, on a
write-only manager kept per event loop and on the server's own channel.
Streaming's push_to_user and the sync and scan emitters use it too.
- Notifications are stored in one transaction per send, so a broadcast is one
commit, and pushed concurrently. Recipients are resolved from id and
enabled only, and the actor is loaded with just the fields it shows.
- notify_user_or_admins holds the "whoever started it, else the admins"
rule both the scan and the task runner applied by hand.
- A scan notifies from finish(), so no exit path can forget it.
- `data` is never null, dropping its guards; the toast host, the inbox and
the admin form share one tone icon map; the inbox icon uses RAvatar.
- The store keeps its list when a socket echo changes nothing, and small
dead parameters and duplicated lists are gone.
- The socket reconnect after a logout moved from the inbox to AppLayout,
since every v2 feature depends on the socket's identity.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Security:
- The netplay socket server shared the main server's Redis channel while
letting unauthenticated clients name their own rooms, so a netplay socket
in room `user:N` or `admin` received that user's pushes and the admin log
stream. Netplay now has a channel of its own.
- Notifying other users also requires users.write on the token, so an admin
token scoped to me.write can only notify its owner.
- The create payload rejects NUL characters, NaN/Infinity in data and an
empty recipients list instead of failing in the database; mark-read takes
at most as many ids as an inbox holds.
Correctness and cleanup:
- The inbox is cleared whenever the signed-in user changes, so a failed
fetch can't leave the previous user's notifications on screen.
- Enter no longer sends the admin form, where an unfinished title would go
out to everyone.
- A notification without its own icon shows its level's, in the list and in
a pushed toast alike, from one LEVEL_ICONS map.
- One write-only Redis manager per event loop instead of one per push.
- Tests for the inbox socket wiring; em-dashes and long docstrings trimmed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dismiss sat in a column of its own, outside the row's link and hover,
so it read as a block glued to the card. The link now fills the card and
the dismiss is a single button over its right edge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Admins get a Notifications tab in Administration to notify everyone, only
the admins, or chosen users, with a level, title, optional message and an
in-app link. It posts to the same /api/notifications endpoint API clients
use, so the server enforces the same rules.
Deep links to an admin-only tab (?tab=notifications, ?tab=streaming) fell
back to Users on a fresh load, because the tab list is built before
/permissions/me answers. The permissions store now says when it has been
hydrated, and the fallback waits for it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Notifications could only come from backend code, and only in the kinds the
web client knows how to translate. Anyone can now send one that carries its
own text.
- A notification can carry its own title, body, icon and in-app link. RomM's
own kinds stay translated; `custom` and any other kind (`argosy.sync_done`)
is shown with its own content.
- POST /api/notifications: anyone with me.write notifies themselves; an admin
can also notify user ids, `admins` or `all`, and is shown as the sender.
RomM's own kinds are reserved, links must stay inside RomM, and `data` is
capped at 4 KB.
- notify()/notify_admins() accept the same title/body/link/icon.
- Frontend: `snackbar.success(msg, { persist: true })` (or
`{ persist: { body, link } }`) also keeps the message in the inbox. The
first of the request's answer or the socket push shows the toast, so it
appears once.
- Documented in BACKEND_ARCHITECTURE and the backend and frontend skills.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Toasts disappear after a few seconds, and nothing reaches a user who has no
tab open. Notifications are now stored per user and kept until dismissed, so
what a background job or another user did is waiting the next time RomM is
opened.
Backend:
- `notifications` table (0130) with kind, level, data, actor and read_at, capped
at the newest 200 per user.
- /api/notifications: list, mark read, dismiss one, dismiss all.
- notify()/notify_admins() store the row and push `notifications:new` to the
user's socket room; read/dismiss push to the user's other tabs.
- Producers: a scan's end (to whoever started it; an unattended scan tells
the admins when it failed or found new games), a manual task's end (to who
ran it; a scheduled task's failure to the admins), an admin ending someone's
stream, and an admin changing someone's role.
Frontend (v2):
- Unread count badge on the navbar avatar, and a Notifications entry in the
user menu and settings sidebar.
- Notifications view: marks what it shows read, links each row to what it is
about, dismiss one or all.
- Live toast for a new notification, except scans, which already toast.
- The text is rendered from the kind in the reader's language (18 locales).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* 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>
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>