Repository navigation
chore(studio): simplify sql editor warning dialog - #45912
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesAlertDialog Refactoring
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
This comment has been minimized.
This comment has been minimized.
🎭 Playwright Test ResultsDetails
Flaky testsFeatures › table-editor.spec.ts › table editor › add enums and show enums on table Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/studio/components/interfaces/SQLEditor/RunQueryWarningModal.tsx`:
- Around line 178-183: The primary button label logic in RunQueryWarningModal is
incorrect: change the condition that chooses the primary AlertDialogAction label
(currently based only on hasMissingRLS) to require both hasMissingRLS and
onConfirmWithRLS so the label only becomes "Run without RLS" when the
alternative "Run and enable RLS" is actually offered; update the conditional
used for the primary AlertDialogAction (and ensure confirmationCopy uses the
same combined condition) and reference AlertDialogAction, handleConfirm,
handleConfirmWithRLS, hasMissingRLS, onConfirmWithRLS, and confirmationCopy when
making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: e7afbb52-6e2d-4e80-8482-76d98163d64a
📒 Files selected for processing (1)
apps/studio/components/interfaces/SQLEditor/RunQueryWarningModal.tsx
Braintrust eval report
|
What kind of change does this PR introduce?
Studio UI cleanup.
What is the current behaviour?
The SQL editor query warning modal repeats itself with an admonition, a nested warning panel, and extra confirmation copy. Single-warning cases are harder to scan than they need to be.
What is the new behaviour?
The warning now uses
AlertDialogand resolves each detected issue into concise title/body copy. Single-warning cases show one short description, while multi-warning cases show a compact list. The existing RLS actions are preserved.Testing instructions
Manual SQL editor checks:
Open the Studio SQL editor, paste each snippet, click Run, verify the warning copy, then click Cancel. These snippets are only intended to trigger the warning UI, so do not confirm the dangerous ones.
Destructive operation warning:
UPDATE without WHERE warning:
Prevent database connections warning:
Missing RLS warning:
Multiple issues warning:
Additional context
Summary by CodeRabbit
Bug Fixes
Refactor
Tests