Commit Graph

15 Commits

Author SHA1 Message Date
kemal.earth
5fe3383c39 feat(studio): remove query performance tabs (#38606)
* feat: remove tabs and unify columns

This removes the tabs from Query Performance with unified columns in the table.

* chore: remove unused imports

* chore: small adjustment to min max and mean time col size

* chore: remove unused prop
2025-09-11 15:20:52 +01:00
kemal.earth
1bb9453b0c feat(studio): update query performance table ui (#38523)
* feat: tidy up query perf column headers

* feat: update col widths and which ones are sortable

This gives a reasonable column width to all cols as well as adds an option for us to filter out which columns we dont want to make the table sortable by.

* feat: column order and word wrapping for query

* feat: column data text align for numbers

* fix: pointer event was preventing index advisor icon popover

* feat: use code block instead of editor

Swapped Editor out for Code block as its less expensive and modified it to add pgsql syntax highlighting

* fix: small truncation issue

* chore: remove unused sort function

* fix: sort menu closing on first click

Sort menu of a column no longer disappears on first click

* feat: move sorting and ordering over to nuqs

This removes the usage of Next Router params and uses Nuqs instead for managing the QP table sorting and ordering.

* feat: add clear sorting button to filter bar

* chore: remove unused files

* fix: add highlighting for selected sort

* Nit update sort

* nit: smol styling update for direction

* feat: inian feedback on time based numbers

* fix: return number instead of string for total time

We were returning a string for total time percentage which meant the sorting was a little bit off

* Shift roles to nuqs

* chore: clean up

* fix: smaller viewport filter bar

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-09-10 17:40:25 +01:00
kemal.earth
be994a1f62 feat(studio): simplify query performance filters (#38470)
* feat: remove redundant sort by

We had conflicting sort by dropdown which clashed with the individual column sorting itself. Either we do something similar to our table editor or leave it out for now. Opting to leave it out for now.

* fix: alignment of download dropdown

This aligns the download dropdown on the Query Performance page to look visually correct.

* feat: improved query search

This improves our query search in the Query Performance area. Now it does a local search through the available queries in the table. I removed it requesting the string from server for now. Simple

:x

q

* fix: increased width of filter popover

The roles filter popover is was too narrow for its contents. Increased teh size slightly.

* chore: remove commented out component

* chore: update placeholder for query filter

* fix: leftover prop on query performance page

* feat: reintroduce sql based query for search

Bringing back a hybrid approach - seems to work fine but also returns items that are not in your visible queries.

* feat: use debounce on search query

* feat: use nuqs instead of next router for roles

* Tiny optimization for debounced search to immediately run query if clearing input

* Add clear search CTA

* Remove client side searching

* Revert changes in useIndexInvalidation

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-09-09 12:18:32 +01:00
Taishi
97b631fff7 Add SQL syntax highlighting to Query Performance page (#38386)
* Add CodeBlock for SQL query display to add syntax highlight

* use monaco editor for better highlighting

* create `SqlMonacoBlock` component for SQL in detail panel

* add mean_time to most_time_comsuming queries

* make outline transparent

* Add keyboard navigation for query performance grid

* Stop default RDG behavior on arrow key navigation

* Update column minWidth values to remove horizontal scrollbar

* Load SqlMonacoBlock and Editor client-side only

- following a pattern in `SQLEditor.tsx`
2025-09-05 00:20:05 +00:00
kemal.earth
541c9f90cc fix(studio): query performance empty columns (#38437)
fix: query performance empty columns

The role and total time columns were not rendering the results that were there. Added a check to make sure they render.
2025-09-04 15:58:24 +01:00
Jordi Enric
a023a59ec5 fix crash in query performance (#37758)
* fix crash

* undo query perf

* fix crash
2025-08-08 09:55:01 +02:00
Jonathan Summers-Muir
2815dac7e0 Feat/index suggestions inline (#35107)
* init

* hovercard

* adds button to install index advisor

* hover card now now insert indexes

* update

* moved hook

* align alert dialog to design syste,

* Update index-advisor.utils.ts

* shows all index statements now

* Update query-performance.tsx

* Some refactors

* Clean up

* Fix

* One last nit refactor

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-05-07 19:09:58 +08:00
Alaister Young
e1eaa9844c fix: indexes in use (#33672)
* fix: indexes in use

* add error state for indexes in use

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-18 18:06:06 +08:00
Joshen Lim
ce6a432504 Remove 2dp for ms values in query performance advisor (#33472) 2025-02-10 15:36:14 +08:00
Joshen Lim
d586346e27 Chore/sentry fixes 211024 (#30003)
* Resolve https://supabase.sentry.io/issues/5808689343

* Fix SecurityStatus map key prop issue

* Fix FileExplorerHeader to use ButtonTooltip

* Fix https://supabase.sentry.io/issues/5998687405

* Fix https://supabase.sentry.io/issues/5414129652

* Fix https://supabase.sentry.io/issues/5414129652

* Fix map key issue in QueryPerformanceGrid

* Add whitelist error for sign up mutation

* Fix map key in DiskUsage

* Fix prop name in info-tooltip
2024-10-22 15:21:06 +08:00
Ivan Vasilov
09a62662d8 chore: Clean up ui-patterns imports (#29132)
* Switch all top-level imports for ui-patterns components to use specific components when importing.

* Remove the @ui-patterns shorthand since it works exactly the same without the @.

* More import fixes.

* Fix the ui-patterns tests.
2024-09-30 21:41:26 +02:00
Ivan Vasilov
05a542ccea chore: Migrate all feather icons to lucide icons (#29038)
* Add lucide-react to docs (to make the autocomplete work).

* Migrate the docs app icons.

* Migrate the ui-patterns.

* Remove the old icons from ui package.

* Migrate the www app from react-feather icons.

* Migrate all of studio icons.

* Migrate the only component in design-system.

* Fix an old import in ui package. Revert an import in docs app.

* Fix some pages in www.

* Remove unneeded files used in generation of icons.

* Fix a prettier error.

* Fix more issues in www.

* Fix an issue in Log Date picker.

* Replace all string sizes with number sizes because the icons grew in some cases.

* Fix more imports in security page.

* Fix an extra import.

* Remove the size prop from all icons if they're in a button and they match the button size.

* Minor fixes for docs and www.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-04 19:46:21 +08:00
Terry Sutton
6fa71c6c8e Chore/allow index advisor for postgrest queries (#27364)
* Run index advisor on postgrest queries

* Fix loading state
2024-06-20 17:47:30 +03:00
Joshen Lim
0d7137209c Chore/sentry fixes 280524 (#26828)
* UpgradeToPro remove project ref and org slug props

* Add check in Docs/ResourceContent

* Add conditional for accessing query property in QueryPerformanceGrid

* Add fallback value for lastPage in notifications-v2-query

* Simplify logic for finding api key in TerminalInstructions, EdgeFunctionDetails, [ref]/api/index

* Minor fixes and refactors

* Fix type issues
2024-05-31 10:52:18 +08:00
Ivan Vasilov
5cf8f30e23 chore: Remove obsolete flags (#22915)
* Remove showS3Connection flag.

* Remove showAnonUserFilter flag.

* Remove   enableVercelConnectionsConfig flag.

* Remove indexAdvisor flag.

* Remove queryPerformanceV2 flag.

* Remove unused files.

* Remove unneeded packages.

* Remove the v2 suffix from the query performance folder.
2024-04-22 09:38:41 +02:00