Skip to content

fix: reset all settings when new video file is uploaded#1189

Open
sudha09-git wants to merge 2 commits into
magic-peach:mainfrom
sudha09-git:fix/reset-settings-on-new-file-upload
Open

fix: reset all settings when new video file is uploaded#1189
sudha09-git wants to merge 2 commits into
magic-peach:mainfrom
sudha09-git:fix/reset-settings-on-new-file-upload

Conversation

@sudha09-git
Copy link
Copy Markdown
Contributor

Description

Related Issue

Type of Contribution

Problem

When a user uploaded a new video file without refreshing the page,
the previous preset selection, output settings, overlay settings,
and conversion state were still shown from the previous session.
This could cause users to unknowingly apply wrong settings to new files.

Changes Made

Only src/hooks/useVideoEditor.ts modified:

  • Reset recipe to DEFAULT_RECIPE on new file upload
  • Reset duration to 0
  • Reset overlayFile to null
  • Reset overlayPosition to "bottom-right"
  • Reset overlaySize to 150
  • Reset overlayOpacity to 100
  • Apply suggested preset based on new video dimensions
  • Clear previous result, error and status

How to Test

  1. Open the app
  2. Upload a video and select a preset (e.g. Instagram Square)
  3. Change brightness, speed, rotate settings
  4. Without refreshing, upload a different video
  5. Observe: all settings reset to default ✅
  6. Preset auto-suggests based on new video dimensions ✅

Type of Contribution

  • Bug fix
  • GSSoC contribution

Participant Info

  • GitHub username: sudha09-git
  • Contribution level: Beginner
  • Documentation update
  • Refactor
  • GSSoC contribution

Participant Info

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

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: ## 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
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

@sudha09-git 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

github-actions Bot commented May 25, 2026

✅ PR Format Check Passed — @sudha09-git

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, @sudha09-git!

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:performance Performance type:refactor Code refactor type:testing Testing gssoc'26 GirlScript Summer of Code 2026 labels May 25, 2026
@sudha09-git
Copy link
Copy Markdown
Contributor Author

Hi @magic-peach

This PR fixes issue #915 — re-uploading a new video file
now fully resets all previous conversion settings.

Changes made in src/hooks/useVideoEditor.ts:
✅ Reset recipe to DEFAULT_RECIPE on new file upload
✅ Reset duration, overlayFile, overlayPosition,
overlaySize, overlayOpacity to defaults
✅ Clear previous result, error and status
✅ Auto-suggest preset based on new video dimensions
✅ Build passing locally
✅ No conflicts with main

How to test:

  1. Upload a video → change preset, brightness, speed
  2. Without refreshing, upload a different video
  3. All settings reset to default ✅
  4. Preset auto-suggests based on new video ✅

Please review when you get a chance!

@sudha09-git
Copy link
Copy Markdown
Contributor Author

/PR Recheck

@sudha09-git
Copy link
Copy Markdown
Contributor Author

please approve this pull request
I am gssoc 2026 contributor

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:performance Performance type:refactor Code refactor type:testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Re-uploading a new video file does not reset previous conversion settings

1 participant