Skip to content

Commit af0725b

Browse files
ralyodioclaude
andauthored
Send a new campaign to its own page, where its video is (#278)
Saving a campaign queues the five-second pre-roll and then pushed the advertiser to /dashboard/ads — the list. The card that reports render progress and serves the MP4 download is on the campaign page. So a video was generated every time and the person who asked for it was routed somewhere that never showed it, which from their seat is indistinguishable from nothing happening. Redirects to /dashboard/ads/<id> instead. The `?created=<slug>` it used to pass was never read by the list page, so nothing is lost. Also says so on the generate screen. The render takes a couple of minutes on a worker, so it is deliberately queued on save rather than blocking that screen; without a line saying where it went, a video that is merely still rendering looks like one that failed to generate. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7405df2 commit af0725b

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎app/(app)/dashboard/ads/new/form.tsx‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,12 @@ export function NewAdForm() {
120120
setError(res.error);
121121
return;
122122
}
123-
router.push(`/dashboard/ads?created=${res.refSlug}`);
123+
// The campaign page, not the list. Saving queues the five-second
124+
// pre-roll render, and the card that reports its progress and serves the
125+
// MP4 download lives on the campaign page — landing on the list meant a
126+
// video was generated and the advertiser was sent somewhere that never
127+
// showed it. (`?created=` was never read by the list page either.)
128+
router.push(`/dashboard/ads/${res.id}`);
124129
});
125130
}
126131

@@ -214,6 +219,15 @@ export function NewAdForm() {
214219
</span>
215220
)}
216221
</div>
222+
{/* The pre-roll is rendered by a worker, which takes a couple of
223+
minutes — so it is queued on save rather than blocking this
224+
screen, and its progress and MP4 download appear on the campaign
225+
page you land on next. Saying so here stops the video looking
226+
like something that failed to generate. */}
227+
<div className="text-xs text-[var(--color-muted)]">
228+
A five-second streaming pre-roll is rendered from this design when you
229+
save. It appears on the campaign page, with an MP4 download, once ready.
230+
</div>
217231
<div className="flex flex-wrap items-start gap-6">
218232
{DESIGN_FORMATS.map((f) => {
219233
const c = creatives.find((x) => x.format === f.id);

0 commit comments

Comments
 (0)