Skip to content

fix(gif): enforce 10s duration limit and active warning for GIF export (#1774) - #1811

Open
Tarulatapriya wants to merge 1 commit into
reframe-oss:mainfrom
Tarulatapriya:fix/gif-duration-limit
Open

Tarulatapriya wants to merge 1 commit into
reframe-oss:mainfrom
Tarulatapriya:fix/gif-duration-limit

Conversation

@Tarulatapriya

Copy link
Copy Markdown
Contributor

Closes #1774

Bug Description

FormatSelector's GIF description advertised "Animated image — keep clips under 10s", but the app never enforced or actively warned about this limit, allowing long videos to attempt massive GIF exports that would freeze the browser.

Changes Made

  1. Controller & State (src/hooks/useVideoEditor.ts):
    • Automatically clamps trimEnd to at most trimStart + 10s whenever GIF format is selected.
    • Automatically caps initial trimEnd to 10s when uploading a video >10s while GIF is selected.
    • Added validation in validateRecipe preventing export of GIF clips exceeding 10 seconds.
  2. UI Feedback (FormatSelector.tsx & TrimControl.tsx):
    • Added an active warning banner in FormatSelector when GIF is selected explaining the 10s constraint.
    • Clamped timeline handle dragging to 10s max in TrimControl when GIF format is active.
    • Added input validation in TrimControl preventing manual input of duration >10s for GIFs.
  3. Unit Tests (src/hooks/tests/useVideoEditor.test.ts):
    • Added unit tests verifying 10s trim clamping on format change and trim updates.

Validation

  • All 130 Vitest tests pass across 14 test suites.
  • bun run build / next build passes.
  • bun run lint passes with 0 errors.

@netlify

netlify Bot commented Oct 17, 2026

Copy link
Copy Markdown

👷 Deploy request for reframe-os pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit b283d10

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @Tarulatapriya!

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:intermediate Intermediate level - 35 pts type:bug Bug fix type:design UI/UX design labels Oct 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @Tarulatapriya

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 added the type:testing Testing label Oct 17, 2026

This branch has not been deployed

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

Labels

level:intermediate Intermediate level - 35 pts type:bug Bug fix type:design UI/UX design type:testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] GIF export doesn't enforce or warn about the "under 10s" limit its own UI advertises

1 participant