AdPilot · Corpus
T-022 — Platform-native ad previews
T-022 — Platform-native ad previews
Frozen spec for the T-022 build: show how the customer will actually see the ad — the most-requested missing surface for a paid ads tool.
Decisions
- Scope (Q1): previews surface on a dedicated
/previewspage in the Next console, fed by live copy/CTA/asset-URL inputs; embedding into campaign-detail and generation output lands with those surfaces' next iterations. Frames are labeled "approximate preview", carry thechecked-against 2026-09-11anatomy stamp, and state that they switch to Meta/generatepreviewHTML once an account is connected — no exact-fidelity claims in the UI. - Implementer — anatomy honesty:
apps/web-next/lib/previews.tsis a pure mapper (no DOM, no fetch) so the chrome is jest-testable;apps/web-next/components/AdPreview.tsxonly renders models. Per placement: Meta Feed = Sponsored under page name, creative, blue CTA + headline + domain row, counts line above the Like/Comment/Share pill; Meta Story/Reels = progress bars, pinned CTA card, "Send message" pill + heart; TikTok in-feed = Following/For You tabs, right rail ♥/💬/🔖/↗ with counts, Sponsored + @creator + caption with #ad + "original sound" + CTA; Google Display = responsive card with logo, business line · Sponsored, headline, body, CTA. - Implementer — real-feeling content: named brand fixtures (Ember & Oak Candles, Brew Lane Coffee, Trailhead Gear Co.) with real-shaped copy, prices, and engagement counts that vary per placement — no lorem, no generic pills (owner rejected placeholder-feeling content).
- Implementer — asset fallback: an empty or failing asset URL renders a gradient tile with the brand's initials, so the frames read complete in the demo deployment.
Surface-area deltas
apps/web-next/lib/previews.ts— the mapper + fixtures + freshness stamp.apps/web-next/lib/previews.test.ts— per-placement anatomy and fixture tests.apps/web-next/components/AdPreview.tsx— the four frame renderers.apps/web-next/app/previews/page.tsx— the live editor + 4-up frame grid.apps/web-next/app/layout.tsx— nav link.- Board rows
tasks/00-backlog/T-022-platform-ad-previews.md(deleted side of the git mv) /tasks/10-in-progress/T-022-platform-ad-previews.mdand this spec filedocs/tech-spec/T-022.mdare bookkeeping.
Verification
Web gates: npm run build (strict), jest (9 new preview assertions),
eslint clean. The frames are pure front-end — no network calls, sandbox rule
untouched.
Out of scope
Meta /generatepreview native embed (needs a connected account),
campaign-detail embedding, mobile app rendering.