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
address review: clean upload temp on spawn error, guard handleGenerate against disconnected, basename in Saved-to STATUS
Adam Eivy6bb3f2dac48d
diff --git a/client/src/pages/VideoGen.jsx b/client/src/pages/VideoGen.jsxindex 3b88fece4d..7340229341 100644--- a/client/src/pages/VideoGen.jsx+++ b/client/src/pages/VideoGen.jsx@@ -348,12 +348,17 @@ export default function VideoGen() {const handleGenerate = async (e) => {e?.preventDefault?.();- if (!prompt.trim() || generating) return;+ // Mirror the inline submit-button's disabled rules: blank prompt,+ // already generating, or backend disconnected. Without the disconnected+ // guard the user could press Enter in the prompt textarea and fire a+ // request that's guaranteed to fail (and the disabled button would+ // otherwise have prevented).+ if (!prompt.trim() || generating || (status && status.connected === false)) return;await runGeneration(buildGeneratePayload()).catch(() => {});};const handleEnqueue = () => {- if (!prompt.trim()) return;+ if (!prompt.trim() || (status && status.connected === false)) return;const payload = buildGeneratePayload();// Strip the File blob for snapshot — re-using a File across multiple// queued submissions is fine, but we need a stable JSON-ish summarydiff --git a/scripts/generate_win.py b/scripts/generate_win.pyindex 1747bce5df..73b69c295b 100644--- a/scripts/generate_win.py+++ b/scripts/generate_win.py@@ -163,7 +163,10 @@ def main():log('STATUS:Saving video...')save_video(result.frames[0], args.output, args.fps)- log(f'STATUS:Saved to {args.output}')+ # Log only the basename — STATUS lines are forwarded over SSE to the+ # browser, and emitting the absolute server path would leak filesystem+ # layout. The Node side already knows the full path from the --output arg.+ log(f'STATUS:Saved to {os.path.basename(args.output)}')log('STATUS:Done')diff --git a/server/services/videoGen/local.js b/server/services/videoGen/local.jsindex 316018f59c..c7e34ce538 100644--- a/server/services/videoGen/local.js+++ b/server/services/videoGen/local.js@@ -248,8 +248,12 @@ export async function generateVideo({ pythonPath, prompt, negativePrompt = '', mbroadcastSse(job, { type: 'error', error: reason });videoGenEvents.emit('failed', { generationId: jobId, error: reason });activeProcess = null;+ // Spawn failed, so proc.on('close') will never fire — clean up every+ // temp file we own here, including the multipart upload, otherwise+ // ENOENT/permission errors leak files in os.tmpdir().if (resizedSrcTempPath) unlink(resizedSrcTempPath).catch(() => {});if (resizedLastTempPath) unlink(resizedLastTempPath).catch(() => {});+ if (uploadedTempPath) unlink(uploadedTempPath).catch(() => {});closeJobAfterDelay(jobs, jobId);});