Skip to content

feat(react): add Batch component for concurrent multi-video rendering#56

Draft
caffeinum wants to merge 1 commit intomainfrom
feat/batch-render
Draft

feat(react): add Batch component for concurrent multi-video rendering#56
caffeinum wants to merge 1 commit intomainfrom
feat/batch-render

Conversation

@caffeinum
Copy link
Copy Markdown
Contributor

Summary

  • adds <Batch> wrapper component to render multiple videos with concurrency control
  • supports parallel prop for concurrent renders (default: 1)
  • fail-fast behavior - first error stops the batch
  • each <Render> child uses name prop for output filename

Usage

<Batch parallel={4} output="output/hooks">
  {HOOKS.map((hook) => (
    <Render key={hook} name={hook.toLowerCase().replace(/\s+/g, "-")}>
      <Clip duration={5}>
        <Video prompt={hook} />
      </Clip>
    </Render>
  ))}
</Batch>

Changes

  • src/react/types.ts - added batch type, BatchProps, name to RenderProps
  • src/react/elements.ts - added Batch() function
  • src/react/renderers/batch.ts - new renderer with chunked concurrency
  • src/react/render.ts - exports renderBatch
  • src/react/index.ts - exports Batch, BatchProps, renderBatch, BatchResult
  • src/cli/commands/render.tsx - handles batch in cli
  • src/react/examples/batch-demo.tsx - example file

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 24, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/batch-render

Comment @coderabbitai help to get the list of available commands and usage tips.

@caffeinum
Copy link
Copy Markdown
Contributor Author

@SecurityQQ check this out

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