From 2a6bbcd40852d69dc28815bed550d802f26a6925 Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Fri, 5 Jun 2026 22:13:26 +0330 Subject: [PATCH] fix(render-page): register completion without requiring a download URL 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 --- .../studio/render/[projectId]/page.tsx | 49 +++++++++++-------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/src/app/[locale]/studio/render/[projectId]/page.tsx b/src/app/[locale]/studio/render/[projectId]/page.tsx index e9d687d..3866aeb 100644 --- a/src/app/[locale]/studio/render/[projectId]/page.tsx +++ b/src/app/[locale]/studio/render/[projectId]/page.tsx @@ -109,8 +109,8 @@ export default function RenderPage() { setProgressMessage(data.progressMessage ?? `Rendering… ${data.progress}%`); if (data.previewB64) setPreviewB64(data.previewB64); - if (data.status === "completed" && data.outputUrl) { - setOutputUrl(data.outputUrl); + if (data.status === "completed") { + if (data.outputUrl) setOutputUrl(data.outputUrl); setProgress(100); setPhase("completed"); } else if (data.status === "failed") { @@ -219,27 +219,36 @@ export default function RenderPage() { {/* State-specific panel */} - {phase === "completed" && outputUrl ? ( + {phase === "completed" ? (

ویدیوی شما آماده است!

- - - دانلود MP4 - - - - لینک اشتراک‌گذاری - + {outputUrl ? ( + <> + + + دانلود MP4 + + + + لینک اشتراک‌گذاری + + + ) : ( +

+ رندر در محیط توسعه کامل شد (بدون فایل خروجی واقعی). در محیط تولید، لینک دانلود اینجا + نمایش داده می‌شود. +

+ )}