feat: showTitleCard integration + TTS model update#1
Conversation
- Use demowright showTitleCard() to cover loading screen in recordings - Title card shows immediately, hidden before first navigation - Update TTS model from gemini-2.5-flash to gemini-3-flash - Point demowright submodule to feat/show-title-card-api branch
There was a problem hiding this comment.
Pull request overview
Integrates demowright’s title-card overlay into the QA recording flow to hide initial loading/setup visuals, and updates the Gemini TTS model used for narration generation.
Changes:
- Show a demowright title card at the start of recording and hide it before the first navigation.
- Update Gemini TTS model identifier to
gemini-3-flash-preview-tts.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/agent/orchestrator.ts | Adds best-effort showTitleCard()/hideTitleCard() calls around the initial recording steps. |
| src/recorder/narration.ts | Switches the Gemini TTS model constant to the Gemini 3 preview model. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } catch { | ||
| // showTitleCard not available in this demowright build — skip | ||
| } |
There was a problem hiding this comment.
The bare catch {} here will swallow any runtime error (e.g., wrong import path, API change, or showTitleCard throwing), making it hard to notice when the title card silently stops working. Consider catching only the “missing export/module” case (or at least logging the error at a debug level) so real failures are observable.
There was a problem hiding this comment.
Fixed in 812e5d1 — replaced bare catch {} with catch (err) and added console.debug logging so failures are observable. Also track titleCardShown state so we only attempt hide when show succeeded.
| // Hide persistent title card before navigating | ||
| try { | ||
| const { hideTitleCard } = await import("../../lib/demowright/dist/video-script.mjs"); | ||
| await hideTitleCard(session.page); | ||
| } catch { /* skip */ } |
There was a problem hiding this comment.
hideTitleCard() is only attempted on the happy path before the first navigation; if anything throws between showing the title card and this point, the overlay may remain for the rest of the recording and obscure evidence/screenshots. Consider tracking whether the title card was shown and attempting hideTitleCard() again in the outer finally (best-effort) so cleanup happens even on early failures.
There was a problem hiding this comment.
Fixed in 812e5d1 — added titleCardShown flag tracking and a best-effort hideTitleCard() call in the finally block, so the overlay is cleaned up even on early failures.
- Replace bare catch {} with debug logging so failures are observable
- Track titleCardShown state and hide in finally block on early failures
- Only attempt hideTitleCard when showTitleCard succeeded
Addresses Copilot review feedback on PR #1.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
snomiao
left a comment
There was a problem hiding this comment.
Review
showTitleCard integration ✅
Good idea — covering the loading/setup screen with a title card is exactly what we need. The try/catch fallback for older demowright builds is the right pattern.
TTS model update ❌
gemini-3-flash-preview-tts does not exist yet. Available TTS models:
models/gemini-2.5-flash-preview-tts
models/gemini-2.5-pro-preview-tts
This will break narration with a 404. Should keep gemini-2.5-flash-preview-tts or switch to gemini-2.5-pro-preview-tts.
demowright submodule ⚠️
Points to feat/show-title-card-api branch (PR #11), not main. Should be merged to demowright main first before we point our submodule to it.
Suggestion
- Fix TTS model name →
gemini-2.5-flash-preview-tts(keep current) - Merge demowright PR #11 → main first, then update submodule ref
- After both fixes, this is ready to merge
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| try { | ||
| const { hideTitleCard } = await import("../../lib/demowright/dist/video-script.mjs"); | ||
| await hideTitleCard(session.page); | ||
| } catch { /* best-effort */ } |
There was a problem hiding this comment.
In the finally cleanup, the bare catch {} will silently swallow failures to hide the title card (e.g., API changes / import issues), making it hard to diagnose cases where the overlay persists into the rest of the recording. Consider catching (err) here as well and logging at console.debug (similar to the earlier hide failure) so cleanup failures are observable.
| } catch { /* best-effort */ } | |
| } catch (err) { | |
| console.debug(` [record] Failed to hide title card during cleanup: ${String(err).slice(0, 200)}`); | |
| } |
| import * as path from "path"; | ||
|
|
||
| const GEMINI_TTS_MODEL = "gemini-2.5-flash-preview-tts"; | ||
| const GEMINI_TTS_MODEL = "gemini-3-flash-preview-tts"; |
There was a problem hiding this comment.
This updates the model used by src/recorder/narration.ts, but other Gemini TTS call sites in the repo still reference gemini-2.5-flash-preview-tts (e.g. demo/fixtures/fixture.ts and src/agent/demo-research.ts). If the intent is a repo-wide model bump (per PR description), consider centralizing the model name in a shared config/env var or updating the other call sites to avoid inconsistent TTS behavior across recording paths.
Summary
showTitleCard()/hideTitleCard()to cover loading screen in video recordingsgemini-2.5-flash-preview-ttstogemini-3-flash-preview-ttsfeat/show-title-card-apibranch (feat: export showTitleCard/hideTitleCard for persistent title overlays snomiao/demowright#11)Context
When recording QA videos, the first 5-10 seconds show ComfyUI loading/splash screen before the actual demo starts.
showTitleCard()covers this with a professional title card overlay that stays visible while page.goto() and setup complete.Changes
src/agent/orchestrator.ts: Show title card at recording start, hide before first navigationsrc/recorder/narration.ts: Update to Gemini 3 TTS modellib/demowright: Point submodule to branch withshowTitleCardexportDepends on