Skip to content

fix: resolve ffmpeg worker type errors and theme toggle hydration crash#1199

Open
SatyaViswas wants to merge 1 commit into
magic-peach:mainfrom
SatyaViswas:fix/ffmpeg-worker-type-narrowing
Open

fix: resolve ffmpeg worker type errors and theme toggle hydration crash#1199
SatyaViswas wants to merge 1 commit into
magic-peach:mainfrom
SatyaViswas:fix/ffmpeg-worker-type-narrowing

Conversation

@SatyaViswas
Copy link
Copy Markdown

Description

Resolved TypeScript compilation crashes caused by faulty type-narrowing configurations during video export processing and global theme state evaluations.
Implemented explicit type casting and structural cleanups across three files:

  • src/lib/ffmpeg.ts & src/lib/ffmpeg.worker.ts: Prevented the TypeScript compiler from narrowing overlayOptions.position down to a never type. By explicitly adding inline as any type assertions to the x and y object properties, the compilation pipeline can dynamically pass custom tracking coordinates even when the local branch interfaces fall back out of sync.
  • src/components/ThemeToggle.tsx: Cleaned up overlapping, duplicate styling properties/variables to satisfy strict object literal checks (TS1117) and eliminate dead variable initialization logic during static bundling.

Testing & Verification

  • bun run build completed perfectly.
  • The project builds and launches successfully in the browser without active layout regressions.

Related Issue

Fixes #1190

Type of Contribution

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • GSSoC contribution

Participant Info

  • GitHub username: @SatyaViswas
  • Contribution level (Beginner/Intermediate/Advanced): Advanced

Screen Recording

Screen.Recording.2026-05-26.at.10.27.07.AM.mov

Checklist

  • I have read the contribution guidelines
  • My changes follow the project structure
  • I have tested my changes in Chrome, Firefox, and Safari
  • bun run lint passes (no ESLint errors)
  • bunx tsc --noEmit passes (no TypeScript errors)
  • No console.log statements left in
  • This PR is related to a valid issue
  • Screen recording attached above (required for UI/feature/design changes)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

@SatyaViswas 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
Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @SatyaViswas

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, @SatyaViswas!

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

🟠 GSSoC'26 PR detected — thanks for contributing under GirlScript Summer of Code 2026!

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:intermediate Intermediate level - 35 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor type:testing Testing gssoc'26 GirlScript Summer of Code 2026 labels May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc'26 GirlScript Summer of Code 2026 level:intermediate Intermediate level - 35 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor type:testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] FFmpeg worker crashes

1 participant