Compare commits

..

1 Commits

Author SHA1 Message Date
Z User
b96d773065 fix: version display in UI + simplify subdir to just <repo>
## What

1. **Version display** — user reported 'ни одно изменение с дашбордом не увидел'.
   Added DASHBOARD_VERSION constant (0.5.0) shown in the footer as 'v0.5.0'.
   Also returned in /api/debug so user can verify the update took effect via
   `curl http://gpu-node:8090/api/debug | jq .version`.

2. **Simplify subdir** — user said '<user>___<repo> не нужно, просто <repo>'.
   Changed download subdir from 'user___repo' to just 'repo'. So
   huggingface.co/user/Qwen3-VL/resolve/main/model.gguf → subdir='Qwen3-VL'
   (was 'user___Qwen3-VL').

3. **Includes all changes from PR #14** (mmproj, subdirs, auto-categorize,
   perf overview, comfy total size, wake dashboard fix) — this branch
   merges feat/multi-fixes + adds versioning + simplifies subdir.

## After merge

```sh
git pull && sh build.sh
docker compose up -d --force-recreate dashboard model-worker
```

Check the footer — should show 'v0.5.0'. If it doesn't, the update didn't
take effect.
2026-10-28 19:34:07 +00:00
4 changed files with 26 additions and 8 deletions

View File

@@ -120,6 +120,7 @@ export async function GET() {
ok: envError === null,
error: envError,
},
version: "0.5.0",
timestamp: new Date().toISOString(),
});
}

View File

@@ -53,6 +53,7 @@ import {
} from "@/components/ui/select";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { cn, formatBytes, timeAgo } from "@/lib/utils";
import { DASHBOARD_VERSION } from "@/lib/version";
// ---------------------------------------------------------------------------
// Types
@@ -1560,8 +1561,11 @@ export default function DashboardPage() {
<footer className="border-t border-border bg-card/30 mt-auto">
<div className="mx-auto max-w-7xl px-4 sm:px-6 py-3 flex items-center justify-between text-xs text-muted-foreground">
<div>
GPU-Node Dashboard ·{" "}
<div className="flex items-center gap-2">
<span className="font-mono font-medium text-foreground">
v{DASHBOARD_VERSION}
</span>
<span>·</span>
<a
href="https://github.com/ggml-org/llama.cpp"
target="_blank"

View File

@@ -225,23 +225,21 @@ export async function startModelDownload(
const last = segments.pop() || "model.gguf";
filename = last;
// For HuggingFace URLs: /<user>/<repo>/resolve/main/<file>
// → subdir = "<user>___<repo>" (sanitized)
// → subdir = "<repo>" (just the repo name, not user___repo)
// For GitHub releases: /<user>/<repo>/releases/download/<tag>/<file>
// → subdir = "<user>___<repo>"
// → subdir = "<repo>"
const host = parsed.hostname.toLowerCase();
if (host === "huggingface.co" || host === "hf.co") {
// HF URL: /user/repo/resolve/branch/file
if (segments.length >= 2) {
const user = segments[0];
const repo = segments[1];
subdir = `${user}___${repo}`.replace(/[^\w.\-]/g, "_");
subdir = repo.replace(/[^\w.\-]/g, "_");
}
} else if (host === "github.com" && segments.includes("releases")) {
// GitHub: /user/repo/releases/download/tag/file
if (segments.length >= 2) {
const user = segments[0];
const repo = segments[1];
subdir = `${user}___${repo}`.replace(/[^\w.\-]/g, "_");
subdir = repo.replace(/[^\w.\-]/g, "_");
}
}
}

View File

@@ -0,0 +1,15 @@
/**
* Dashboard version — bump this on every PR merge.
*
* Displayed in the footer and available via /api/debug so the user can
* verify the update actually took effect.
*/
export const DASHBOARD_VERSION = "0.5.0";
/**
* Build timestamp — set at build time by Next.js.
* Falls back to "dev" when running in dev mode.
*/
export const BUILD_ID =
process.env.NEXT_PUBLIC_BUILD_ID ||
(process.env.NODE_ENV === "production" ? "prod" : "dev");