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
feat: prefill video gen prompts when sending image to video
Adam Eivyfa3dbd38e421
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdnew file mode 100644index 0000000000..e40420e205--- /dev/null+++ b/.changelog/NEXT.md@@ -0,0 +1,5 @@+# Next Release++## Changed++- **Send to Video carries the source image's prompts.** Clicking "Send to Video" on an Image Gen result, gallery card, or lightbox — or the same action from Media History — now pre-populates the Video Gen prompt and negative prompt from the source image's metadata. Previously only the source image filename was passed, leaving the user to retype or paste the prompt to keep the same scene direction. The flow piggybacks on the existing `?sourceImageFile=` query-param hand-off: `?prompt=` and `?negativePrompt=` are added when the source has them, and `VideoGen.jsx` reads both on first render and re-syncs on subsequent navigations (mirroring the existing source-image effect). Files: `client/src/pages/ImageGen.jsx`, `client/src/pages/MediaHistory.jsx`, `client/src/pages/VideoGen.jsx`.diff --git a/client/src/pages/ImageGen.jsx b/client/src/pages/ImageGen.jsxindex 11676fbbf9..db98c2fcea 100644--- a/client/src/pages/ImageGen.jsx+++ b/client/src/pages/ImageGen.jsx@@ -256,8 +256,14 @@ export default function ImageGen() {setGallery((g) => g.filter((img) => img.filename !== filename));};- const sendToVideo = (filename) => {- navigate(`/video-gen?sourceImageFile=${encodeURIComponent(filename)}`);+ const sendToVideo = (img) => {+ if (!img?.filename) return;+ const params = new URLSearchParams({ sourceImageFile: img.filename });+ const srcPrompt = img.prompt || img.metadata?.prompt;+ const srcNegative = img.negativePrompt || img.negative_prompt || img.metadata?.negativePrompt;+ if (srcPrompt) params.set('prompt', srcPrompt);+ if (srcNegative) params.set('negativePrompt', srcNegative);+ navigate(`/media/video?${params}`);};const handleRemix = (img) => {@@ -575,7 +581,7 @@ export default function ImageGen() {{result.seed != null && <span>seed {result.seed}</span>}<buttontype="button"- onClick={() => sendToVideo(result.filename)}+ onClick={() => sendToVideo(result)}className="flex items-center gap-1 px-2 py-1 bg-port-success/20 hover:bg-port-success/40 text-port-success rounded text-xs"><Film className="w-3 h-3" /> Send to Video@@ -602,7 +608,7 @@ export default function ImageGen() {item={item}onPreview={() => setPreview(img)}onRemix={() => handleRemix(img)}- onSendToVideo={() => sendToVideo(img.filename)}+ onSendToVideo={() => sendToVideo(img)}onDelete={() => handleDelete(img.filename)}/>);@@ -618,7 +624,7 @@ export default function ImageGen() {// already nulled `preview` — without this the closure throws on// preview.filename access.onRemix={() => preview && handleRemix(preview)}- onSendToVideo={() => preview?.filename && sendToVideo(preview.filename)}+ onSendToVideo={() => preview?.filename && sendToVideo(preview)}/>diff --git a/client/src/pages/MediaHistory.jsx b/client/src/pages/MediaHistory.jsxindex af41ee4c0d..d7e6e1862c 100644--- a/client/src/pages/MediaHistory.jsx+++ b/client/src/pages/MediaHistory.jsx@@ -110,7 +110,11 @@ export default function MediaHistory() {};const handleSendToVideo = (item) => {- navigate(`/media/video?sourceImageFile=${encodeURIComponent(item.filename)}`);+ const params = new URLSearchParams({ sourceImageFile: item.filename });+ if (item.prompt && item.prompt !== '(no prompt)') params.set('prompt', item.prompt);+ const neg = item.negativePrompt || item.raw?.negativePrompt || item.raw?.negative_prompt;+ if (neg) params.set('negativePrompt', neg);+ navigate(`/media/video?${params}`);};return (diff --git a/client/src/pages/VideoGen.jsx b/client/src/pages/VideoGen.jsxindex dbc4affc87..c8e4b405d3 100644--- a/client/src/pages/VideoGen.jsx+++ b/client/src/pages/VideoGen.jsx@@ -47,6 +47,8 @@ const TILING_OPTIONS = [export default function VideoGen() {const [searchParams, setSearchParams] = useSearchParams();const incomingSourceImage = searchParams.get('sourceImageFile');+ const incomingPrompt = searchParams.get('prompt');+ const incomingNegativePrompt = searchParams.get('negativePrompt');const settingsOpen = searchParams.get('settings') === '1';const openSettings = () => setSearchParams(prev => { const n = new URLSearchParams(prev); n.set('settings', '1'); return n; });const closeSettings = () => setSearchParams(prev => { const n = new URLSearchParams(prev); n.delete('settings'); return n; });@@ -55,8 +57,8 @@ export default function VideoGen() {const [statusLoading, setStatusLoading] = useState(true);const [models, setModels] = useState([]);- const [prompt, setPrompt] = useState('');- const [negativePrompt, setNegativePrompt] = useState('');+ const [prompt, setPrompt] = useState(incomingPrompt || '');+ const [negativePrompt, setNegativePrompt] = useState(incomingNegativePrompt || '');const [modelId, setModelId] = useState('');const [width, setWidth] = useState(768);const [height, setHeight] = useState(512);@@ -78,6 +80,12 @@ export default function VideoGen() {setSourceImageUpload(null);}}, [incomingSourceImage]);+ useEffect(() => {+ if (incomingPrompt) setPrompt(incomingPrompt);+ }, [incomingPrompt]);+ useEffect(() => {+ if (incomingNegativePrompt) setNegativePrompt(incomingNegativePrompt);+ }, [incomingNegativePrompt]);const [history, setHistory] = useState([]);const [preview, setPreview] = useState(null);const navigate = useNavigate();