Skip to content

fix: resolve next.js production build compilation errors and worker type mismatches - #1509

Open
thakurakanksha288 wants to merge 4 commits into
reframe-oss:mainfrom
thakurakanksha288:fix/production-build-errors
Open

thakurakanksha288 wants to merge 4 commits into
reframe-oss:mainfrom
thakurakanksha288:fix/production-build-errors

Conversation

@thakurakanksha288

@thakurakanksha288 thakurakanksha288 commented Jun 2, 2026

Copy link
Copy Markdown

Description

This PR resolves several critical TypeScript compiler errors, ESLint accessibility blocks, and Webpack caching issues that were preventing the production build (npm run build) from completing successfully.

Changes Made

  • VideoPreview.tsx: Addressed ESLint jsx-a11y rules for interactive element tracking and matched the framing check to the correct strict "fill" | "fit" types.
  • ffmpeg.worker.ts: Implemented a fallback WorkerContext inline interface to bypass missing global DedicatedWorkerGlobalScope types without modifying global configuration scopes.
  • constants.ts & frame-export.ts: Unified the recipe data layer by updating legacy rotate property references to the typed rotation field.
  • textOverlay.ts: Addressed an optional fallback block by casting the overlay reference dynamically, and mathematically aligned the FFmpeg drawtext coordinates (tw/2, th/2) with the UI's center-origin layout.

Verification

  • Wiped the Next.js and Webpack disk caches cleanly.
  • Successfully ran npm run build with zero compilation errors.

closes #1409

@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

@thakurakanksha288 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 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @thakurakanksha288

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

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @thakurakanksha288!

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! 🎉

@github-actions github-actions Bot added level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design labels Jun 2, 2026
@thakurakanksha288

Copy link
Copy Markdown
Author

Hi @magic-peach,

Thank you for reviewing my PR. I noticed that the checks are currently showing "5 workflows awaiting approval" and the build status is still pending, while Vercel deployment requires authorization. Since external contributor workflows require maintainer approval, could you please approve the pending GitHub Actions workflows so the remaining checks can run?

Thank you for your time and support.

@thakurakanksha288

Copy link
Copy Markdown
Author

hi @magic-peach , kindly review this

@thakurakanksha288

Copy link
Copy Markdown
Author

hi @magic-peach, kindly merge this under the right labels

@magic-peach

Copy link
Copy Markdown
Collaborator

Hi @thakurakanksha288 — thanks for this, and sorry for the wait.

I'd like to get this merged, but it adds headers() to next.config.ts, which is silently ignored under output: "export".

To get it unblocked:

  1. move those headers into vercel.json instead

Could you take a look within the next 14 days? If I don't hear back by then I'll close it to keep the queue manageable — but you're very welcome to reopen it any time after that. Thanks again for contributing to Reframe 🙏

@magic-peach magic-peach added the status:changes-requested Maintainer asked for a specific fix label Aug 14, 2026
headers() is silently ignored under output: "export" (see CLAUDE.md).
The COOP/COEP headers this added already exist in vercel.json (and now
netlify.toml too) — this was dead code that would never actually apply.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5gqyU5QKQtLAza6hL6dXv
@netlify

netlify Bot commented Sep 15, 2026

Copy link
Copy Markdown

Deploy Preview for reframe-os failed.

Name Link
🔨 Latest commit dacd7c3
🔍 Latest deploy log https://app.netlify.com/projects/reframe-os/deploys/6aa989b6475fed0008867ef2

@magic-peach

Copy link
Copy Markdown
Collaborator

Made the specific fix that was asked for: removed the headers() block from next.config.ts — it's silently ignored under output: "export" anyway, and the same COOP/COEP headers it added already live in vercel.json (and now netlify.toml too), so this was dead code rather than something that needed relocating.

That said, this branch has drifted a long way from current main (a Next.js 16 upgrade and a lot of other work has landed since this was opened) — rebasing now touches 9 files with real conflicts in core logic (ffmpeg.ts, ffmpeg.worker.ts, useVideoEditor.ts, types.ts, text-overlay.ts), several of which look like they may already be fixed independently on main. That needs your own judgment on what's still needed vs. already superseded, not something I should guess at. Would you be up for rebasing onto current main and seeing what's actually left to fix? Happy to review once that's done.

magic-peach added a commit to Devangee20/reframe that referenced this pull request Sep 15, 2026
Resolved merge conflicts against current main (next.config.ts, package.json).
Along the way, fixed issues this PR's own changes introduced:

- next.config.ts: restored output: "export" (this branch had disabled it
  to work around headers() being ignored under static export — the correct
  fix, per earlier maintainer feedback on reframe-oss#1509's identical issue, is to
  drop the headers() block entirely since those COOP/COEP headers already
  live in vercel.json/netlify.toml, not to disable static export).
- layout.tsx: the merge left duplicate font/ErrorBoundary imports (one
  pointing at a redundant passthrough wrapper this PR added). Consolidated
  to the single real ErrorBoundary import.
- ExportSettings.tsx / VideoCompressor.tsx: the new Compress Video toggle
  and preset select had <label> elements not associated with their
  controls (jsx-a11y/label-has-associated-control) — added matching
  id/htmlFor pairs.
- ExportSettings.stories.tsx: this PR added a required videoFile prop to
  ExportSettings without updating its story, breaking typecheck. Supplied
  videoFile: null in the story's args.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5gqyU5QKQtLAza6hL6dXv
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 status:changes-requested Maintainer asked for a specific fix type:bug Bug fix type:design UI/UX design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

## Feature Request: Add Drag-and-Drop File Upload Area to Video Editor Interface

2 participants