fix: version display in UI + simplify subdir to just <repo> (includes all from PR #14) #15
Reference in New Issue
Block a user
Delete Branch "fix/versioning-and-subdir"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
⚠️ Этот PR заменяет PR #14 — смерджи ЭТОТ, не #14
PR #14 (feat/multi-fixes) ещё не вмержен. Этот branch включает все его изменения + 2 новых фикса.
Что нового (поверх PR #14)
1. Версия в UI
Юзер reported 'ни одно изменение с дашбордом не увидел'. Добавил
DASHBOARD_VERSION = '0.5.0'— показывается в footer как v0.5.0. Также возвращается в/api/debug.После деплоя: открой дашборд → посмотри footer. Если видишь
v0.5.0— обновление прошло. Если не видишь — контейнер не пересоздался.2. Упрощение subdir
Юзер: '___ не нужно, просто достаточно'.
Изменил:
huggingface.co/user/Qwen3-VL/resolve/main/model.gguf→ subdir=Qwen3-VL(былоuser___Qwen3-VL).3. Все фиксы из PR #14
Verification
npm run build— OK, 27 routesbash dashboard/validate-build.sh— все 8 COPY источников ✓, standalone ✓После мержа
Проверь footer дашборда — должен показать
v0.5.0. Если нет — обновление не применилось.Files changed
dashboard/src/lib/version.ts— new (DASHBOARD_VERSION constant)dashboard/src/app/page.tsx— version in footer + importdashboard/src/app/api/debug/route.ts— version in responsedashboard/src/lib/downloads.ts— simplified subdir to just## Summary 8 fixes in one PR — all from user feedback: 1. **Perf tab shows nothing** — added /api/props endpoint, Overview view with avg TPS / ctx usage / multimodal / sampling defaults 2. **Comfy models list — no total size** — added total size to header 3. **gpuctl wake doesn't start dashboard** — added belt-and-suspenders check + explicit docker compose up -d dashboard fallback 4. **mmproj support (multimodal)** — new mmprojPath config field, --mmproj arg, Set mmproj button in Models tab 5. **Subdirectory support in llama_models** — listModels() recurses one level deep, ModelFile has relativePath/subdir/kind fields 6. **Auto-categorize models** — detectModelKind() tags files as base/mmproj/mtp/draft by filename, shown as colored badges 7. **Comfy download progress** — reduced queue refresh from 5s to 2s 8. **Auto-create repo subdir on download** — HF/GitHub URLs automatically create user___repo/ subdirectory ## Details ### Perf tab (1) - New /api/props endpoint proxies llama.cpp /props - New Overview view shows: avg TPS, total slots, ctx usage, multimodal, predicted/prompt token counts, model name, total ctx, sampling defaults - Slots view now shows 'No slots' instead of 'No active slots' (idle slots are still listed by /slots) - Default view changed from slots to overview - Added 'Click Live to start polling' placeholder when not active - Error display if fetch fails ### Comfy total size (2) - ComfyTab header now shows total size: 'N file(s) · X.XX GB total' ### gpuctl wake dashboard fix (3) - wake_mode() now checks if dashboard container is running after the --profile wake up -d call, and if not, runs a plain 'docker compose up -d dashboard' as fallback ### mmproj support (4) - DashboardConfig.mmprojPath (relative path like 'Qwen3-VL/mmproj-F16.gguf') - DEFAULT_CONFIG.mmprojPath = '' - buildLlamaExtraArgs: --mmproj /models/<path> when set - parseLlamaExtraArgs: parses --mmproj, strips /models/ prefix - mergeConfig: includes mmprojPath - ModelsTab: 'Set mmproj' button for files with kind='mmproj' - Active mmproj shown with badge in model list ### Subdirectory support (5) - ModelFile: added relativePath, subdir, kind fields - listModels() now walks top-level entries; if a subdirectory is found, lists .gguf files inside it (one level deep — HF repos are flat) - Sort: by subdir (groups files in same repo together), then by size desc - deleteModel() accepts relative paths like 'Qwen3-VL/model.gguf' - Path traversal protection: resolved path must stay under LLAMA_MODELS_DIR ### Auto-categorize models (6) - detectModelKind(filename) checks lowercase filename: - 'mmproj' in name → 'mmproj' - 'mtp' in name → 'mtp' - 'draft' in name → 'draft' - otherwise → 'base' - Models tab shows colored Kind badge per file - Action buttons are context-aware: - base: 'Use' (sets config.model) - mmproj: 'Set mmproj' (sets config.mmprojPath) - mtp/draft: 'Set draft' (sets config.draftModel) ### Comfy download progress (7) - Queue refresh interval reduced from 5000ms to 2000ms for more responsive progress display ### Auto-create repo subdir on download (8) - startModelDownload() now detects HF and GitHub URLs and extracts user/repo to create a subdirectory: - huggingface.co/<user>/<repo>/resolve/<branch>/<file> → subdir = '<user>___<repo>' - github.com/<user>/<repo>/releases/download/<tag>/<file> → subdir = '<user>___<repo>' - Other URLs: no subdir (flat layout) - The subdirectory is created on the fly before starting curl - File is saved as <LLAMA_MODELS_DIR>/<subdir>/<filename> - Job.filename shows the full relative path (e.g. 'user___repo/model.gguf') ## Verification - npm run build — OK, 27 routes (1 new /api/props) - bash dashboard/validate-build.sh — all 8 COPY sources ✓ ## After deploy ```sh git pull && sh build.sh docker compose up -d --force-recreate dashboard ``` Test: - Download a HF model → it lands in user___repo/ subdir - Models tab shows files grouped by subdir with kind badges - Click 'Set mmproj' on an mmproj file → --mmproj added to launch args - Start Llama → check Perf tab → Overview shows TPS / ctx / multimodal - gpuctl sleep → gpuctl wake → dashboard should come back up