Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: splitbrain/ndemo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cdp
Choose a base ref
...
head repository: splitbrain/ndemo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 16 files changed
  • 3 contributors

Commits on Mar 29, 2026

  1. Generate SRT subtitles during render and as standalone command

    Add SRT subtitle generation that splits narration into readable cues
    (~80 chars) and times them proportionally across audio duration.
    Includes `ndemo subtitles` CLI command for generating SRT files from
    existing playbooks without re-rendering. Also saves videoDuration to
    playbooks for accurate standalone subtitle timing.
    splitbrain committed Mar 29, 2026
    Configuration menu
    Copy the full SHA
    5eb383d View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2026

  1. Remove playbooks directory from git tracking

    Add playbooks/ to .gitignore and untrack existing playbook files.
    splitbrain committed Mar 30, 2026
    Configuration menu
    Copy the full SHA
    30b8b94 View commit details
    Browse the repository at this point in the history
  2. Add video title card support for better browser/Slack previews

    Renders an HTML title card as the first frames of the video so browsers
    and Slack show a meaningful preview instead of a blank frame. The card
    respects the playbook's colorScheme (light/dark), plays no audio, and
    is configured via an optional titleCard section in the playbook YAML.
    
    https://claude.ai/code/session_011gwGxEt5qXnwcEciRe7HwD
    claude committed Mar 30, 2026
    Configuration menu
    Copy the full SHA
    6025668 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b314f7a View commit details
    Browse the repository at this point in the history
  4. Fix title card not visible in rendered video

    Three issues prevented the title card from displaying correctly:
    
    1. The addInitScript zoom (compensating for the scaled viewport) was
       applied to the title card's body which used 100vw/100vh, causing it
       to overflow the viewport. Fixed by sizing the body to
       calc(100vw / zoom) so it fills exactly the viewport after zoom.
    
    2. The screencast started while the app page was displayed, making the
       app the first captured frame instead of the title card. Fixed by
       deferring the app navigation to after the title card.
    
    3. The ffmpeg concat encoder produced a VFR stream with a single frame
       for the 3-second title card, which most players couldn't seek or
       display correctly. Fixed by adding -r fps to force constant frame
       rate output.
    splitbrain committed Mar 30, 2026
    Configuration menu
    Copy the full SHA
    ac5e687 View commit details
    Browse the repository at this point in the history
  5. Fix rendered video truncating segments with static content

    Two issues caused segments to be cut short or missing in rendered videos:
    
    1. The audio track only accounted for title card duration, not the
       navigation time to the app URL. Since ffmpeg uses -shortest, the
       video was truncated by however long navigation took. Fix: measure
       actual wall-clock pre-segment time (title card + navigation) and
       use that for the audio silence gap.
    
    2. CDP screencast only emits frames on visual changes. Static segments
       (e.g. wait actions) produced no frames, so the last frame was held
       for only 1/30s instead of the remaining video duration. Fix: compute
       expected total duration and hold the last frame accordingly.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    splitbrain and claude committed Mar 30, 2026
    Configuration menu
    Copy the full SHA
    3e4db9c View commit details
    Browse the repository at this point in the history
  6. Replace CSS zoom with real browser zoom via playwright-zoom extension

    CSS zoom (body.style.zoom) breaks viewport units — 100vh resolves to
    the full viewport height before zoom is applied, then gets scaled and
    overflows. This required workarounds like calc(100vh / renderZoom) for
    the title card and dividing cursor positions by zoom.
    
    Instead, use chrome.tabs.setZoom() through the playwright-zoom Chrome
    extension, which behaves like Ctrl+/- browser zoom: the logical
    viewport shrinks, vh/vw units adjust correctly, and CDP screencast
    still captures at full physical resolution.
    
    Key changes:
    - Add playwright-zoom dependency for the bundled Chrome extension
    - Add src/zoom.ts helper to locate the extension and set zoom
    - Switch renderer and daemon to launchPersistentContext (required for
      extensions) with --headless=new for headless rendering
    - Remove all CSS zoom: init scripts, body.style.zoom assignments,
      title card calc() hack, and cursor position zoom division
    - Simplify setup in renderer to use single context instead of
      separate setup + recording contexts with storageState transfer
    splitbrain committed Mar 30, 2026
    Configuration menu
    Copy the full SHA
    d60e17e View commit details
    Browse the repository at this point in the history
Loading