From 0ec1e4b06fee0117f84f4d746c92b35af1cdab8d Mon Sep 17 00:00:00 2001 From: arsen Date: Sun, 17 May 2026 18:56:53 +0700 Subject: [PATCH] fix(adr-116): surface WiFlow-v1 in Model Control dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LiveDemoTab.fetchModels() now probes /api/v1/info after the RVF model list; when features.pose_estimation is true (i.e. --wiflow-model was loaded), inserts a virtual 'WiFlow-v1 (lite, 186K params, --wiflow-model)' option, marks it active, and populates name + PCK 0.929 in the panel. Cosmetic only — does not change inference path or pose_keypoints flow. Closes the UX inconsistency where the badge said MODEL INFERENCE but the dropdown said 'No model loaded'. Co-Authored-By: Claude Opus 4.7 --- ui/components/LiveDemoTab.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/ui/components/LiveDemoTab.js b/ui/components/LiveDemoTab.js index 4dec767d..63977304 100644 --- a/ui/components/LiveDemoTab.js +++ b/ui/components/LiveDemoTab.js @@ -1515,6 +1515,36 @@ export class LiveDemoTab { } catch (error) { this.logger.warn('Could not fetch models', { error: error.message }); } + // ADR-116: surface WiFlow-v1 in the Model Control dropdown when the + // server reports `pose_estimation: true` via /api/v1/info. WiFlow is + // loaded outside the RVF model registry path (--wiflow-model flag), + // so listModels() above doesn't return it. This adds a virtual entry + // marked as already active. + try { + const r = await fetch('/api/v1/info'); + if (r.ok) { + const info = await r.json(); + if (info?.features?.pose_estimation) { + if (!this.modelState.models.some(m => m.id === 'wiflow-v1')) { + this.modelState.models.unshift({ + id: 'wiflow-v1', + name: 'WiFlow-v1 (lite, 186K params, --wiflow-model)', + }); + } + this.modelState.activeModelId = 'wiflow-v1'; + this.modelState.activeModelInfo = { + model_id: 'wiflow-v1', + name: 'WiFlow-v1', + version: 'lite', + pck_score: 0.929, // from model card; eval-set, not this deployment + }; + this.populateModelSelector(); + this.updateModelUI(); + } + } + } catch (e) { + this.logger.warn('ADR-116 info probe failed', { error: e.message }); + } } populateModelSelector() {