Skip to content

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

address review: gate frame preview on uploadUrl, not raw upload File

Adam Eivya8e41cf43e38
diff --git a/client/src/pages/VideoGen.jsx b/client/src/pages/VideoGen.jsx
index fdca9460e7..fe68724853 100644
--- a/client/src/pages/VideoGen.jsx
+++ b/client/src/pages/VideoGen.jsx
@@ -653,7 +653,13 @@ export default function VideoGen() {
alt,
advisoryNote,
}) => {
+ // Clear button shows as soon as the user picks anything (state-only).
+ // Preview gates on `uploadUrl` instead of the raw `upload` File because
+ // the object URL is generated in a useEffect — without this, the render
+ // between "user picked a file" and "useEffect ran" would mount an
+ // <img src={null}> for one frame.
const hasSelection = !!(file || upload);
+ const canPreview = !!(file || uploadUrl);
return (
<div className="border border-port-border/50 rounded-lg p-2 space-y-1.5">
<div className="flex items-center justify-between">
@@ -662,7 +668,7 @@ export default function VideoGen() {
<button type="button" onClick={onClear} className="text-[11px] text-port-error hover:underline">Clear</button>
)}
</div>
- {hasSelection ? (
+ {canPreview ? (
<ImagePreview
src={file ? `/data/images/${file}` : uploadUrl}
alt={alt}