Skip to content

feat(studio): add MiniMax video generation - #84

Open
octo-patch wants to merge 2 commits into
nexu-io:mainfrom
octo-patch:octo/20260713-add-target-video-capability-recvoLiHsttAc2-v2
Open

feat(studio): add MiniMax video generation#84
octo-patch wants to merge 2 commits into
nexu-io:mainfrom
octo-patch:octo/20260713-add-target-video-capability-recvoLiHsttAc2-v2

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: add target video capability using the existing tool and provider pattern

Summary

  • Add a MiniMax text-to-video helper using the documented create, status, and file retrieval workflow.
  • Default to the current text-to-video model, enforce bounded polling and request timeouts, and surface logical API errors.
  • Expose a studio SSE endpoint that stores generated MP4 files in the existing project asset store.
  • Add request-capture tests for the successful workflow and failed task handling.

Validation

  • pnpm exec biome lint packages/core/src/minimax.ts packages/core/src/index.ts packages/core/test/minimax-video.test.ts
  • pnpm --filter @html-video/core test
  • pnpm --filter @html-video/cli... build
  • pnpm --filter @html-video/cli test
  • pnpm -r typecheck

Existing repository issue

  • pnpm -r test reaches the runtime and core tests, then stops because @html-video/adapter-hyperframes runs node --test test/ but that package has no test/ directory.

@lefarcen
lefarcen requested a review from nettee July 13, 2026 08:54
@lefarcen lefarcen added size/L Size L (300-699 LOC) risk/high High risk type/feature Feature change labels Jul 13, 2026

@nettee nettee 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.

This adds a MiniMax video-generation backend flow, but one blocking gap remains before it works as a Studio feature.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

// Generate a video clip, stream progress over SSE, and store the MP4 as a
// normal project asset so it can be referenced by later editing steps.
const genVideoMatch = url.pathname.match(/^\/api\/projects\/([^/]+)\/generate-video$/);
if (genVideoMatch?.[1] && m === 'POST') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

At startStudioServer()'s new /api/projects/:id/generate-video branch, the server-side flow is implemented but nothing in the Studio client calls it yet. packages/project-studio/public/app.js still only posts to /generate-audio and only handles audio_* SSE events, and a repo-wide search shows no fetch to /generate-video or handling for video_started / video_done. That means the feature described by this PR is still unreachable for Studio users even though the backend route exists. Please either wire this endpoint and its SSE events into the Studio UI in the same PR, or explicitly scope the change down to a backend-only API and adjust the feature/tests accordingly.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

@lefarcen lefarcen added the needs-product-review Product review required before merge label Jul 13, 2026
@octo-patch

Copy link
Copy Markdown
Author

Thanks for the review. I wired the Studio client to /generate-video, added SSE handling for started/progress/done/failed events, and added an inline MP4 preview for generated assets. I pushed commit 12211e0. I ran Node syntax checks, project-studio typecheck, core TypeScript typecheck, and minimax-video.test.ts (2 passed).

@lefarcen
lefarcen requested a review from nettee July 26, 2026 03:42
@lefarcen

Copy link
Copy Markdown
Contributor

Hey @octo-patch — catching up on the opened-path triage I missed earlier. Thanks for the PR, and thanks for pushing the 12211e0 follow-up with the Studio wiring; I’ve re-requested review on this updated head, and product review is also still in flight because this is now clearly a user-facing Studio feature.

💡 To drive this PR to merge hands-free, paste this to your AI coding agent (Claude Code / Codex / opencode / Cursor …):
Take over nexu-io/html-video#84 until it merges — read https://raw.githubusercontent.com/nexu-io/looper/main/skills/pr-takeover/SKILL.md and follow it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-product-review Product review required before merge risk/high High risk size/L Size L (300-699 LOC) type/feature Feature change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants