fix(frontend): base v2 verified badge on real DB hash matches#3815
Merged
Conversation
Contributor
Greptile SummaryThis PR bases the verified-ROM UI on actual database hash matches. The main changes are:
Confidence Score: 4/5The verified badge tooltip needs a keyboard-accessibility fix before merging.
frontend/src/v2/components/GameDetails/GameHeader.vue Important Files Changed
Reviews (1): Last reviewed commit: "fix(frontend): base v2 verified badge on..." | Re-trigger Greptile |
gantoine
force-pushed
the
fix/verified-badge-hash-match
branch
from
July 18, 2026 23:53
b186e00 to
7eb8929
Compare
The v2 details "Verified ROM" badge was gated on `crc_hash` being present, but a hash is computed for essentially every ROM (including compressed archives that never matched any database). This made the badge appear on unverified ROMs (#3806). Introduce `romVerification` as the single source of truth, mirroring the backend's `_filter_by_verified`: a ROM is verified only when a Hasheous signature match flag is set. Drive the header badge, the Metadata-tab per-database chips, and (fixed) the RetroAchievements chip (`ra_match`, not `ra_id`) from the same shared list, and add the previously missing WHDLoad / PureDOS databases. Also clarify what the badge means (#3807): the header tooltip now spells out that it is a database hash match (Hasheous / RetroAchievements), with the short label kept as the icon's accessible name. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gantoine
force-pushed
the
fix/verified-badge-hash-match
branch
from
July 18, 2026 23:53
7eb8929 to
5a44db1
Compare
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Use the generated SimpleRom type for the verification helpers instead of an ad-hoc structural type. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Explain the changes or enhancements you are proposing with this pull request.
Fixes #3806
Fixes #3807
The v2 game-details "Verified ROM" badge was gated on
crc_hashbeing present:A
crc_hash(and md5/sha1) is computed for essentially every ROM, so the badge appeared on ROMs that never matched any hash database, e.g. the 7z-compressed Astro Boy GBA ROM in #3806 (which fails to match because of the separate archive-hashing bug #3808, but was still shown as verified).What changed
frontend/src/v2/utils/romVerification.ts— single source of truth for what "verified" means, mirroring the backend's_filter_by_verified(roms_handler.py). A ROM is verified only when a Hasheous signature match flag is set. ExportsVERIFICATION_DATABASES,VERIFICATION_KEYS,matchesDatabase(), andisRomVerified().GameDetails.vue— the header badge now derives fromisRomVerified(currentRom)instead ofcrc_hash.MetadataTab.vue— the per-database chips are now driven by the sharedVERIFICATION_DATABASES, so the badge, the chip list, and the backend filter can't drift apart. Fixes the RetroAchievements chip to usera_match(an actual hash match) instead ofra_id(mere metadata linkage), and adds the previously-missing WHDLoad / PureDOS databases.rom.verified-rom-hintkey added to all 18 locales (translated for en/fr/es/it/pt/de, English placeholder elsewhere). The short "Verified ROM" label is kept as the icon'saria-label.Note: this is the display/clarity fix. The underlying "7z hashing hashes the archive instead of the ROM" problem is tracked separately in #3808 (backend
rahasher.py).AI assistance disclosure
Per CONTRIBUTING.md.
This PR was written with AI assistance (Claude Code). All changes were reviewed by the author.
Checklist
Please check all that apply.
Screenshots (if applicable)
N/A
Verification
romVerification.test.ts: 6 unit tests (no-metadata, hashed-but-unmatched, per-key match, MAME arcade/mess, RA viara_match, keys-are-flattened) — pass.npm run typecheck: clean.check_i18n_locales.py+check_i18n_sorted.py: pass.trunk fmt+trunk checkon all touched files: no issues.🤖 Generated with Claude Code