Fix ERD auto tab switching after generation completion#3596
Conversation
…tifact tabs - Remove activeTab === undefined condition from onChangeSelectedVersion callback - ERD generation completion now always switches to ERD tab regardless of current tab - Fixes race condition where artifact tab switching would override ERD tab switching - Resolves issue #5709 where ERD tab does not automatically switch after generation Co-Authored-By: tsuyoshi.hoshino@route06.co.jp <tsuyoshi.hoshino@route06.co.jp>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
|
Updates to Preview Branch (devin/1758781279-fix-erd-auto-tab-switching) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a race condition where the ERD tab does not automatically switch after ERD generation completion during Deep Modeling workflow. The issue was caused by conflicting tab switching mechanisms where the ERD tab switching was conditional on activeTab === undefined, allowing other tab switching logic to override it.
- Removes the conditional check that prevented ERD tab switching when
activeTabwas already defined - Ensures ERD tab switching always occurs when a new version is selected, taking priority over other tab switching mechanisms
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Sorry! this could potentially break the erd/sql tab function 🙏 edited: thx #3599 |
Issue
1.mov
Why is this change needed?
Fixes a race condition where the ERD tab does not automatically switch after ERD generation completion during Deep Modeling workflow.
The issue was caused by timing conflicts between two tab switching mechanisms:
onChangeSelectedVersioncallback that switches to ERD tab (but only whenactiveTab === undefined)handleArtifactChangecallback that switches to ARTIFACT tab (with no conditions)When ERD generation completes, both callbacks could fire, and the artifact tab switching would override the ERD tab switching due to the conditional logic.
Changes
activeTab === undefinedcondition fromonChangeSelectedVersioncallbackReview Focus Areas
Please verify:
Link to Devin run: https://app.devin.ai/sessions/57f87c6bffdb4a808131979e19a9641c
Requested by: tsuyoshi.hoshino@route06.co.jp