fix: version display in UI + simplify subdir to just <repo> (includes all from PR #14) #15

Merged
mikan merged 1 commits from fix/versioning-and-subdir into master 2026-10-28 19:38:28 +00:00
Collaborator

⚠️ Этот 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 — обновление прошло. Если не видишь — контейнер не пересоздался.

curl http://gpu-node-win:8090/api/debug | jq .version

2. Упрощение subdir

Юзер: '___ не нужно, просто достаточно'.

Изменил: huggingface.co/user/Qwen3-VL/resolve/main/model.gguf → subdir=Qwen3-VL (было user___Qwen3-VL).

3. Все фиксы из PR #14

  • Perf tab — Overview view с /api/props
  • Comfy models — total size
  • gpuctl wake — dashboard fallback
  • mmproj support (multimodal)
  • Subdirectory support in llama_models
  • Auto-categorize: base/mmproj/mtp/draft
  • Comfy download progress 2s refresh
  • Auto-create repo subdir on download

Verification

  • npm run build — OK, 27 routes
  • bash dashboard/validate-build.sh — все 8 COPY источников ✓, standalone ✓

После мержа

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

Проверь footer дашборда — должен показать v0.5.0. Если нет — обновление не применилось.

curl http://gpu-node-win:8090/api/debug | jq '.version, .envValidation'

Files changed

  • dashboard/src/lib/version.ts — new (DASHBOARD_VERSION constant)
  • dashboard/src/app/page.tsx — version in footer + import
  • dashboard/src/app/api/debug/route.ts — version in response
  • dashboard/src/lib/downloads.ts — simplified subdir to just
  • Plus all changes from PR #14 (merged into this branch)
## ⚠️ Этот 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` — обновление прошло. Если не видишь — контейнер не пересоздался. ```sh curl http://gpu-node-win:8090/api/debug | jq .version ``` ### 2. Упрощение subdir Юзер: '<user>___<repo> не нужно, просто <repo> достаточно'. Изменил: `huggingface.co/user/Qwen3-VL/resolve/main/model.gguf` → subdir=`Qwen3-VL` (было `user___Qwen3-VL`). ### 3. Все фиксы из PR #14 - Perf tab — Overview view с /api/props - Comfy models — total size - gpuctl wake — dashboard fallback - mmproj support (multimodal) - Subdirectory support in llama_models - Auto-categorize: base/mmproj/mtp/draft - Comfy download progress 2s refresh - Auto-create repo subdir on download ## Verification - `npm run build` — OK, 27 routes - `bash dashboard/validate-build.sh` — все 8 COPY источников ✓, standalone ✓ ## После мержа ```sh git pull && sh build.sh docker compose up -d --force-recreate dashboard model-worker ``` **Проверь footer дашборда** — должен показать `v0.5.0`. Если нет — обновление не применилось. ```sh curl http://gpu-node-win:8090/api/debug | jq '.version, .envValidation' ``` ## Files changed - `dashboard/src/lib/version.ts` — new (DASHBOARD_VERSION constant) - `dashboard/src/app/page.tsx` — version in footer + import - `dashboard/src/app/api/debug/route.ts` — version in response - `dashboard/src/lib/downloads.ts` — simplified subdir to just <repo> - Plus all changes from PR #14 (merged into this branch)
super-z-bot added 2 commits 2026-10-28 19:35:11 +00:00
## 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
## 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.
mikan merged commit 35730871bf into master 2026-10-28 19:38:28 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mikan/GPU-Node#15