Skip to content

release: scene components, trend discovery, dashboard settings, sponsor bridge, distribution logging#598

Merged
codercatdev merged 21 commits intomainfrom
dev
Mar 4, 2026
Merged

release: scene components, trend discovery, dashboard settings, sponsor bridge, distribution logging#598
codercatdev merged 21 commits intomainfrom
dev

Conversation

@codercatdev
Copy link
Contributor

@codercatdev codercatdev commented Mar 4, 2026

Release: dev → main

Build verified: TypeScript compiles clean (64s, --webpack). Only pre-existing Algolia env var issue (same on main, works on Vercel).

27 files changed, +5,625 / -412 lines

What's included

🎬 Scene Components — All Phases (@videopipe)

  • Phase A+B: SceneRouter, CodeMorphScene, DynamicListScene, ElevenLabs timestamps, Gemini prompt
  • Phase D: ComparisonGridScene (SVG grid, staggered rows), IsometricMockupScene (CSS 3D devices)
  • Follow-up: CSS transition cleanup + per-scene audio wiring in video-pipeline.ts
  • YouTube visibility: YOUTUBE_UPLOAD_VISIBILITY env var (defaults to private)
  • All 5 scene types active: narration, code, list, comparison, mockup

🔍 Trend Discovery + Research (@research)

  • trend-discovery.ts (1,101 lines) — 5-source: HN, Dev.to, blog RSS, YouTube API, GitHub Trending
  • research.ts (807 lines) — NotebookLM research bridge (temporary CLI wrapper)
  • Ingest cron integration — replaces old 2-feed RSS, opt-in research via ENABLE_NOTEBOOKLM_RESEARCH=true
  • Graceful fallbacks everywhere — cron cannot break

📊 Dashboard Settings + Pipeline Status (@dashboard)

  • dashboardSettings Sanity singleton — videos/week, publish days, categories, rate card tiers
  • Settings API (GET/PUT) with fail-closed auth + input validation
  • Pipeline status chart — 8-stage visual bar chart, 30s auto-refresh

🤝 Sponsor Bridge (@content + @sponsor)

  • sponsor-bridge.ts — auto-creates sponsor docs when leads convert to paid
  • Stripe webhook wiring — non-fatal, idempotent

📡 Distribution Logging (@distribute)

  • after() pattern on distribute webhook (prevents Vercel timeout)
  • distributionLog array — per-step success/failure tracking

All PRs individually reviewed and approved by @pm before merge to dev.

codercatdev and others added 6 commits March 3, 2026 23:08
Co-authored-by: Miriad <miriad@miriad.systems>
Co-authored-by: videopipe <videopipe@miriad.systems>
…, Gemini prompt

- Add SceneType system (narration/code/list/comparison/mockup) to remotion/types.ts
- Add scene-specific data schemas (code, list, comparison, mockup)
- Add WordTimestamp type and per-scene audio support
- Create SceneRouter component that routes sceneType → component
- Update MainVideo + ShortVideo to use SceneRouter
- Add CODE_COLORS, LIST_COLORS, COMPARISON_COLORS constants
- Add new font sizes for scene components
- Create lib/utils/audio-timestamps.ts (word-level timestamp aggregation)
- Add generateSpeechWithTimestamps() to ElevenLabs service
- Add generatePerSceneAudio() for per-scene TTS with timestamps
- Update Gemini ingest prompt to select sceneType per scene

All new scene types currently fall back to existing Scene component.
Backward compatible — existing data without sceneType works unchanged.

Co-authored-by: videopipe <videopipe@miriad.systems>
- CodeMorphScene: glassmorphism code window with typing animation,
  line-by-line reveal, blinking cursor, optional line highlighting
  synced to word timestamps, macOS-style title bar with traffic lights
- DynamicListScene: spring-bounced item entrance with staggered timing,
  focus dimming (active item highlighted, others dim to 0.35 opacity),
  timestamp-synced item activation via getActiveSegmentAtFrame(),
  configurable icon/bullet per item
- Both components: responsive portrait/landscape layouts, narration
  overlay, watermark, edge case handling
- SceneRouter updated to route code → CodeMorphScene, list → DynamicListScene
- Zero new dependencies — pure Remotion + React

Co-authored-by: videopipe <videopipe@miriad.systems>
…eMorphScene, DynamicListScene, ElevenLabs timestamps, Gemini prompt update
@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingcat-dev Ready Ready Preview, Comment Mar 4, 2026 2:24pm

@codercatdev
Copy link
Contributor Author

✅ Code Review Complete — Ready to merge to main

Reviewed by @pm — 10 files, +1,340/-14 lines. No blockers.

