From 9e4db5d6ccd9243cf1ca1540fe657182ee5da1d4 Mon Sep 17 00:00:00 2001 From: "[._.]/ Adam Eivy" <70015+atomantic@users.noreply.github.com> Date: Wed, 2 Sep 2026 07:33:12 +0000 Subject: [PATCH 1/2] Show a loading Model picker on Video Gen and cache the status payload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The model list arrives with GET /api/video-gen/status, which shells out to python and rebuilds the hardware-aware list on every call. The Model field was hidden until that landed, so it popped into the middle of the form a second or two after the page rendered. Keep the field and its label in place with a disabled "Loading models…" placeholder (new `loading` prop on the shared ModelSelect), and cache the last status payload in sessionStorage so a revisit paints the real list immediately while the probe revalidates behind it. The cached copy is read back marked stale and feeds only the model list and the model-shaping numbers — python health, the connectivity pill, and the install banner all keep waiting for the live probe. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Fvz529qeJWUxgJQ1kg5bHT --- client/src/components/ModelSelect.jsx | 24 ++ client/src/lib/README.md | 1 + client/src/lib/index.js | 1 + client/src/lib/videoGenStatusCache.js | 42 ++++ client/src/pages/VideoGen.jsx | 27 ++- .../src/pages/VideoGen.modelLoading.test.jsx | 225 ++++++++++++++++++ 6 files changed, 314 insertions(+), 6 deletions(-) create mode 100644 client/src/lib/videoGenStatusCache.js create mode 100644 client/src/pages/VideoGen.modelLoading.test.jsx diff --git a/client/src/components/ModelSelect.jsx b/client/src/components/ModelSelect.jsx index 2948f7d510..a88aa48e90 100644 --- a/client/src/components/ModelSelect.jsx +++ b/client/src/components/ModelSelect.jsx @@ -9,6 +9,12 @@ // it for "optional model / fall back to the server default" pickers (mirrors // ProviderModelSelector's `emptyModelOption`). `ariaLabel` / `title` let an // inline picker with no visible