Skip to content

feat: background rendering queue for exports #1304

Open
mrdeyroy wants to merge 1 commit into
magic-peach:mainfrom
mrdeyroy:feat/background-export-1253
Open

feat: background rendering queue for exports #1304
mrdeyroy wants to merge 1 commit into
magic-peach:mainfrom
mrdeyroy:feat/background-export-1253

Conversation

@mrdeyroy
Copy link
Copy Markdown

Description

This PR introduces a background rendering queue for video exports, resolving #1253. It unblocks the main editor UI during exports, allowing users to continue interacting with the app, change settings, or upload new files while FFmpeg processes videos in the background.

Closes

Closes #1253

Changes Included

  • Global Export Context: Implemented ExportQueueContext which acts as the single source of truth for all export jobs. It manages state globally rather than being tied to the editor lifecycle.
  • Floating Queue UI: Added ExportQueuePanel, a floating panel that tracks the progress of queued, active, completed, and failed jobs. Users can minimize/maximize this panel, cancel jobs, and download their finished videos directly from here.
  • Sequential Mutex Processing: FFmpeg jobs are now processed sequentially via a queue mutex. This ensures the browser does not run out of memory or crash the CPU by attempting parallel ffmpeg.wasm operations.
  • Decoupled Editor UI: Removed the blocking full-screen ExportOverlay and inline DownloadResult from VideoEditor.tsx.
  • Hooks Refactor: Cleaned up useVideoEditor.ts to no longer handle individual local export tracking, shifting responsibilities to the central queue manager.

How to Test

  1. Upload a video file into the editor.
  2. Hit the "Export" button. Observe that the main editor UI remains unlocked.
  3. Check the floating queue panel in the bottom right corner—it should accurately reflect the active export progress.
  4. Upload a second video and initiate another export while the first is running. Ensure the second job is added to the "Queued" list and begins strictly after the first one finishes.
  5. Once a job is complete, test the download button within the queue panel.
  6. Trigger an export and hit the cancel ("X") button in the queue to verify termination of the FFmpeg process.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@mrdeyroy is attempting to deploy a commit to the magic-peach1's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:refactor Code refactor type:testing Testing labels May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @mrdeyroy

Basic format checks passed. A maintainer will review your code changes.

This does not mean the PR is approved — it just means the format is correct.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @mrdeyroy!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

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

Labels

level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:refactor Code refactor type:testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Background Rendering Queue for Exports

1 participant