Skip to content

fix(studio): prompt on unsaved changes in foreign key selector#2555

Open
everettbu wants to merge 1 commit into
masterfrom
dnywh/fix/foreign-key-selector-dismissal
Open

fix(studio): prompt on unsaved changes in foreign key selector#2555
everettbu wants to merge 1 commit into
masterfrom
dnywh/fix/foreign-key-selector-dismissal

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of supabase/supabase#43888
Original author: dnywh


What kind of change does this PR introduce?

Bug fix. Resolves FE-2802. Fixes #43882.

What is the current behavior?

Second-level foreign key side panels in Table Editor can be dismissed while dirty without a discard confirmation. That makes accidental dismissal easy and is inconsistent with the shared dirty-form dismissal pattern from FE-2802.

What is the new behavior?

  • Adds DiscardChangesConfirmationDialog handling to ForeignKeySelector
  • Guards all selector close paths behind a local dirty-state check
  • Normalizes foreign key state so derived type metadata does not create false dirty prompts
  • Clarifies in modality.mdx that route-driven/page-unload flows should use a navigation guard rather than the dialog/sheet close guard
Dirty State Dialog
test  Table Editor  AWS Healthy  Toolshed  Supabase-D1EA9D5F-46EB-4DB5-830D-7CEF36A55B7E test  Table Editor  AWS Healthy  Toolshed  Supabase

Additional context

Includes a focused unit test for foreign key dirty-state normalization.

@github-actions

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  158 passed
skipped  5 skipped

Details

stats  163 tests across 20 suites
duration  3 minutes, 22 seconds
commit  ee8f661

Skipped tests

Features › assistant.spec.ts › AI Assistant › Can send a message to the assistant and receive a response
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

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.

2 participants