Commit Graph

7 Commits

Author SHA1 Message Date
Charis 0433eeb5f5 feat(studio): mark sql provenance for safety (#45336)
Mark provenance of SQL via the branded types SafeSqlFragment and
UntrustedSqlFragment. Only SafeSqlFragment should be executed;
UntrustedSqlFragments require some kind of implicit user approval (show
on screen + user has to click something) before they are promoted to
SafeSqlFragment.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Editor and RLS tester show loading states for inferred/generated SQL
and include a dedicated user SQL editor for safer edits.

* **Refactor**
* Platform-wide SQL handling tightened: snippets and AI-generated SQL
are treated as untrusted/display-only until promoted, improving safety
and consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-04 13:08:06 -04:00
Charis 4a0bb36ca8 style: require sorted imports in studio/components (#44408)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-01 10:22:37 +02:00
Ali Waseem c39747f8b2 feat: added copy prompt button for AI assistant for your own agent (#42624)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Any instance where we want to ask the AI assistant, we create a copy
prompt button for your agent

## Demo


https://github.com/user-attachments/assets/c6afe319-ad36-49b7-a244-a8bf04c809a1



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Introduced a new dropdown-style AI assistant trigger across explain,
debug, and lint features with improved interaction flow.
* Added copy-to-clipboard functionality for AI prompts with visual
feedback confirmation.
* Enhanced AI assistant integration across query performance, SQL
editor, and lint detail interfaces for consistent experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-10 20:41:43 +00:00
kemal.earth 46cf0d37d8 fix(studio): explain tab scroll area and small improvements (#41713)
* fix: add extra slack to bottom of explain scroll area

* chore: match styling of total time to other inline stats

* feat: tidy up explain visualizer header for space

* fix: small syntax fix

* fix: divide instead of border bottom for rows
2026-01-05 15:39:24 +00:00
Ali Waseem 89e0fe4f28 feature: Explain tab in SQL editor that shows output of explain analyze (#41569)
* wip: explain tab in results editor

* updated to add sql explain

* updated to default back to results

* updated explain function

* updated case with multiple statements

* updated to reset explain query results

* added tests for semi colon comments

* feature: add explain w/ AI on pretty-explain tab (#41588)

* wip: added explain with AI

* wip: updated header with new buttons

* updated prompt

* remove any types

* removed unused flag

* updated header

* formatted code
2025-12-24 10:14:53 -07:00
Ali Waseem f867ddbe12 chore: update pretty explain to match the Figma designs a bit better (#41540)
* wip: updated UI and design for row renderer

* updated components

* wip: updated row count to remove useless estimates

* wip: updated colors for seq and index scans

* updated UI

* updated utility functions

* updated padding

* made circle smaller

* fixed breaking test
2025-12-22 13:17:19 -07:00
Ali Waseem 3a41846044 Feature: Pretty explain in SQL Editor (#41289)
* added cleaner explanation

* update UI

* refactored components

* updated logic

* removed steps

* updated UI

* updated read

* updated node render styles

* added tests

* updated file naming

* updated utility method

* updated description

* updated spacing

* updated to include header

* updated logic

* added flag to hide pretty explain

* updated cost width

* added aria label

* move index scan down

* updated to catch schema and qoutes

* remove node

* forgot the missed node

* addressed PR feedback

* updated bad slop

* removing tests

* updated node to be undefined, null remove it makes the logic cleaner

* updated function name

* updated row indicator to be separate components

* updated code rabbit feedback

* added divide by zero check

* updated test description
2025-12-12 20:35:18 +00:00