Sam Dornan 4080cee68e feat(search): Order v2 search results by relevance until a sort is picked (#4995)
* Order v2 search results by relevance until a sort is picked

The Search page fell back to the gallery-wide title sort whenever the URL
named none, so the backend only used search relevance to break ties
between identical titles. Search now sends an empty order_by by default,
letting relevance lead; clicking a column still sorts by it and lands in
the URL as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iCApu4gYrGBWDX8JD9JH6

* pr-ready step 2 (code-review): fix relevance-order edge cases

The backend now decides whether relevance leads and returns an empty
char_index when it does, so single-word searches (still name-ordered)
keep the A-Z strip and letter grouping, and multi-word searches get no
letter headers over rows that are not in letter order. A write under a
relevance-ordered search refetches, since the row lacks the filename and
aliases relevance ranks on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iCApu4gYrGBWDX8JD9JH6

* pr-ready step 3 (simplify): drop duplicated defaults and test setup

Gallery order clauses check order_by directly again, since the phrases
are already known there; useGalleryOrderUrl takes its default from the
caller only; the default key comes from DEFAULT_ORDER_BY in useRomSync;
and the new tests reuse the existing setup and mount helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iCApu4gYrGBWDX8JD9JH6

* Offer Relevance as a sort on Search and read it off the backend

Search's sort menu (grid toolbar and the compact list header) now lists
Relevance, and a third click on a desktop column header returns to it,
so the default order is reachable again after picking a column. The
direction toggle hides under relevance, which has no direction.

useRomSync's refetch now follows the backend's own signal for a
relevance order (an unset sort answered without letter positions)
instead of treating every search as one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iCApu4gYrGBWDX8JD9JH6

* Check the Relevance sort entry when it is active

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iCApu4gYrGBWDX8JD9JH6

* Show the order the backend applied in Search's sort controls

An unset sort the backend still answered by name (an empty or one-word
search) now reads as Title in the sort controls, with its direction
toggle, rather than as Relevance. The store records whether the last
answer led with relevance and keeps it through refetches, so the controls
don't flicker while a search reloads. Picking Relevance from the toolbar
now also resets the direction, as the list header's third click does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iCApu4gYrGBWDX8JD9JH6

* pr-ready simplify: read the applied order from effectiveOrderBy

- The letter strip reads `effectiveOrderBy` instead of re-checking
  `charIndex`, which also stops it vanishing during every refetch of a
  relevance-ordered search.
- `useRomSync` reads `effectiveOrderBy`, so `relevanceLeads` goes.
- `setOrderBy(null)` resets the direction itself, so `clearOrder` and
  the shell's toolbar handler go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iCApu4gYrGBWDX8JD9JH6

* Tell the sort controls whether relevance is applied

The controls read a null sort key as "unsorted", but the shell also
passes null for a gallery key no column carries, so
`/search?orderBy=last_played` ticked Relevance and hid the direction
toggle. The toolbar, list header and phone sort menu now take an
explicit `unsorted` flag from the store's `effectiveOrderBy`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iCApu4gYrGBWDX8JD9JH6

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 15:56:36 -05:00
2026-04-15 19:20:17 -04:00
2024-05-21 19:22:14 -04:00
2024-02-11 16:41:36 +01:00
2024-07-09 13:43:14 +02:00

romm logo

A beautiful, powerful, self-hosted ROM manager and player.

Trendshift hackernews badge
selfh.st badge Discord

Overview

Scan, enrich, browse and play your ROM collection from one beautiful & free self-hosted app. Metadata from 10+ providers, save sync across your devices, and support for over 400 platforms. RomM is a must-have for anyone who plays on emulators.

Browsing a library and playing a game in RomM

Features

Installation

The easiest way to start is with the Quick Start Guide in the docs. If you're having trouble with setup, please review the page for troubleshooting steps.

Prefer a hosted deploy over wiring up the stack yourself?

Deploy on Hostinger
Starting at $6.49/mo · Setup guide

Deployment and infrastructure support for this install is handled by Hostinger. Prices are indicative and may not reflect current offerings. Signups through the link above send a share of the revenue back to us, which helps fund the project.

Official apps

Playnite libraryPlaynite logo Playnite plugin

Effortlessly integrate your retro game collection into Playnite, the open-source game library manager that provides a unified interface for all of your games on PC.

Windows Desktop QR pairing

Install  by @gantoine


Argosy libraryArgosy logo Argosy

Sync your library, download games on demand and track your achievements, from a gamepad-first interface designed for Anbernic, Retroid Pocket, Odin, and similar devices.

Android Handhelds QR pairing Save sync

Download  by @tmgast


Grout multi-selectGrout logo Grout

A lightweight client for your favorite handheld custom firmwares*. Download games, box art and BIOS files wirelessly, and sync your saves automatically as you play.

Linux Handhelds Save sync

Quick start  by @BrandonKowalski

*Supports Allium, Batocera, Knulli, MinUI, muOS, NextUI, Onion, ROCKNIX, Spruce and TrimUI.

Community

Here are some cool projects maintained by members of our community. Please note that our team does not regularly review their source code.

Mobile

Desktop

Handhelds

Other

Support the project

Consider supporting this project on Open Collective. Funds cover hosting, development, and maintenance, and we pass some along to community projects to nurture a healthy ecosystem of apps.

Open Collective

Our Friends

Here are a few projects that we think you might like:

  • Lutris: Open gaming platform for Linux
  • Cocoon: Controller-first Android frontend for retro handhelds
  • muOS: Custom firmware for Anbernic and other handhelds
  • RetroDECK: Retro gaming on SteamOS and Linux
  • Steam ROM Manager: An app for managing ROMs in Steam
  • Hasheous: Hash lookup service that maps ROMs to game metadata
  • Gaseous: Another ROM manager with web-based emulator
  • Playmatch: Microservice for matching ROM hashes to games
  • EmulatorJS: An embeddable, browser-based emulator
  • PortMaster: Native game ports for Linux handhelds
  • MelonLoader: Universal mod loader for Unity games
  • NextUI: MinUI-based custom firmware for TrimUI handhelds
  • RetroAchievements: Achievements for retro games

Supported By

These companies support us by providing their tools for free:

Greptile Socket
Description
No description provided
Readme AGPL-3.0 490 MiB
Languages
Python 50.1%
Vue 40.3%
TypeScript 7.2%
CSS 0.9%
Shell 0.6%
Other 0.8%