ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.
Python ai-agentsamdcomfyuidockerllama-cppllmlocal-ain8nnvidiaopen-webuiragself-hostedspeech-to-textstrix-halotext-to-speechworkflow-automation
fix(dashboard): no placeholder text on a healthy overview or Extensions page (#8184)
Mike Bradley709559251e43
diff --git a/ods/extensions/services/dashboard-api/main.py b/ods/extensions/services/dashboard-api/main.pyindex f6bc52aeb..9fd7f3a0a 100644--- a/ods/extensions/services/dashboard-api/main.py+++ b/ods/extensions/services/dashboard-api/main.py@@ -1522,7 +1522,7 @@ async def api_status(api_key: str = Depends(verify_api_key)):"throughputSampledAt": last_inference.get("throughput_sampled_at"),"throughputModel": last_inference.get("throughput_model"),"inferenceActive": None,- "loadedModel": None, "contextSize": None},+ "loadedModel": None, "loadedModelDisplayName": None, "contextSize": None},"manifest_errors": _public_manifest_errors(),}env_file_read_error = get_env_file_read_error()@@ -1692,6 +1692,11 @@ async def _build_api_status() -> dict:}loaded_model_name = None if remote_runtime or cloud_mode else loaded_model or (model_data["name"] if model_data else None)+ # The served id is a file name; the dashboard shows the Models page's name.+ loaded_model_display_name = (+ await asyncio.to_thread(models_router.loaded_model_display_name, loaded_model_name)+ if loaded_model_name else None+ )current_model_name = remote_runtime["model"] if remote_runtime else loaded_model_nameconfigured_model_name = model_data["configuredModel"] if model_data else model_info.name if model_info else None@@ -1717,6 +1722,7 @@ async def _build_api_status() -> dict:"throughputModel": llama_metrics_data.get("throughput_model"),"inferenceActive": llama_metrics_data.get("inference_active"),"loadedModel": loaded_model_name,+ "loadedModelDisplayName": loaded_model_display_name,"contextSize": context_size or (model_data["contextLength"] if model_data else None),},"manifest_errors": _public_manifest_errors(),diff --git a/ods/extensions/services/dashboard-api/routers/models.py b/ods/extensions/services/dashboard-api/routers/models.pyindex 60ab54c6e..b45409761 100644--- a/ods/extensions/services/dashboard-api/routers/models.py+++ b/ods/extensions/services/dashboard-api/routers/models.py@@ -64,6 +64,7 @@ from performance_oracle import (find_catalog_model,load_model_catalog,model_files_dir as model_files_dir,+ normalize_catalog_entry,planned_model_context,read_env_file_value,read_env_value,@@ -2587,6 +2588,20 @@ def _find_normalized_model(model_id: str) -> Optional[dict]:return find_catalog_model(load_model_catalog(INSTALL_DIR), model_id, None)+def loaded_model_display_name(loaded_model: str | None) -> str | None:+ """The name the Models page shows for the model a runtime serves.++ A runtime serves the model file name as its id (llama-server --alias), so+ a status reader would show a file name. The first catalog entry matching+ it is the one the Models page shows as loaded; None when none matches.+ """+ if not loaded_model:+ return None+ catalog = [entry for entry in map(normalize_catalog_entry, _load_library()) if entry is not None]+ entry = find_catalog_model(catalog, loaded_model, loaded_model)+ return entry["name"] if entry else None++def _external_api_host(url: str) -> str | None:"""The host (and port) of the API URL, without anything else."""try:diff --git a/ods/extensions/services/dashboard-api/tests/test_main.py b/ods/extensions/services/dashboard-api/tests/test_main.pyindex f7ea4dda6..bed99c7d3 100644--- a/ods/extensions/services/dashboard-api/tests/test_main.py+++ b/ods/extensions/services/dashboard-api/tests/test_main.py@@ -300,6 +300,44 @@ class TestBuildApiStatus:assert result["model"]["contextLength"] == 20480assert result["inference"]["contextSize"] == 20480+ @pytest.mark.asyncio+ @pytest.mark.parametrize("served,display_name", [+ ("Qwen3.8-27B-UD-IQ4_XS.gguf", "Qwen 3.8 27B"),+ ("community-Q4_K_M.gguf", "community-model · Q4_K_M"),+ ("Uncatalogued-12B-NVFP4-6c01ac37.pack", None),+ ], ids=["catalog", "hub-import", "uncatalogued"])+ async def test_names_the_served_model_as_the_models_page_does(self, monkeypatch, tmp_path, served, display_name):+ import routers.models as models_router+ from models import BootstrapStatus, ModelInfo++ # The runtime serves the file name; the Models page shows the catalog name.+ library = tmp_path / "model-library.json"+ library.write_text(json.dumps({"models": [+ {"id": "qwen3.8-27b-iq4-xs", "name": "Qwen 3.8 27B", "gguf_file": "Qwen3.8-27B-UD-IQ4_XS.gguf"},+ ]}), encoding="utf-8")+ (tmp_path / "model-imports.json").write_text(json.dumps({"models": [+ {"id": "hf-community", "name": "community-model · Q4_K_M", "gguf_file": "community-Q4_K_M.gguf",+ "source": "huggingface"},+ ]}), encoding="utf-8")+ monkeypatch.setattr(models_router, "_LIBRARY_PATH", library)+ monkeypatch.setattr(models_router, "DATA_DIR", str(tmp_path))+ monkeypatch.setattr("main.get_gpu_info", lambda: None)+ monkeypatch.setattr("main.get_all_services", AsyncMock(return_value=[]))+ monkeypatch.setattr("main.get_model_info", lambda: ModelInfo(name="qwen3.8-27b-iq4-xs", size_gb=14.0, context_length=65536))+ monkeypatch.setattr("main.get_bootstrap_status", lambda: BootstrapStatus(active=False))+ monkeypatch.setattr("main.get_loaded_model", AsyncMock(return_value=served))+ monkeypatch.setattr("main.get_llama_metrics", AsyncMock(return_value={"tokens_per_second": 0, "lifetime_tokens": 0}))+ monkeypatch.setattr("main.get_llama_context_size", AsyncMock(return_value=65536))+ monkeypatch.setattr("main.get_uptime", lambda: 0)+ monkeypatch.setattr("main.get_cpu_metrics", lambda: {"percent": 0, "temp_c": None})+ monkeypatch.setattr("main.get_ram_metrics", lambda: {"used_gb": 0, "total_gb": 0, "percent": 0})++ result = await _build_api_status()++ # Identity stays the served id; only the display name is added.+ assert result["loadedModel"] == result["inference"]["loadedModel"] == served+ assert result["inference"]["loadedModelDisplayName"] == display_name+def test_detected_gpu_count_overrides_stale_compose_default(self, monkeypatch):from main import _serialize_gpufrom models import GPUInfodiff --git a/ods/extensions/services/dashboard/src/pages/Dashboard.jsx b/ods/extensions/services/dashboard/src/pages/Dashboard.jsxindex 0afc13d37..789441ccb 100644--- a/ods/extensions/services/dashboard/src/pages/Dashboard.jsx+++ b/ods/extensions/services/dashboard/src/pages/Dashboard.jsx@@ -660,6 +660,16 @@ function metricScopeLabel(scope) {return {host:'Host',wsl:'WSL',vm:'Virtual machine',container:'Container',unknown:'Scope unavailable'}[scope] || ''}+// A runtime serves its model file name as the model id, sometimes with a+// content hash. The API adds the name the Models page shows; without one,+// show the id without its folder, file extension, shard number or hash.+function loadedModelName(inference) {+ if (inference?.loadedModelDisplayName) return inference.loadedModelDisplayName+ const id = String(inference?.loadedModel || '').trim().split(/[\\/]/).pop()+ return id.replace(/\.[a-z][a-z\d]{1,11}$/i, '').replace(/-\d{5}-of-\d{5}$/i, '')+ .replace(/[-_.](?=[a-f\d]*[a-f])(?=[a-f\d]*\d)[a-f\d]{8,64}$/i, '') || id+}+function TelemetryNotice({telemetry}) {if (!telemetry?.stale) return nullconst sampledAt = Number.isFinite(telemetry.sampledAt) ? new Date(telemetry.sampledAt) : null@@ -854,12 +864,16 @@ export default function Dashboard({ status, loading, compact = false }) {})}- systemMetrics.push({- icon: Thermometer,- label: remoteInference ? 'Client CPU Temp' : 'CPU Temp',- value: Number.isFinite(status?.cpu?.temp_c) ? `${status.cpu.temp_c}°C` : '—',- subvalue: Number.isFinite(status?.cpu?.temp_c) ? 'sensor reading' : 'telemetry unavailable',- })+ // Windows and macOS host readings never include a CPU temperature, so the+ // tile appears only with a reading instead of always saying unavailable.+ if (Number.isFinite(status?.cpu?.temp_c)) {+ systemMetrics.push({+ icon: Thermometer,+ label: remoteInference ? 'Client CPU Temp' : 'CPU Temp',+ value: `${status.cpu.temp_c}°C`,+ subvalue: 'sensor reading',+ })+ }if (status?.ram && (remoteInference || status?.gpu?.memoryType !== 'unified')) {systemMetrics.push({@@ -914,7 +928,7 @@ export default function Dashboard({ status, loading, compact = false }) {{icon: Brain,label: 'Model',- value: (remoteInference ? status?.currentModel : status?.inference?.loadedModel) || '—',+ value: (remoteInference ? status?.currentModel : loadedModelName(status?.inference)) || '—',subvalue: remoteInference ? (status?.currentModel ? 'selected API model' : 'not reported') : 'loaded',})diff --git a/ods/extensions/services/dashboard/src/pages/Dashboard.test.jsx b/ods/extensions/services/dashboard/src/pages/Dashboard.test.jsxindex 66f4a65eb..b891e1d46 100644--- a/ods/extensions/services/dashboard/src/pages/Dashboard.test.jsx+++ b/ods/extensions/services/dashboard/src/pages/Dashboard.test.jsx@@ -289,15 +289,50 @@ describe('Dashboard system overview', () => {expect(history[0]).toMatchObject({model:'new-owner',tokensPerSecond:24.8})})- it.each([[73,'73°C'],[0,'0°C'],[null,'—'],[undefined,'—']])('shows CPU thermal reading %s without substituting GPU or system temperature', async (temp_c,expected) => {+ it.each([[73,'73°C'],[0,'0°C']])('shows CPU thermal reading %s without substituting GPU or system temperature', async (temp_c,expected) => {render(<Dashboard compact status={{...baseStatus,cpu:{percent:38,temp_c},gpu:{name:'GPU',temperature:55,memoryType:'discrete'}}} loading={false}/>)const thermal=screen.getByText('CPU Temp').closest('.dashboard-metric-row')expect(within(thermal).getByText(expected)).toBeVisible()- expect(within(thermal).getByText(temp_c == null ? 'telemetry unavailable' : 'sensor reading')).toBeVisible()+ expect(within(thermal).getByText('sensor reading')).toBeVisible()expect(within(thermal).queryByText('55°C')).toBeNull()await waitFor(()=>expect(fetch).toHaveBeenCalledWith('/api/features'))})+ it.each([null,undefined])('leaves out CPU Temp when the platform reports no CPU temperature (%s) and keeps the GPU and RAM readings', async temp_c => {+ // Windows host readings carry CPU use but never a CPU temperature.+ render(<Dashboard compact status={{...baseStatus,+ cpu:{percent:12,temp_c,scope:'host',source:'windows-cim'},+ ram:{used_gb:21.4,total_gb:128,percent:17,scope:'host'},+ gpu:{name:'NVIDIA GeForce RTX 4090',memoryType:'discrete',utilization:3,vramUsed:10,vramTotal:24,temperature:41,powerDraw:4}}} loading={false}/>)+ expect(screen.queryByText('CPU Temp')).toBeNull()+ expect(screen.queryByText('telemetry unavailable')).toBeNull()+ expect(within(screen.getByText('CPU').closest('.dashboard-metric-row')).getByText('12%')).toBeVisible()+ const gpuTemp=screen.getByText('GPU Temp').closest('.dashboard-metric-row')+ expect(within(gpuTemp).getByText('41°C')).toBeVisible()+ expect(within(gpuTemp).getByText('normal')).toBeVisible()+ const power=screen.getByText('GPU Power').closest('.dashboard-metric-row')+ expect(within(power).getByText('4W')).toBeVisible()+ expect(within(power).getByText('live')).toBeVisible()+ expect(within(screen.getByText('RAM').closest('.dashboard-metric-row')).getByText('21.4 GB')).toBeVisible()+ await waitFor(()=>expect(fetch).toHaveBeenCalledWith('/api/features'))+ })++ it.each([+ [{loadedModel:'Qwen3.8-27B-UD-IQ4_XS.gguf',loadedModelDisplayName:'Qwen 3.8 27B'},'Qwen 3.8 27B'],+ [{loadedModel:'Example-Chat-12B-NVFP4-6c01ac37.pack'},'Example-Chat-12B-NVFP4'],+ [{loadedModel:'/models/Example-Chat-12B-Q4_K_M-00001-of-00003.gguf'},'Example-Chat-12B-Q4_K_M'],+ [{loadedModel:'Qwen2.5-1.5B'},'Qwen2.5-1.5B'],+ [{loadedModel:'example-chat-20250131'},'example-chat-20250131'],+ [{loadedModel:null},'—'],+ ])('names the loaded model %j by its display name, never its file name', async (inference,expected) => {+ render(<Dashboard compact status={{...baseStatus,inference:{...baseStatus.inference,...inference}}} loading={false}/>)+ const model=screen.getByText('Model').closest('.dashboard-metric-row')+ expect(within(model).getByText(expected)).toBeVisible()+ expect(within(model).getByText('loaded')).toBeVisible()+ if(inference.loadedModel && inference.loadedModel !== expected) expect(within(model).queryByText(inference.loadedModel)).toBeNull()+ await waitFor(()=>expect(fetch).toHaveBeenCalledWith('/api/features'))+ })+it('uses theme-responsive surfaces instead of fixed dark dashboard panels', async () => {await renderDashboard()diff --git a/ods/extensions/services/dashboard/src/pages/Extensions.jsx b/ods/extensions/services/dashboard/src/pages/Extensions.jsxindex 3c7256da3..de0621038 100644--- a/ods/extensions/services/dashboard/src/pages/Extensions.jsx+++ b/ods/extensions/services/dashboard/src/pages/Extensions.jsx@@ -1244,10 +1244,11 @@ function ExtensionCard({ ext, hermesProxy, gpuBackend, agentAvailable, onDetailsif (opensWithOdsSession(launchService.id)) openWithFreshSession(e)}}className="flex items-center gap-1 px-2 py-1.5 text-[10px] font-mono text-theme-text-secondary hover:text-theme-text hover:bg-theme-surface-hover/40 rounded-lg transition-colors"- title={launchPort ? "Open on port " + launchPort : "Open service"}+ aria-label={`Open ${ext.name}`}+ title={launchPort ? `Open ${ext.name} on port ${launchPort}` : `Open ${ext.name}`}><ExternalLink size={11} />- {launchPort ? ":" + launchPort : "Open service"}+ Open</a>)) : null}diff --git a/ods/extensions/services/dashboard/src/pages/Extensions.test.jsx b/ods/extensions/services/dashboard/src/pages/Extensions.test.jsxindex 89e5e3e23..a95374a1d 100644--- a/ods/extensions/services/dashboard/src/pages/Extensions.test.jsx+++ b/ods/extensions/services/dashboard/src/pages/Extensions.test.jsx@@ -63,9 +63,14 @@ it.each([false, true])('shows LiteLLM as an API service without an unsupported Aexpect(gateway.queryByRole('link')).toBeNull()expect(gateway.getByRole('button', { name: 'Logs' })).toBeEnabled()- // Actual web applications retain their published launch port.+ // Actual web applications open on their published launch port. The link+ // says Open; the port is only in its tooltip.const webApp = within(screen.getByText('IT-Tools').closest('article'))- expect(webApp.getByRole('link', { name: ':8089' })).toHaveAttribute('href', 'http://localhost:8089')+ const launch = webApp.getByRole('link', { name: 'Open IT-Tools' })+ expect(launch).toHaveAttribute('href', 'http://localhost:8089')+ expect(launch).toHaveTextContent(/^Open$/)+ expect(launch).toHaveAttribute('title', 'Open IT-Tools on port 8089')+ expect(webApp.queryByText(':8089')).toBeNull()expect(webApp.getByRole('button', { name: 'Logs' })).toBeEnabled()fireEvent.click(gateway.getByRole('button', { name: 'Details for LiteLLM (API Gateway)' }))@@ -1031,8 +1036,10 @@ it('opens enabled Hermes through its ODS authenticated proxy entry', async () =>],summary:baseSummary({total:2,installed:2})})render(<Extensions compact />)const agentCard = (await screen.findByRole('heading',{name:'Hermes Agent'})).closest('article')- expect(within(agentCard).getByRole('link',{name:':9120'})).toHaveAttribute(- 'href','http://localhost:9120/auth/ods')+ const launch = within(agentCard).getByRole('link',{name:'Open Hermes Agent'})+ expect(launch).toHaveAttribute('href','http://localhost:9120/auth/ods')+ expect(launch).toHaveTextContent(/^Open$/)+ expect(launch).toHaveAttribute('title','Open Hermes Agent on port 9120')})it('re-checks the ODS session before opening Hermes from its card', async () => {@@ -1052,7 +1059,7 @@ it('re-checks the ODS session before opening Hermes from its card', async () =>vi.spyOn(window, 'open').mockReturnValue(tab)render(<Extensions compact />)const agentCard = (await screen.findByRole('heading',{name:'Hermes Agent'})).closest('article')- expect(fireEvent.click(within(agentCard).getByRole('link',{name:':9120'}))).toBe(false)+ expect(fireEvent.click(within(agentCard).getByRole('link',{name:'Open Hermes Agent'}))).toBe(false)expect(window.open).toHaveBeenCalledWith('', '_blank')await waitFor(() => expect(tab.location.replace).toHaveBeenCalledWith('http://localhost:9120/auth/ods'))expect(fetchMock).toHaveBeenCalledWith('/api/auth/admin-session', expect.objectContaining({method:'POST'}))diff --git a/ods/extensions/services/dashboard/src/pages/Extensions.webuiReady.test.jsx b/ods/extensions/services/dashboard/src/pages/Extensions.webuiReady.test.jsxindex ca9380cc2..55cfa28be 100644--- a/ods/extensions/services/dashboard/src/pages/Extensions.webuiReady.test.jsx+++ b/ods/extensions/services/dashboard/src/pages/Extensions.webuiReady.test.jsx@@ -54,16 +54,16 @@ afterEach(() => {it.each(['prepared', 'idle'])('shows the launch link after cached health catches up with %s image progress', async progressStatus => {const { state, fetchMock } = await show({ progressStatus })expect(screen.queryByRole('button', { name: 'Add Open WebUI' })).toBeNull()- expect(screen.queryByRole('link', { name: ':3000' })).toBeNull()+ expect(screen.queryByRole('link', { name: 'Open Open WebUI' })).toBeNull()fireEvent.click(screen.getByRole('button', { name: 'Details for Open WebUI' }))expect(within(screen.getByRole('dialog')).getByText('disabled')).toBeVisible()await tick()- expect(screen.queryByRole('link', { name: ':3000' })).toBeNull()+ expect(screen.queryByRole('link', { name: 'Open Open WebUI' })).toBeNull()state.health = 'enabled'await tick()- expect(screen.getByRole('link', { name: ':3000' })).toHaveAttribute('href', 'http://localhost:3000')+ expect(screen.getByRole('link', { name: 'Open Open WebUI' })).toHaveAttribute('href', 'http://localhost:3000')expect(within(screen.getByRole('dialog')).getByText('enabled')).toBeVisible()expect(screen.getByText('Extension installed and started.')).toBeVisible()const completedCount = requestCount(fetchMock, '/api/extensions/catalog')@@ -79,7 +79,7 @@ it('does not report ready while the selected container is unhealthy', async () =await tick()expect(screen.getByText('Open WebUI selected. Waiting for its service to become ready.')).toBeVisible()expect(screen.queryByText('Extension installed and started.')).toBeNull()- expect(screen.queryByRole('link', { name: ':3000' })).toBeNull()+ expect(screen.queryByRole('link', { name: 'Open Open WebUI' })).toBeNull()expect(requestCount(fetchMock, '/api/webui/selection', 'POST')).toBe(1)})@@ -89,7 +89,7 @@ it('surfaces a terminal startup error and stops polling without another Add requstate.progress = { status: 'error', error: 'Open WebUI startup failed' }await tick()expect(screen.getAllByText(/Open WebUI startup failed/).length).toBeGreaterThan(0)- expect(screen.queryByRole('link', { name: ':3000' })).toBeNull()+ expect(screen.queryByRole('link', { name: 'Open Open WebUI' })).toBeNull()const completedCount = requestCount(fetchMock, '/api/extensions/open-webui/progress')await tick()expect(requestCount(fetchMock, '/api/extensions/open-webui/progress')).toBe(completedCount)