fix: remove wrong check causing new project to show old medias#341
Conversation
…imeline-ruler Optimize timeline performance
👷 Deploy request for appcut pending review.Visit the deploys page to approve it
|
|
@khanguyen74 is attempting to deploy a commit to the OpenCut OSS Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe early return condition in the Changes
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/web/src/app/editor/[project_id]/page.tsx (1)
59-59: Remove unused dependency from useEffect.The
createNewProjectdependency is no longer needed since it's not used in theinitProjectfunction. Removing it will prevent unnecessary re-renders.- }, [projectId, activeProject?.id, loadProject, createNewProject, router]); + }, [projectId, activeProject?.id, loadProject, router]);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/web/src/app/editor/[project_id]/page.tsx(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: simonorzel26
PR: OpenCut-app/OpenCut#324
File: apps/web/src/components/editor/timeline/timeline-content.tsx:9-34
Timestamp: 2025-07-17T08:22:10.460Z
Learning: User simonorzel26 prefers incremental refactoring approach: moving code first to reduce PR complexity, then cleaning up in separate single-responsibility PRs. This strategy prioritizes safety and manageable PR sizes over immediate perfect code structure.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build (windows-latest)
🔇 Additional comments (1)
apps/web/src/app/editor/[project_id]/page.tsx (1)
48-54: LGTM! The simplified error handling correctly addresses the bug.The removal of early returns and the simplified error handling that only redirects on "not found" errors is the correct approach. This prevents the creation of multiple projects and ensures that old project data doesn't leak into new projects.
…xist" This reverts commit d04aa8d.
Description
Currently, when we are inside a project, if we go back and create new project, the new project will still have medias and timeline of old project
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Test Configuration:
Screenshots (if applicable)
Before
Screen.Recording.2025-07-17.at.7.18.06.PM.mov
After
Screen.Recording.2025-07-17.at.7.18.31.PM.mov
Checklist:
Additional context
Add any other context about the pull request here.
Summary by CodeRabbit