Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: keep video repair labels readable with missing metadata (#6681)
[._.]/ Adam Eivyd3aacae6752e
diff --git a/client/src/components/videoGen/ModelRepairBanner.jsx b/client/src/components/videoGen/ModelRepairBanner.jsxindex f158b1f0d2..4f6db8475c 100644--- a/client/src/components/videoGen/ModelRepairBanner.jsx+++ b/client/src/components/videoGen/ModelRepairBanner.jsx@@ -8,7 +8,7 @@ import { AlertTriangle, RefreshCw } from 'lucide-react';// button label/disabled/spinner state come from the caller.export default function ModelRepairBanner({ message, repairLabel, onRepair, onDismiss, disabled, repairing, disabledReasonId }) {return (- <div className="rounded-lg border border-port-error/40 bg-port-error/10 px-3 py-3 text-xs text-port-error flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">+ <div role="group" aria-label={repairLabel} className="rounded-lg border border-port-error/40 bg-port-error/10 px-3 py-3 text-xs text-port-error flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2"><div className="flex items-start gap-2"><AlertTriangle className="w-4 h-4 shrink-0 mt-0.5" /><div>{message}</div>diff --git a/client/src/pages/VideoGen.jsx b/client/src/pages/VideoGen.jsxindex 55bf125347..cb20a368b5 100644--- a/client/src/pages/VideoGen.jsx+++ b/client/src/pages/VideoGen.jsx@@ -798,13 +798,13 @@ export default function VideoGen() {{key: 'shared-encoder', id: TEXT_ENCODER_DOWNLOAD_ID, label: 'shared text encoder',applies: usesSharedTextEncoder, status: textEncoderStatus, keyPrefix: 'text-encoder',- name: `The shared text encoder (${textEncoderStatus?.repo})`, repairLabel: 'Repair encoder',+ name: `The shared text encoder${textEncoderStatus?.repo ? ` (${textEncoderStatus.repo})` : ''}`, repairLabel: 'Repair encoder',},{key: 'encoder-option', id: textEncoderOptionDownloadId,label: `${selectedTextEncoder?.label || 'selected'} text encoder`,applies: !!textEncoderOptionDownloadId, status: textEncoderOptionStatus, keyPrefix: textEncoderOptionDownloadId,- name: `The ${selectedTextEncoder?.label} text encoder`, repairLabel: 'Repair text encoder',+ name: `The ${selectedTextEncoder?.label || 'selected'} text encoder`, repairLabel: 'Repair text encoder',},{key: 'ic-lora', id: icSpec?.mode, label: `${icSpec?.label || 'IC-LoRA'} weight`,@@ -1739,7 +1739,7 @@ export default function VideoGen() {className="flex items-center gap-2 px-4 py-2 border border-port-border text-gray-200 hover:text-white hover:bg-port-border/40 disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium rounded-lg min-h-[40px]"title={canEnqueue ? 'Submit this configuration to its server queue; local, Grok, and remote lanes run independently': blockedAsset ? `Download the ${blockedAsset.label} before queueing`- : 'Complete the required inputs before queueing'}+ : 'Complete the required inputs before queueing'}><ListPlus className="w-4 h-4" /> {effectiveBatchSize > 1 ? `Add ${effectiveBatchSize} videos to queue` : 'Add to queue'}</button>diff --git a/client/src/pages/VideoGen.weightIntegrity.test.jsx b/client/src/pages/VideoGen.weightIntegrity.test.jsxindex 4921e7bddc..38df1e02cb 100644--- a/client/src/pages/VideoGen.weightIntegrity.test.jsx+++ b/client/src/pages/VideoGen.weightIntegrity.test.jsx@@ -51,8 +51,8 @@ describe('VideoGen downloadable asset integrity', () => {it.each(ASSETS)('isolates $repair dismissal and re-shows changed damage', async (asset) => {for (const entry of ASSETS) setStatus(entry.id, bad(['one.safetensors', 'two.safetensors']));await mountAssets();- const repair = await screen.findByRole('button', { name: asset.repair, exact: true });- const banner = repair.parentElement.parentElement;+ await screen.findByRole('button', { name: asset.repair, exact: true });+ const banner = screen.getByRole('group', { name: asset.repair, exact: true });expect(banner).toHaveTextContent('2 damaged');fireEvent.click(within(banner).getByRole('button', { name: 'Dismiss' }));expect(screen.queryByRole('button', { name: asset.repair, exact: true })).toBeNull();@@ -65,11 +65,46 @@ describe('VideoGen downloadable asset integrity', () => {setStatus(asset.id, bad(['changed.safetensors']));refreshRender();const changedRepair = await screen.findByRole('button', { name: asset.repair, exact: true });- expect(changedRepair.parentElement.parentElement).toHaveTextContent('1 damaged');+ expect(screen.getByRole('group', { name: asset.repair, exact: true })).toHaveTextContent('1 damaged');fireEvent.click(changedRepair);expect(state.repair).toHaveBeenCalledWith(asset.id);});+ it('suppresses repair banners during downloads without dismissing the damage', async () => {+ for (const asset of ASSETS) setStatus(asset.id, bad(['one.safetensors']));+ await mountAssets();+ state.modelDownloading = true;+ refreshRender();+ expect(screen.queryByRole('button', { name: /^Repair/ })).toBeNull();+ state.modelDownloading = false;+ refreshRender();+ expect(screen.getAllByRole('button', { name: /^Repair/ })).toHaveLength(4);+ });++ it('keeps the same download priority for Generate and Add to queue', async () => {+ for (const asset of ASSETS) setStatus(asset.id, { cached: false });+ await mountAssets();+ for (const asset of ASSETS) {+ expect(generate()).toHaveAttribute('title', `Download the ${asset.label} before generating`);+ expect(enqueue()).toHaveAttribute('title', `Download the ${asset.label} before queueing`);+ setStatus(asset.id, ready());+ refreshRender();+ }+ });++ it('bypasses local download gates on Grok while keeping local repair available', async () => {+ state.settings = { imageGen: { grok: { enabled: true } } };+ for (const asset of ASSETS) setStatus(asset.id, { cached: false });+ setStatus('__text_encoder__', { ...bad(['one.safetensors']), cached: false, repo: undefined });+ await renderVideoGenPage();+ refreshRender();+ fireEvent.click(await screen.findByRole('button', { name: 'Grok', exact: true }));+ await waitFor(() => expect(generate()).toBeEnabled());+ const banner = screen.getByRole('group', { name: 'Repair encoder', exact: true });+ expect(banner).toHaveTextContent('shared text encoder');+ expect(banner).not.toHaveTextContent('undefined');+ });+it.each(ASSETS)('names missing $label before generating', async (asset) => {setStatus(asset.id, { cached: false });await mountAssets();diff --git a/client/src/test/videoGenPageMocks.jsx b/client/src/test/videoGenPageMocks.jsxindex f47c131fac..0c7797eaf8 100644--- a/client/src/test/videoGenPageMocks.jsx+++ b/client/src/test/videoGenPageMocks.jsx@@ -55,6 +55,7 @@ export const state = {modelStatuses: {},/** `useModelDownloadStatus().extra` — carries the SHARED text encoder's cache status. */modelDownloadExtra: {},+ modelDownloading: false,/** Override to answer ids the map cannot (e.g. the `__text_encoder_option__:` prefix). */getModelStatus: (id) => state.modelStatuses[id] ?? null,start: vi.fn(),@@ -101,6 +102,7 @@ export function resetVideoGenMockState() {state.activeJob = null;state.modelStatuses = {};state.modelDownloadExtra = {};+ state.modelDownloading = false;state.getModelStatus = (id) => state.modelStatuses[id] ?? null;state.queuedModelId = null;state.runtimeInstallComplete = null;@@ -208,7 +210,7 @@ vi.mock('../hooks/useModelDownloadStatus', async (importOriginal) => ({activeModelId: null,progress: null,lastError: null,- downloading: false,+ downloading: state.modelDownloading,repairing: false,getStatus: (id) => state.getModelStatus(id),start: state.start,