Skip to content

fix: resolve URL sync array corruption and btoa emoji crash#1480

Open
divyansha12 wants to merge 3 commits into
magic-peach:mainfrom
divyansha12:fix-url-sync-btoa-crash
Open

fix: resolve URL sync array corruption and btoa emoji crash#1480
divyansha12 wants to merge 3 commits into
magic-peach:mainfrom
divyansha12:fix-url-sync-btoa-crash

Conversation

@divyansha12

@divyansha12 divyansha12 commented Jun 1, 2026

Copy link
Copy Markdown

Hey @magic-peach

Description

This PR resolves two critical URL syncing and sharing bugs that resulted in data corruption and application crashes:

  1. URL Sync Data Corruption: Added an exclusion for textOverlays inside the useEffect URL auto-sync loop in useVideoEditor.ts. This prevents the complex array from being stringified into "[object Object]", pushing corrupt data into the browser URL and crashing the app upon refresh.
  2. Copy Link Emoji Crash (btoa failure): Updated the encodeRecipe and decodeRecipe methods to safely parse UTF-8 characters by wrapping the JSON string with encodeURIComponent and escape before passing it to btoa(). Replaced the direct btoa call in VideoEditor.tsx with the newly exported encodeRecipe utility, allowing users to safely share links containing emojis without triggering a fatal DOMException.

Related Issue

Closes #1468

Type of Contribution

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

Participant Info

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

Screen Recording

How to record: run bun run dev → open http://localhost:3000 → demonstrate the full working flow of your change, including any edge cases.

  • macOS: Cmd + Shift + 5 → Record Selected Portion, or use QuickTime Player
  • Windows: Win + G → Xbox Game Bar → Capture
  • Linux: OBS Studio, GNOME Screenshot tool, or kazam
  • Any OS: Loom (free screen recorder, great for sharing)

Recording / Loom link: [PASTE YOUR LOOM OR VIDEO LINK HERE]

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)
  • New interactive elements have aria-label / accessible names
  • 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

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

@divyansha12 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 1, 2026

Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @divyansha12

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 1, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @divyansha12!

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:beginner Beginner level - 20 pts type:bug Bug fix gssoc'26 GirlScript Summer of Code 2026 type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor labels Jun 1, 2026
@divyansha12

Copy link
Copy Markdown
Author

Hi @magic-peach, PR is ready for review. The build check is pending Vercel authorization from your side. Let me know if anything needs changing!

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:beginner Beginner level - 20 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Critical URL sync and sharing failures with Text Overlays (Data Corruption & btoa Crash)

1 participant