fix(render-page): register completion without requiring a download URL
Build backend images / build content-svc (push) Failing after 56s
Build backend images / build file-svc (push) Failing after 29s
Build backend images / build gateway (push) Failing after 41s
Build backend images / build identity-svc (push) Failing after 5m32s
Build backend images / build notification-svc (push) Failing after 1m18s
Build backend images / build render-svc (push) Failing after 56s
Build backend images / build studio-svc (push) Failing after 1m5s
Build backend images / build content-svc (push) Failing after 56s
Build backend images / build file-svc (push) Failing after 29s
Build backend images / build gateway (push) Failing after 41s
Build backend images / build identity-svc (push) Failing after 5m32s
Build backend images / build notification-svc (push) Failing after 1m18s
Build backend images / build render-svc (push) Failing after 56s
Build backend images / build studio-svc (push) Failing after 1m5s
The full-screen render page only transitioned to "completed" when status was completed AND an outputUrl existed, so dev renders (which produce no export file) polled forever at 100%. Now completion is driven by status alone; the download/ share buttons render only when a URL is present, otherwise a "dev render, no file" note is shown. Same guard helps real renders whose export URL resolves a beat late. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -109,8 +109,8 @@ export default function RenderPage() {
|
|||||||
setProgressMessage(data.progressMessage ?? `Rendering… ${data.progress}%`);
|
setProgressMessage(data.progressMessage ?? `Rendering… ${data.progress}%`);
|
||||||
if (data.previewB64) setPreviewB64(data.previewB64);
|
if (data.previewB64) setPreviewB64(data.previewB64);
|
||||||
|
|
||||||
if (data.status === "completed" && data.outputUrl) {
|
if (data.status === "completed") {
|
||||||
setOutputUrl(data.outputUrl);
|
if (data.outputUrl) setOutputUrl(data.outputUrl);
|
||||||
setProgress(100);
|
setProgress(100);
|
||||||
setPhase("completed");
|
setPhase("completed");
|
||||||
} else if (data.status === "failed") {
|
} else if (data.status === "failed") {
|
||||||
@@ -219,27 +219,36 @@ export default function RenderPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* State-specific panel */}
|
{/* State-specific panel */}
|
||||||
{phase === "completed" && outputUrl ? (
|
{phase === "completed" ? (
|
||||||
<div className="w-full max-w-md space-y-3 text-center">
|
<div className="w-full max-w-md space-y-3 text-center">
|
||||||
<p className="text-lg font-semibold text-emerald-400">ویدیوی شما آماده است!</p>
|
<p className="text-lg font-semibold text-emerald-400">ویدیوی شما آماده است!</p>
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<a
|
{outputUrl ? (
|
||||||
href={outputUrl}
|
<>
|
||||||
download
|
<a
|
||||||
className="inline-flex items-center justify-center gap-2 rounded-lg bg-primary-600 px-4 py-3 text-sm font-medium text-white hover:bg-primary-700"
|
href={outputUrl}
|
||||||
>
|
download
|
||||||
<Download className="h-4 w-4" />
|
className="inline-flex items-center justify-center gap-2 rounded-lg bg-primary-600 px-4 py-3 text-sm font-medium text-white hover:bg-primary-700"
|
||||||
دانلود MP4
|
>
|
||||||
</a>
|
<Download className="h-4 w-4" />
|
||||||
<a
|
دانلود MP4
|
||||||
href={outputUrl}
|
</a>
|
||||||
target="_blank"
|
<a
|
||||||
rel="noopener noreferrer"
|
href={outputUrl}
|
||||||
className="inline-flex items-center justify-center gap-2 rounded-lg border border-[#2a2d3e] px-4 py-2.5 text-sm text-gray-200 hover:bg-[#161a2b]"
|
target="_blank"
|
||||||
>
|
rel="noopener noreferrer"
|
||||||
<Link2 className="h-4 w-4" />
|
className="inline-flex items-center justify-center gap-2 rounded-lg border border-[#2a2d3e] px-4 py-2.5 text-sm text-gray-200 hover:bg-[#161a2b]"
|
||||||
لینک اشتراکگذاری
|
>
|
||||||
</a>
|
<Link2 className="h-4 w-4" />
|
||||||
|
لینک اشتراکگذاری
|
||||||
|
</a>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<p className="rounded-lg border border-[#2a2d3e] bg-[#0c0e1a] px-3 py-2.5 text-xs text-gray-400">
|
||||||
|
رندر در محیط توسعه کامل شد (بدون فایل خروجی واقعی). در محیط تولید، لینک دانلود اینجا
|
||||||
|
نمایش داده میشود.
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
<Link
|
<Link
|
||||||
href={backToStudio}
|
href={backToStudio}
|
||||||
className="mt-1 text-xs text-gray-500 hover:text-gray-300"
|
className="mt-1 text-xs text-gray-500 hover:text-gray-300"
|
||||||
|
|||||||
Reference in New Issue
Block a user