From 421dcfdf367a8d5d3fd1526d67d47a3860a249ca Mon Sep 17 00:00:00 2001 From: Random <65575762+rndaom@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:53:31 -0500 Subject: [PATCH] feat(hud): offer Match to catalog for an imported HUD An imported HUD that is also in the catalog now shows Match to catalog, so it can get update checks without being reinstalled. Folder names such as rayshud-master match their catalog HUD; the button stays hidden when no single catalog HUD fits. --- CHANGELOG.md | 5 +++++ apps/desktop/src/HudPane.tsx | 14 +++++++++----- apps/desktop/src/lib/hud-ui.test.ts | 27 +++++++++++++++++++++++++++ apps/desktop/src/lib/hud-ui.ts | 26 ++++++++++++++++++++++++++ docs/ARCHITECTURE.md | 2 +- docs/guide/hud.md | 2 ++ 6 files changed, 70 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b20ff24..0e05edb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ User-facing changes only. The release workflow publishes the matching ## [Unreleased] +### Fixed + +- HUD: an imported HUD that is also in the catalog now offers Match to catalog, so it can get + updates. The button was missing for imported HUDs. + ## [0.3.0] - 2026-11-15 ### Fixed diff --git a/apps/desktop/src/HudPane.tsx b/apps/desktop/src/HudPane.tsx index 5947611d..9ad0b4da 100644 --- a/apps/desktop/src/HudPane.tsx +++ b/apps/desktop/src/HudPane.tsx @@ -50,6 +50,7 @@ import { HUD_SORTS, hudAuthorCopy, hudCatalogControls, + hudCatalogMatch, hudDisplayName, hudInstallSourceCopy, hudOptionsDirty, @@ -224,6 +225,7 @@ export function HudPane({ const installedEntry = installedId ? (catalog.find((entry) => entry.id.toLowerCase() === installedId.toLowerCase()) ?? null) : null; + const catalogMatch = hudCatalogMatch(catalog, state); const mutationBlocked = locked || dirty || stateLoading || stateError !== null; const mutationReason = running ? "Close TF2 before changing the installed HUD." @@ -371,8 +373,10 @@ export function HudPane({ {installedEntry ? `${hudAuthorCopy(installedEntry)} · ` : ""} {installedLabel}

- {state.inferred ? ( -

Match it to hud-db to enable updates.

+ {catalogMatch ? ( +

+ Match it to {hudDisplayName(catalogMatch)} in the catalog to get updates. +

) : null}
{state.updateAvailable ? ( @@ -387,16 +391,16 @@ export function HudPane({ {running ? "Close TF2 to update" : "Update HUD"} ) : null} - {state.inferred ? ( + {catalogMatch ? ( ) : null}