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 1/2] 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 ? (
onMatch(installedId)}
+ onClick={() => onMatch(catalogMatch.id)}
className="btn btn-ghost"
>
- Match to catalog…
+ Match to catalog
) : null}
{
expect(hudDisplayName({ name: "7HUD" })).toBe("7HUD");
});
});
+
+describe("hudCatalogMatch", () => {
+ const catalog = [{ id: "rayshud" }, { id: "Middle-Mann" }, { id: "m0re-hud" }, { id: "m0rehud" }];
+ const match = (id: string, source: "local" | "hudDb" = "local", inferred = false) =>
+ hudCatalogMatch(catalog as never, {
+ installed: { id, hash: null, source, options: {} },
+ inferred,
+ schemaSupported: false,
+ catalogHash: null,
+ updateAvailable: false,
+ })?.id ?? null;
+
+ it("offers the catalog HUD an imported folder is a copy of", () => {
+ expect(match("rayshud")).toBe("rayshud");
+ expect(match("RaysHUD-master")).toBe("rayshud");
+ expect(match("middlemann-main")).toBe("Middle-Mann");
+ expect(match("rayshud", "hudDb", true)).toBe("rayshud");
+ });
+
+ it("offers nothing for a catalog install, an unknown HUD or an unclear name", () => {
+ expect(match("rayshud", "hudDb")).toBeNull();
+ expect(match("pure-hud")).toBeNull();
+ expect(match("m0re_hud")).toBeNull();
+ expect(match("m0re-hud")).toBe("m0re-hud");
+ });
+});
diff --git a/apps/desktop/src/lib/hud-ui.ts b/apps/desktop/src/lib/hud-ui.ts
index aae1238f..02771b27 100644
--- a/apps/desktop/src/lib/hud-ui.ts
+++ b/apps/desktop/src/lib/hud-ui.ts
@@ -538,3 +538,29 @@ export function parseHudRgba(value: string): { r: number; g: number; b: number;
export function formatHudRgba(r: number, g: number, b: number, a: number): string {
return `${r} ${g} ${b} ${a}`;
}
+
+/** Letters and digits only, without the branch suffix GitHub adds to a downloaded folder. */
+function normalizeHudName(name: string): string {
+ const lower = name.trim().toLowerCase();
+ const suffix = ["-master", "-main"].find((end) => lower.endsWith(end));
+ return (suffix ? lower.slice(0, -suffix.length) : lower).replace(/[^a-z0-9]/g, "");
+}
+
+/**
+ * The catalog HUD an imported or found HUD can be matched to: the one with its
+ * folder name, ignoring case, punctuation and a `-master`/`-main` suffix. Null
+ * when the HUD already comes from the catalog, or when no single entry fits.
+ */
+export function hudCatalogMatch(
+ catalog: HudCatalogEntry[],
+ state: HudUiState,
+): HudCatalogEntry | null {
+ const installed = state.installed;
+ if (!installed || (installed.source === "hudDb" && !state.inferred)) return null;
+ const exact = catalog.find((entry) => entry.id.toLowerCase() === installed.id.toLowerCase());
+ if (exact) return exact;
+ const wanted = normalizeHudName(installed.id);
+ if (wanted === "") return null;
+ const close = catalog.filter((entry) => normalizeHudName(entry.id) === wanted);
+ return close.length === 1 ? close[0] : null;
+}
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index ad390712..791e738b 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -95,7 +95,7 @@ Change install opens the finder with the previous install remembered in memory o
- Mouse `sensitivity` and `zoom_sensitivity_ratio` are exact decimal fields owned by the Gameplay scope (native `managed_cfg` and the frontend scope agree); input accepts plain positive decimals up to 1000 because the pinned dump documents no range, and an invalid entry is shown with a reason but never saved. Because the managed cfg runs after `config.cfg`, a completed absorb that saw `config.cfg` drift rewrites only the managed lines when TF2's options changed them; the sync never adds lines the managed file did not set. Raw input and acceleration stay with mastercomfig's Flat mouse addon, and no recommended sensitivity is offered.
- Gameplay's Weapons group holds auto reload, fast switch and Medigun auto-heal (`tf_medigun_autoheal`); Combat feedback holds damage numbers, combined damage numbers and healing numbers (`hud_combattext`, `_batching`, `_healing`). All are archived client cvars with no sv_cheats or server requirement; values seed from the effective cfg and TF2's defaults apply only when absent. Colors and the batching window are not offered. The same after-game sync covers these toggles, auto reload and fast switch because TF2's Advanced options write them to `config.cfg`; it accepts only values those options would write.
- **HUD** — hud-db catalog (paginated, sorted by name / tf2huds.dev listing activity / downloads / views from exact matched statistics, cached a day), one HUD per profile, install kinds by host (GitHub codeload zip, Dropbox `dl=1`, GameBanana download page, teamfortress.tv thread scrape, or link out), import picker offers ZIP/7z/RAR/folder, and Dropbox, teamfortress.tv and single-file GameBanana HUD downloads accept the same three archive formats through the shared bounded reader, TF2HUD.Editor schemas consumed as data (parser strips `//` comments, options may lack `Name`). Listing activity is not a HUD release date; missing statistics never enter metric rankings. Imgur albums open in the browser; GitHub `showcase.md` albums load in-app.
-- HUD browsing uses six previews per page with numbered navigation and page jumps above and below results; one Import HUD entry offers archive or extracted-folder choices. Imports unwrap a unique nested HUD only when every retained file belongs to it. Multiple HUD roots or sibling files require the user to follow the author's instructions and import one extracted HUD folder. `info.vdf` must declare UI version 3 before install; metadata and payloads are never synthesized or rewritten to imply compatibility. Dropbox download shards are trusted only as Dropbox redirects, one label below `dl.dropboxusercontent.com`.
+- HUD browsing uses six previews per page with numbered navigation and page jumps above and below results; one Import HUD entry offers archive or extracted-folder choices. An imported or found HUD whose folder name matches exactly one catalog entry (ignoring case, punctuation and a `-master`/`-main` suffix) offers Match to catalog, which pairs the record with that entry and renames the folder to its id. Imports unwrap a unique nested HUD only when every retained file belongs to it. Multiple HUD roots or sibling files require the user to follow the author's instructions and import one extracted HUD folder. `info.vdf` must declare UI version 3 before install; metadata and payloads are never synthesized or rewritten to imply compatibility. Dropbox download shards are trusted only as Dropbox redirects, one label below `dl.dropboxusercontent.com`.
- Catalog HUD install and update emit `hud-install-progress` (downloading → checking → installing, the last after the write gate is taken). The card being installed shows exactly those steps, and the header status names the operation ("Installing HUD…"); there is no separate progress banner or percentage. Local imports have no download steps and show no card overlay.
- HUD/mod ZIP, 7z and folder imports share the profile ownership junk policy: case-insensitive `.bak`, `.cache`, `.ztmp`, `.execs-part`, VCS/OS metadata and `node_modules` components are skipped before root detection. Payload bytes and archive/path limits remain unchanged.
- HUD metric sorts rank only entries with a valid selected statistic; coverage and missing counts are explicit, and A to Z includes the full catalog. Statistics reloads serialize independently of the catalog and report loading/failure. tf2huds.dev counts follow its HUD list, then match explicit comfig links or unique GitHub repositories; names and missing values are never guessed into rankings. Browser fixture data is labeled Preview data.
diff --git a/docs/guide/hud.md b/docs/guide/hud.md
index 0c5c11ac..d4f0fe97 100644
--- a/docs/guide/hud.md
+++ b/docs/guide/hud.md
@@ -12,6 +12,8 @@ The catalog comes from [hud-db](https://github.com/mastercomfig/hud-db), with ac
**Import HUD** takes a ZIP, 7z or RAR, or a folder you already extracted. execs checks that it is a TF2 HUD (its `info.vdf` declares UI version 3) before installing it. An archive with several HUDs inside asks you to import the one you want as a folder.
+An imported HUD that is also in the catalog shows **Match to catalog** on the Installed view. Matching it lets execs check that HUD for updates; a folder named after a download (`rayshud-master`) is renamed to the catalog's name.
+
When you install or import a HUD over another one, the old HUD is kept as a backup outside TF2's HUD folders. App settings → Storage lists those backups.
## HUD options
From 43dbd2b6bf127f526822e428cbc1aeb92584e861 Mon Sep 17 00:00:00 2001
From: Random <65575762+rndaom@users.noreply.github.com>
Date: Mon, 16 Nov 2026 13:53:33 -0500
Subject: [PATCH 2/2] feat(hud): point wrong-pane imports at Mods
Importing something that is not a HUD in the HUD pane, or a pack with more than viewmodel files in Viewmodels, now leaves a notice with an Open Mods button instead of only a failure message.
---
CHANGELOG.md | 5 +++
apps/desktop/src-tauri/core/src/hud.rs | 12 ++++---
apps/desktop/src-tauri/core/src/viewmodel.rs | 5 ++-
apps/desktop/src-tauri/src/commands/hud.rs | 12 +++++++
.../src-tauri/src/commands/viewmodel.rs | 21 +++++++++----
apps/desktop/src/HudPane.tsx | 28 +++++++++++++++++
.../src/SettingsHost.hud-loading.test.tsx | 22 +++++++++++++
apps/desktop/src/SettingsHost.tsx | 31 +++++++++++++++++++
apps/desktop/src/ViewmodelPane.tsx | 27 ++++++++++++++++
docs/ARCHITECTURE.md | 2 +-
docs/guide/hud.md | 2 +-
docs/guide/viewmodels.md | 2 +-
12 files changed, 154 insertions(+), 15 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b20ff24..aa0ea9d1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,11 @@ User-facing changes only. The release workflow publishes the matching
## [Unreleased]
+### Fixed
+
+- HUD and Viewmodels: importing something that belongs in Mods now says so and offers Open Mods,
+ instead of only failing.
+
## [0.3.0] - 2026-11-15
### Fixed
diff --git a/apps/desktop/src-tauri/core/src/hud.rs b/apps/desktop/src-tauri/core/src/hud.rs
index 03f306e4..50fbc836 100644
--- a/apps/desktop/src-tauri/core/src/hud.rs
+++ b/apps/desktop/src-tauri/core/src/hud.rs
@@ -725,12 +725,14 @@ fn finish_extracted(raw: Vec<(String, Vec)>) -> Result Result<(), ProfileError> {
- let info = tree.info_vdf().ok_or_else(|| {
- ProfileError::Io(
- "No HUD folder was found (missing info.vdf). Choose a complete HUD download or its extracted HUD folder.".into(),
- )
- })?;
+ let info = tree
+ .info_vdf()
+ .ok_or_else(|| ProfileError::Io(NO_HUD_FOUND.into()))?;
match std::str::from_utf8(info).ok().and_then(parse_ui_version) {
Some(CURRENT_HUD_UI_VERSION) => Ok(()),
Some(version) => Err(ProfileError::Io(format!(
diff --git a/apps/desktop/src-tauri/core/src/viewmodel.rs b/apps/desktop/src-tauri/core/src/viewmodel.rs
index a571cf0b..023cdf71 100644
--- a/apps/desktop/src-tauri/core/src/viewmodel.rs
+++ b/apps/desktop/src-tauri/core/src/viewmodel.rs
@@ -1081,6 +1081,9 @@ fn validate_viewmodel_import_metadata(
Ok(())
}
+/// Ends the refusal for a VPK that carries more than viewmodels.
+pub const MIXED_VIEWMODEL_PACK: &str = "Import mixed-content packs through Mods.";
+
/// A custom VPK mounts every member as game content. Keep the Viewmodels
/// shortcut limited to compiled first-person weapon models; mixed packs belong
/// in Mods, where CFG members receive their separate trust review.
@@ -1089,7 +1092,7 @@ fn validate_viewmodel_vpk(bytes: &[u8]) -> Result<(), ProfileError> {
validate_vpk_dir_bytes_with_paths(bytes, &mut |path| {
if !is_viewmodel_member(path) {
return Err(VpkError(format!(
- "Viewmodel VPK contains unrelated content: {path}. Import mixed-content packs through Mods."
+ "Viewmodel VPK contains unrelated content: {path}. {MIXED_VIEWMODEL_PACK}"
)));
}
if path.to_ascii_lowercase().ends_with(".mdl") {
diff --git a/apps/desktop/src-tauri/src/commands/hud.rs b/apps/desktop/src-tauri/src/commands/hud.rs
index 48ba2e5c..bf9f3acb 100644
--- a/apps/desktop/src-tauri/src/commands/hud.rs
+++ b/apps/desktop/src-tauri/src/commands/hud.rs
@@ -333,8 +333,13 @@ fn install_local_hud(
// These errors describe rejected input before any profile write. Keep the
// core error code without its generic profile-library write failure prefix.
+// A pick with no `info.vdf` gets its own code so the HUD pane can point an
+// ordinary mod to Mods.
fn hud_input_error(error: execs_core::ProfileError) -> CommandError {
match error {
+ execs_core::ProfileError::Io(message) if message == execs_core::hud::NO_HUD_FOUND => {
+ CommandError::new("NotAHud", message)
+ }
execs_core::ProfileError::Io(message) => CommandError::new("Io", message),
other => other.into(),
}
@@ -677,6 +682,13 @@ mod tests {
assert!(invalid.message.contains("not a ZIP, 7z or RAR"));
assert!(!invalid.message.contains("profile library"));
+ // An ordinary mod has no info.vdf; its own code lets the pane offer Mods.
+ let not_a_hud = hud_input_error(execs_core::ProfileError::Io(
+ execs_core::hud::NO_HUD_FOUND.into(),
+ ));
+ assert_eq!(not_a_hud.code, "NotAHud");
+ assert_eq!(not_a_hud.message, execs_core::hud::NO_HUD_FOUND);
+
let lock = hud_input_error(execs_core::ProfileError::GameRunning);
assert_eq!(lock.code, "GameRunning");
assert_eq!(
diff --git a/apps/desktop/src-tauri/src/commands/viewmodel.rs b/apps/desktop/src-tauri/src/commands/viewmodel.rs
index bf5ed25f..ae5b5863 100644
--- a/apps/desktop/src-tauri/src/commands/viewmodel.rs
+++ b/apps/desktop/src-tauri/src/commands/viewmodel.rs
@@ -519,17 +519,26 @@ pub async fn import_viewmodels(
with_profile(move |root, profile_id| {
context.ensure_current(&root, &profile_id)?;
ensure_viewmodel_unchanged(&profile_id, initial_viewmodel.as_ref())?;
- Ok(execs_core::import_viewmodel_vpk(
- &root,
- &profile_id,
- &bytes,
- preload,
- )?)
+ execs_core::import_viewmodel_vpk(&root, &profile_id, &bytes, preload)
+ .map_err(viewmodel_input_error)
})
.await
.map(Some)
}
+// A VPK with more than viewmodels gets its own code so the pane can point it
+// to Mods.
+fn viewmodel_input_error(error: execs_core::ProfileError) -> CommandError {
+ match error {
+ execs_core::ProfileError::Io(message)
+ if message.ends_with(execs_core::viewmodel::MIXED_VIEWMODEL_PACK) =>
+ {
+ CommandError::new("ViewmodelMixedContent", message)
+ }
+ other => other.into(),
+ }
+}
+
fn ensure_viewmodel_unchanged(
profile_id: &str,
expected: Option<&execs_core::ViewmodelRecord>,
diff --git a/apps/desktop/src/HudPane.tsx b/apps/desktop/src/HudPane.tsx
index 5947611d..158b6f0b 100644
--- a/apps/desktop/src/HudPane.tsx
+++ b/apps/desktop/src/HudPane.tsx
@@ -116,6 +116,9 @@ export function HudPane({
onApplyOptions,
onImportArchive,
onImportFolder,
+ modsImportHint = null,
+ onOpenMods,
+ onDismissModsImportHint,
}: {
api: Api;
/** The profile this draft belongs to; a switch discards it. */
@@ -147,6 +150,10 @@ export function HudPane({
/** Install a HUD from a ZIP, 7z or RAR, or a folder on this computer. */
onImportArchive: () => HudMutationResult;
onImportFolder: () => HudMutationResult;
+ /** Why the last import was refused as not being a HUD; it may be a mod. */
+ modsImportHint?: string | null;
+ onOpenMods?: () => void;
+ onDismissModsImportHint?: () => void;
}) {
const { running, busy, setError } = useAppStatus();
const active = useContext(AutosaveActivity);
@@ -322,6 +329,27 @@ export function HudPane({
}
/>
+ {modsImportHint ? (
+
+ That isn't a HUD
+
+ It has no info.vdf, so nothing was imported. A mod is imported in Mods.
+
+
+ {onOpenMods ? (
+
+ Open Mods
+
+ ) : null}
+ {onDismissModsImportHint ? (
+
+ Dismiss
+
+ ) : null}
+
+
+ ) : null}
+
void>>;
+let onNavigate: ReturnType void>>;
function makeApi() {
return {
getFilesContext: vi.fn(async () => ({ profileId, root: "fixture", layer: "vanilla" })),
@@ -104,6 +105,7 @@ async function render() {
onBindSyncHandled={() => {}}
onBusyChange={() => {}}
onPendingChange={onPendingChange}
+ onNavigate={onNavigate}
onError={() => {}}
/>
@@ -131,6 +133,7 @@ beforeEach(() => {
refreshKey = 1;
api = makeApi();
onPendingChange = vi.fn();
+ onNavigate = vi.fn();
});
afterEach(async () => {
await act(async () => root.unmount());
@@ -322,6 +325,25 @@ describe("HUD loading through the real settings host and pane", () => {
expect(element("toast").getAttribute("data-kind")).toBe("saved");
});
+ it("points an import that is not a HUD to Mods instead of a bare failure", async () => {
+ await render();
+ api.importHudArchive.mockRejectedValueOnce({
+ code: "NotAHud",
+ message: "No HUD folder was found (missing info.vdf).",
+ });
+ await click("hud-import");
+ await click("hud-import-archive");
+ const hint = element("hud-import-not-a-hud");
+ expect(hint.textContent).toContain("That isn't a HUD");
+ expect(container.querySelector('[data-testid="toast"][data-kind="error"]')).toBeNull();
+ const open = Array.from(hint.querySelectorAll("button")).find(
+ (button) => button.textContent === "Open Mods",
+ );
+ await act(async () => open?.click());
+ expect(onNavigate).toHaveBeenCalledWith("mods");
+ expect(container.querySelector('[data-testid="hud-import-not-a-hud"]')).toBeNull();
+ });
+
it("retains a same-HUD dirty draft through schema failure and retry without saving unavailable controls", async () => {
vi.useFakeTimers();
running = true;
diff --git a/apps/desktop/src/SettingsHost.tsx b/apps/desktop/src/SettingsHost.tsx
index 55e9e043..4d0e57c0 100644
--- a/apps/desktop/src/SettingsHost.tsx
+++ b/apps/desktop/src/SettingsHost.tsx
@@ -272,6 +272,13 @@ export function SettingsHost({
}, [settled, onSettledChange]);
// biome-ignore lint/correctness/useExhaustiveDependencies: Profile changes invalidate guidance from the previous import attempt.
useEffect(() => setModsHudImportRequired(null), [profileId]);
+ // An import refused because the pick belongs in Mods, kept on its pane.
+ const [modsImportHint, setModsImportHint] = useState<{
+ tab: "hud" | "viewmodels";
+ message: string;
+ } | null>(null);
+ // biome-ignore lint/correctness/useExhaustiveDependencies: the notice belongs to the profile it was raised in.
+ useEffect(() => setModsImportHint(null), [profileId]);
const hud = useHudResources(
api,
profileId,
@@ -654,6 +661,15 @@ export function SettingsHost({
options?.onHandledFailure?.("review-required");
return false;
}
+ if (failure.code === "NotAHud" || failure.code === "ViewmodelMixedContent") {
+ if (started) toast.cancelSave(copy?.source);
+ setModsImportHint({
+ tab: failure.code === "NotAHud" ? "hud" : "viewmodels",
+ message: failure.message,
+ });
+ options?.onFailure?.(failure.message);
+ return false;
+ }
if (
(failure.code === "HudReviewRequired" || failure.code === "HudLiveReviewRequired") &&
expectedProfileId &&
@@ -1105,8 +1121,15 @@ export function SettingsHost({
await hud.reloadLocal();
});
}}
+ modsImportHint={modsImportHint?.tab === "hud" ? modsImportHint.message : null}
+ onOpenMods={() => {
+ setModsImportHint(null);
+ onNavigate?.("mods");
+ }}
+ onDismissModsImportHint={() => setModsImportHint(null)}
onImportArchive={() => {
setModsHudImportRequired(null);
+ setModsImportHint(null);
return write(
async () => {
if ((await api.importHudArchive()) === null) return null;
@@ -1118,6 +1141,7 @@ export function SettingsHost({
}}
onImportFolder={() => {
setModsHudImportRequired(null);
+ setModsImportHint(null);
return write(
async () => {
if ((await api.importHudFolder()) === null) return null;
@@ -1223,7 +1247,14 @@ export function SettingsHost({
}}
profilePreload={modsPayload?.profilePreload ?? null}
loadCatalog={api.getViewmodelSourceCatalog}
+ modsImportHint={modsImportHint?.tab === "viewmodels" ? modsImportHint.message : null}
+ onOpenMods={() => {
+ setModsImportHint(null);
+ onNavigate?.("mods");
+ }}
+ onDismissModsImportHint={() => setModsImportHint(null)}
onImport={(preload) => {
+ setModsImportHint(null);
return write(
async () => {
if ((await api.importViewmodels(preload)) === null) return null;
diff --git a/apps/desktop/src/ViewmodelPane.tsx b/apps/desktop/src/ViewmodelPane.tsx
index 70add161..41f2ce7d 100644
--- a/apps/desktop/src/ViewmodelPane.tsx
+++ b/apps/desktop/src/ViewmodelPane.tsx
@@ -1,5 +1,6 @@
import { DownloadSimple, Trash } from "@phosphor-icons/react";
import { useState } from "react";
+import { Alert } from "./components/ui/Alert";
import { ClassTabs } from "./components/ui/ClassTabs";
import { PaneHeader } from "./components/ui/PaneHeader";
import { useAppStatus, useCanWrite } from "./hooks/useAppStatus";
@@ -24,6 +25,9 @@ export function ViewmodelPane({
onImport,
onBuild,
onRemove,
+ modsImportHint = null,
+ onOpenMods,
+ onDismissModsImportHint,
}: {
active: boolean;
profileId: string | null;
@@ -33,6 +37,10 @@ export function ViewmodelPane({
profilePreload: boolean | null;
loadCatalog: () => Promise;
onImport: (preload: boolean) => void;
+ /** Why the last VPK was refused for carrying more than viewmodels. */
+ modsImportHint?: string | null;
+ onOpenMods?: () => void;
+ onDismissModsImportHint?: () => void;
onBuild: (request: ViewmodelBuildRequest) => Promise;
onRemove: () => void;
}) {
@@ -69,6 +77,25 @@ export function ViewmodelPane({
onRemovePack={onRemove}
/>
+ {modsImportHint ? (
+
+ That pack has more than viewmodels
+ {modsImportHint}
+
+ {onOpenMods ? (
+
+ Open Mods
+
+ ) : null}
+ {onDismissModsImportHint ? (
+
+ Dismiss
+
+ ) : null}
+
+
+ ) : null}
+