From 4ce8ffc465066971a4e714d35d76a2aff4e79911 Mon Sep 17 00:00:00 2001 From: ruv Date: Thu, 12 Mar 2026 16:16:07 -0400 Subject: [PATCH] fix: video fills available space + correct WASM path resolution - Remove fixed aspect-ratio and max-height from video panel so it fills the available viewport space without scrolling - Grid uses 1fr row for content area, overflow:hidden on main grid - Fix WASM path: resolve relative to JS module file using import.meta.url instead of hardcoded ./pkg/ which resolved incorrectly on gh-pages - Responsive: mobile still gets aspect-ratio constraint Co-Authored-By: claude-flow --- ui/pose-fusion/css/style.css | 16 +++++++++------- ui/pose-fusion/js/main.js | 6 ++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ui/pose-fusion/css/style.css b/ui/pose-fusion/css/style.css index 0cbefe19..1bf5dd89 100644 --- a/ui/pose-fusion/css/style.css +++ b/ui/pose-fusion/css/style.css @@ -129,10 +129,11 @@ body { .main-grid { display: grid; grid-template-columns: 1fr 360px; - grid-template-rows: auto auto; + grid-template-rows: 1fr auto; gap: 16px; padding: 16px 24px; - max-height: calc(100vh - 72px); + height: calc(100vh - 72px); + overflow: hidden; } /* === Video Panel === */ @@ -142,8 +143,7 @@ body { border-radius: var(--radius); border: 1px solid var(--bg-panel-border); overflow: hidden; - aspect-ratio: 4/3; - max-height: 60vh; + min-height: 0; } .video-panel video { @@ -204,7 +204,7 @@ body { flex-direction: column; gap: 12px; overflow-y: auto; - max-height: calc(100vh - 88px); + min-height: 0; } .panel { @@ -397,7 +397,9 @@ body { @media (max-width: 900px) { .main-grid { grid-template-columns: 1fr; + height: auto; + overflow: auto; } - .video-panel { aspect-ratio: 16/9; max-height: 40vh; } - .side-panels { max-height: none; } + .video-panel { aspect-ratio: 16/9; max-height: 50vh; } + .side-panels { max-height: none; overflow: visible; } } diff --git a/ui/pose-fusion/js/main.js b/ui/pose-fusion/js/main.js index f18c650f..29f283f4 100644 --- a/ui/pose-fusion/js/main.js +++ b/ui/pose-fusion/js/main.js @@ -111,8 +111,10 @@ function init() { }); // Try to load WASM embedders (non-blocking) - visualCnn.tryLoadWasm('./pkg/ruvector_cnn_wasm'); - csiCnn.tryLoadWasm('./pkg/ruvector_cnn_wasm'); + // Resolve relative to this JS module file (in pose-fusion/js/) → ../pkg/ + const wasmBase = new URL('../pkg/ruvector_cnn_wasm', import.meta.url).href; + visualCnn.tryLoadWasm(wasmBase); + csiCnn.tryLoadWasm(wasmBase); // Auto-start camera for video/dual modes updateModeUI();