Strengths

  • SceneRouter fallback pattern — existing videos render identically, zero regression risk
  • Clean type system — Zod schemas with optional sceneType, fully backward compatible
  • Remotion API usage correct — proper interpolate, spring, useCurrentFrame throughout
  • ElevenLabs service — thorough error handling, concurrency control (batches of 3)
  • Audio timestamps — correct word-level aggregation and frame conversion
  • Gemini prompt — well-structured scene type selection with variety guidelines
  • YouTube visibility — safe default to private, clean env var validation

Non-blocking follow-ups

  1. ⚠️ CSS transition properties in CodeMorphScene/DynamicListScene are no-ops in Remotion (each frame renders independently) — remove for clarity
  2. ⚠️ Add new scene fields (sceneType, code, list, etc.) to Sanity schema for Studio visibility
  3. ⚠️ generatePerSceneAudio() is defined but not yet called — infrastructure for Phase C

Ship it! 🚀

Miriad and others added 15 commits March 4, 2026 13:08
- Use after() from next/server to return 200 immediately and run the
  heavy distribution pipeline (YouTube upload, Gemini, email, social)
  in the background. Prevents Vercel from killing the function mid-upload.
  Same pattern as sanity-content webhook route.

- Add distributionLog array field to automatedVideo schema. Each step
  (gemini-metadata, youtube-upload, youtube-short, email, x-twitter)
  logs success/failed/skipped with timestamps, error messages, and
  result IDs. Enables dashboard retry of failed steps.

- Non-fatal steps (email, X/Twitter) now log failures instead of
  silently swallowing them. YouTube upload failures are also logged
  but don't block the pipeline from marking published if at least
  the main video uploaded.
…e audio into pipeline

- Remove no-op CSS transition properties from CodeMorphScene and DynamicListScene
- Wire generatePerSceneAudio() into video-pipeline.ts with fallback to single blob
- Pass per-scene word timestamps through to Remotion render input
- Update VideoScene interface with sceneType and type-specific data fields
Adds lib/services/research.ts — TypeScript service that wraps the
notebooklm CLI to conduct automated research for video topics.

Pipeline: topic → notebook → deep web research → artifacts → structured
ResearchPayload JSON for Gemini script generation.

Features:
- 8-step research pipeline with resilient error handling
- Parallel artifact generation (mind map, briefing, data table, infographic)
- Targeted Q&A extraction (talking points, code examples, pros/cons)
- Scene hint generation (maps content → Remotion scene types)
- Configurable via env vars (NOTEBOOKLM_CLI_PATH, NOTEBOOKLM_STORAGE_PATH)

Note: CLI wrapper is temporary — will be replaced with direct HTTP calls.

807 lines, zero TypeScript errors.

Co-authored-by: research <research@miriad.systems>
- ComparisonGridScene: self-drawing SVG grid lines, staggered row fly-in,
  timestamp-driven row highlighting, responsive stacked layout for portrait
- IsometricMockupScene: CSS 3D perspective device frames (browser/phone/terminal),
  spring-animated tilt settling, typing animation for terminal mode
- Wire both components into SceneRouter (all 5 scene types now active)
- Zero new dependencies, no CSS transitions, backward compatible
…g stage

- All API routes now fail closed (503 if Supabase not configured)
- Settings PUT validates and whitelists fields (videosPerWeek, publishDays,
  contentCategories, rateCardTiers) with type checking
- Uses createIfNotExists with deterministic ID for singleton safety
- Added missing 'rendering' pipeline stage (8 stages total)
- Consolidated GROQ queries (7 parallel calls → 1 query)
- Added AbortController cleanup to pipeline polling
- Use shared POLL_INTERVAL_MS constant

Co-authored-by: dashboard <dashboard@miriad.systems>
…le parseJsonOutput

- Replace hardcoded "2025" in YouTube queries with dynamic year
- Add YouTubeSearchItem/YouTubeSearchResponse/YouTubeVideoStats interfaces
- Change parseJsonOutput to return T | null instead of {} as T
- Update all callers to use optional chaining for null safety

Co-authored-by: research <research@miriad.systems>
If trend discovery throws (network error, API down, etc.), falls back
to FALLBACK_TRENDS instead of returning a 500. Matches the same
resilient pattern used for conductResearch().

Co-authored-by: research <research@miriad.systems>
…rend discovery + optional NotebookLM research
@codercatdev codercatdev changed the title release: scene components pipeline + YouTube visibility control release: scene components, trend discovery, dashboard settings, sponsor bridge, distribution logging Mar 4, 2026
@codercatdev codercatdev merged commit 527ff14 into main Mar 4, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant