Skip to content

feat(orchestrator): render slideshow video inline with daily-loop (9eb) - #22

Open
MukhammadIbrokhimov wants to merge 1 commit into
mainfrom
feat/orchestrator-slideshow-render
Open

feat(orchestrator): render slideshow video inline with daily-loop (9eb)#22
MukhammadIbrokhimov wants to merge 1 commit into
mainfrom
feat/orchestrator-slideshow-render

Conversation

@MukhammadIbrokhimov

Copy link
Copy Markdown
Owner

Summary

  • Wires the slideshow-render skill (shipped in PR feat(slideshow-render): assemble images + TTS into 1080x1920 mp4 (E2) #21) into the daily-loop. After slideshow-draft produces the storyboard, slideshow-render runs synchronously to generate the mp4 before the approval card is sent — so the user reviews a real video rather than just a storyboard.json reference.
  • Render failures propagate through callSkill's existing try/catch, surfacing as the slideshow mode's normal skipped-result (no sendForApproval, summary DM mentions the failure reason).
  • formatTemplateA now prefers video > image > others when a draft has multiple media entries — otherwise the approval card would advertise the storyboard rather than the rendered video.

Closes openclaw-9eb.

Test plan

  • npm test in every workspace-mirror package — 357 tests pass across all 16 packages
  • New tests:
    • daily-loop: slideshow mode invokes slideshowRender between slideshowDraft and sendForApproval (call-order verified)
    • daily-loop: render failure → result.ok=false, no sendForApproval for that draft
    • constants: formatTemplateA shows 🎬 Media: video, 60s even when storyboard is media[0]
  • node --check bin/orchestrator.js passes; bin-startup integration tests still green
  • Live verification after merge + deploy-live.mjs + setup.mjs: run the daily-loop once and confirm ~/openclaw-drafts/pending/<slide-id>/media/video.mp4 exists and plays

Notes

Embedding the video into the Telegram approval message (via sendVideo) is intentionally not in scope — telegram-client.js only has sendMessage today. The card still shows the draft ID, so the user can cd ~/openclaw-drafts/pending/<id>/media/. That's "links to" per the 9eb acceptance criteria; "embeds" can be a follow-up if desired.

… follow-up)

After slideshow-draft generates the storyboard, daily-loop now invokes
slideshow-render synchronously so the approval card always refers to a
real mp4 instead of a storyboard.json. Render failures propagate through
callSkill's existing try/catch, so an ffmpeg crash surfaces as the
slideshow mode's normal "skipped" result.

formatTemplateA also prefers video over storyboard when both are present
in draft.media — otherwise the approval card would advertise the
internal storyboard artifact instead of the rendered video.

- daily-loop.js: callSkill's slideshow branch now calls slideshowRender.
- bin/orchestrator.js: wires slideshowRender with real fetch / say /
  ffmpeg, reusing the existing runSub.
- shared/constants.js: primaryMedia picks video > image > others.

Closes openclaw-9eb.
Copilot AI review requested due to automatic review settings June 11, 2026 12:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR integrates the slideshow-render skill into the orchestrator’s daily loop so slideshow drafts are rendered to an MP4 before the approval message is sent, and updates the approval-card formatting to prefer showing the rendered video when multiple media artifacts are present.

Changes:

  • Run slideshowRender synchronously after slideshowDraft during the daily-loop slideshow path.
  • Update formatTemplateA to select “primary” media (prefer video over image over others) and add test coverage for the slideshow storyboard+video case.
  • Wire renderSlideshow() into bin/orchestrator.js skill loading so the CLI daily-loop has slideshowRender available.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
workspace-mirror/skills/shared/tests/constants.test.js Adds coverage ensuring template A surfaces rendered video over storyboard.
workspace-mirror/skills/shared/constants.js Introduces primary-media selection so approval cards prefer video when present.
workspace-mirror/skills/orchestrator/daily-loop.test.js Adds tests asserting slideshow render call order and render-failure behavior.
workspace-mirror/skills/orchestrator/daily-loop.js Calls slideshowRender after slideshowDraft in slideshow mode.
workspace-mirror/skills/orchestrator/bin/orchestrator.js Wires renderSlideshow into orchestrator skill loading as slideshowRender.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +55 to +65
const result = await skills.slideshowDraft.run({ topic: topic.topic, niche: topic.niche });
// Render the mp4 immediately so the approval card refers to a real video
// rather than only a storyboard.json. Render failures propagate through
// callSkill's caller so they show up in the daily-loop summary.
await skills.slideshowRender.run({
draftId: result.draft.id,
storyboard: result.storyboard,
draft: result.draft,
});
return result.draft;
}
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