Skip to content

feat: showTitleCard integration + TTS model update#1

Open
snomiao wants to merge 2 commits intomainfrom
feat/video-script-improvements
Open

feat: showTitleCard integration + TTS model update#1
snomiao wants to merge 2 commits intomainfrom
feat/video-script-improvements

Conversation

@snomiao
Copy link
Copy Markdown
Member

@snomiao snomiao commented Apr 13, 2026

Summary

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 navigation
  • src/recorder/narration.ts: Update to Gemini 3 TTS model
  • lib/demowright: Point submodule to branch with showTitleCard export

Depends on

- 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
Copilot AI review requested due to automatic review settings April 13, 2026 09:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/agent/orchestrator.ts Outdated
Comment on lines +152 to +154
} catch {
// showTitleCard not available in this demowright build — skip
}
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/agent/orchestrator.ts Outdated
Comment on lines +159 to +163
// Hide persistent title card before navigating
try {
const { hideTitleCard } = await import("../../lib/demowright/dist/video-script.mjs");
await hideTitleCard(session.page);
} catch { /* skip */ }
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Copy Markdown
Member Author

@snomiao snomiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Fix TTS model name → gemini-2.5-flash-preview-tts (keep current)
  2. Merge demowright PR #11 → main first, then update submodule ref
  3. After both fixes, this is ready to merge

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/agent/orchestrator.ts
try {
const { hideTitleCard } = await import("../../lib/demowright/dist/video-script.mjs");
await hideTitleCard(session.page);
} catch { /* best-effort */ }
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
} catch { /* best-effort */ }
} catch (err) {
console.debug(` [record] Failed to hide title card during cleanup: ${String(err).slice(0, 200)}`);
}

Copilot uses AI. Check for mistakes.
Comment thread src/recorder/narration.ts
import * as path from "path";

const GEMINI_TTS_MODEL = "gemini-2.5-flash-preview-tts";
const GEMINI_TTS_MODEL = "gemini-3-flash-preview-tts";
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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.

2 participants