Fix:reset editor UI when creating a new project (#414)#427
Fix:reset editor UI when creating a new project (#414)#427Abubakar2105 wants to merge 2 commits into
Conversation
👷 Deploy request for appcut pending review.Visit the deploys page to approve it
|
|
@Abubakarashrafi is attempting to deploy a commit to the OpenCut OSS Team on Vercel. A member of the Team first needs to authorize it. |
|
""" WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ProjectStore
participant Editor
User->>ProjectStore: createNewProject()
ProjectStore->>ProjectStore: save new project
ProjectStore->>ProjectStore: reload project list
ProjectStore->>ProjectStore: loadProject(newProject.id)
ProjectStore->>Editor: update state with new project data
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 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
🧪 Generate unit tests
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 (
|
|
Clean fix! However, it looks like your file uses different line endings (CRLF). We're using LF, which is why the whole file shows as changed. You might want to look into that. |
dc251fd to
515e283
Compare
Description
This PR resolves an issue where, after creating a new project, the editor UI continued to show the previous project's content until a manual refresh.
The logic to load the newly created project (
loadProject(newProject.id)) already existed, but was not being invoked. This change simply calls the existing function after project creation to ensure the UI updates correctly.Fixes #414
Type of change
How Has This Been Tested?
Test Configuration:
Screenshots (if applicable)
N/A
Checklist:
Additional context
This doesn’t introduce new logic, just ensures existing
loadProjectis called when creating a new project, so the UI state aligns with the backend.Summary by CodeRabbit