Send a new campaign to its own page, where its video is - #278
Merged
Merged
Conversation
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>
ThreatCrush Security Scan48 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 31 | LOW: 15
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the "this didn't generate a video ad" report on
/dashboard/ads/new.What was actually happening
Saving a campaign queues the five-second pre-roll, 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. From their seat that is indistinguishable from nothing happening.
The fix
Redirect to
/dashboard/ads/<id>. The?created=<slug>it used to pass was never read by the list page, so nothing is lost.Also adds a line to the generate screen saying where the video went. The render takes a couple of minutes on a worker, so it is deliberately queued on save rather than blocking that screen — but without saying so, a video that is merely still rendering looks like one that failed.
Still deferred
Rendering at preview time, before save, is in the spec and still not wired. It needs somewhere to put preview assets: a preview job has no creative row to attach to, and
ad_video_assets.creative_idis NOT NULL. That's a schema change rather than a UI tweak, so it isn't smuggled into this fix.Context
The pipeline itself is confirmed working in production. The canary rendered in 2m33s and its MP4, downloaded from storage and probed, is h264 1920×1080 yuv420p at exactly
30/1with 150 decoded frames — the full media contract, from a real file.The 177-campaign backfill is draining now: 7 ready, 2 rendering, 165 queued, 0 failed at time of writing.
Repo-wide: 2547 passed / 1 failed — the pre-existing
tracker-geofailure (mmdb not installed locally), unrelated.