Skip to content

Fix ERD auto tab switching after generation completion#3596

Merged
NoritakaIkeda merged 1 commit into
mainfrom
devin/1758781279-fix-erd-auto-tab-switching
Sep 25, 2025
Merged

Fix ERD auto tab switching after generation completion#3596
NoritakaIkeda merged 1 commit into
mainfrom
devin/1758781279-fix-erd-auto-tab-switching

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Issue

  • resolve: route06/liam-internal#5709
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:

  1. onChangeSelectedVersion callback that switches to ERD tab (but only when activeTab === undefined)
  2. handleArtifactChange callback 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

  • Removed the activeTab === undefined condition from onChangeSelectedVersion callback
  • ERD tab switching now takes priority and always occurs when a new version is selected
  • This ensures ERD generation completion reliably switches to the ERD tab

Review Focus Areas

⚠️ Important: This change was not tested locally due to Supabase configuration issues in the dev environment.

Please verify:

  1. Timing behavior - Does this fix the specific ERD generation completion scenario as intended?
  2. User experience - Does unconditional ERD tab switching on version changes feel natural, or is it too aggressive?
  3. Edge cases - Are there other workflows where version changes happen that shouldn't force ERD tab switching?

Link to Devin run: https://app.devin.ai/sessions/57f87c6bffdb4a808131979e19a9641c
Requested by: tsuyoshi.hoshino@route06.co.jp

…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>
@vercel

vercel Bot commented Sep 25, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
liam-app Ready Ready Preview Comment Sep 25, 2025 6:58am
liam-assets Ready Ready Preview Comment Sep 25, 2025 6:58am
liam-storybook Ready Ready Preview Comment Sep 25, 2025 6:58am
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
liam-docs Ignored Ignored Sep 25, 2025 6:58am
liam-erd-sample Skipped Skipped Sep 25, 2025 6:58am

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot

changeset-bot Bot commented Sep 25, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a91c65d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@supabase

supabase Bot commented Sep 25, 2025

Copy link
Copy Markdown

Updates to Preview Branch (devin/1758781279-fix-erd-auto-tab-switching) ↗︎

Deployments Status Updated
Database Thu, 25 Sep 2025 06:55:01 UTC
Services Thu, 25 Sep 2025 06:55:01 UTC
APIs Thu, 25 Sep 2025 06:55:01 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Thu, 25 Sep 2025 06:55:08 UTC
Migrations Thu, 25 Sep 2025 06:55:13 UTC
Seeding Thu, 25 Sep 2025 06:55:13 UTC
Edge Functions Thu, 25 Sep 2025 06:55:13 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 activeTab was 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.

@NoritakaIkeda NoritakaIkeda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@NoritakaIkeda NoritakaIkeda added this pull request to the merge queue Sep 25, 2025
Merged via the queue into main with commit ddace58 Sep 25, 2025
33 of 34 checks passed
@NoritakaIkeda NoritakaIkeda deleted the devin/1758781279-fix-erd-auto-tab-switching branch September 25, 2025 07:21
@hoshinotsuyoshi

hoshinotsuyoshi commented Sep 25, 2025

Copy link
Copy Markdown
Member

Sorry! this could potentially break the erd/sql tab function 🙏
I'll investigate


edited: thx #3599

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants