From 43449c04ba33ff776cd133d75bef124284add6a4 Mon Sep 17 00:00:00 2001 From: tdgao Date: Thu, 22 Oct 2026 11:01:01 -0600 Subject: [PATCH 1/3] fix: instance name sort to be alphanumerical instead of only alphabetical --- .../app-frontend/src/components/ui/library/use-library.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/app-frontend/src/components/ui/library/use-library.ts b/apps/app-frontend/src/components/ui/library/use-library.ts index fab76119f95..22993da88d4 100644 --- a/apps/app-frontend/src/components/ui/library/use-library.ts +++ b/apps/app-frontend/src/components/ui/library/use-library.ts @@ -293,7 +293,7 @@ function createLibraryState(instances: Ref) { const groupedDifference = Number(a.group_ids.length > 0) - Number(b.group_ids.length > 0) if (groupedDifference !== 0) return groupedDifference - return a.name.localeCompare(b.name) + return a.name.localeCompare(b.name, undefined, { numeric: true }) }) }) const groupInstancesModalGroup = computed(() => { @@ -311,7 +311,7 @@ function createLibraryState(instances: Ref) { return instances.value .filter((instance) => !query || instance.name.toLowerCase().includes(query)) .slice() - .sort((a, b) => a.name.localeCompare(b.name)) + .sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true })) }) const canCreateGroup = computed( () => normalizedNewGroupName.value.length > 0 && !creatingGroup.value, @@ -433,7 +433,9 @@ function createLibraryState(instances: Ref) { switch (displayState.value.sortBy) { case 'Name': - visibleInstances.sort((a, b) => a.name.localeCompare(b.name)) + visibleInstances.sort((a, b) => + a.name.localeCompare(b.name, undefined, { numeric: true }), + ) break case 'Loader': visibleInstances.sort((a, b) => From 1d87c218ed7a37c4011e77b2babe33aba30a35aa Mon Sep 17 00:00:00 2001 From: tdgao Date: Thu, 22 Oct 2026 11:06:04 -0600 Subject: [PATCH 2/3] fix: only show game version search bar with 5 or more options --- .../src/components/ui/library/library-toolbar/filter-menu.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app-frontend/src/components/ui/library/library-toolbar/filter-menu.vue b/apps/app-frontend/src/components/ui/library/library-toolbar/filter-menu.vue index 2cb9bf25631..9a9e07d6b34 100644 --- a/apps/app-frontend/src/components/ui/library/library-toolbar/filter-menu.vue +++ b/apps/app-frontend/src/components/ui/library/library-toolbar/filter-menu.vue @@ -38,7 +38,7 @@ const filterCategories = computed(() => [ { key: 'gameVersion', label: formatMessage(messages.gameVersion), - searchable: true, + searchable: new Set(instances.value.map((instance) => instance.game_version)).size > 5, options: [...new Set(instances.value.map((instance) => instance.game_version))] .sort((a, b) => b.localeCompare(a, undefined, { numeric: true })) .map((version) => ({ value: version, label: version })), From 0c6fd25cc3955c2780da419b8ec7ebd0586f82fb Mon Sep 17 00:00:00 2001 From: tdgao Date: Thu, 22 Oct 2026 11:44:42 -0600 Subject: [PATCH 3/3] pnpm prepr --- apps/app-frontend/src/components/ui/library/use-library.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/app-frontend/src/components/ui/library/use-library.ts b/apps/app-frontend/src/components/ui/library/use-library.ts index 22993da88d4..6880bd9244e 100644 --- a/apps/app-frontend/src/components/ui/library/use-library.ts +++ b/apps/app-frontend/src/components/ui/library/use-library.ts @@ -433,9 +433,7 @@ function createLibraryState(instances: Ref) { switch (displayState.value.sortBy) { case 'Name': - visibleInstances.sort((a, b) => - a.name.localeCompare(b.name, undefined, { numeric: true }), - ) + visibleInstances.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true })) break case 'Loader': visibleInstances.sort((a, b) =>