Commit Graph

896 Commits

Author SHA1 Message Date
Danny White
abc37edaa7 chore(studio): link directly to Postgres upgrade blockers (#41527)
* validation errors

* improvements

* deprecate notice bar

* consolidate upgrade warnings

* type fixes

* rabbit

* 📝 Add docstrings to `dnywh/chore/link-to-dropped-objects` (#41528)

* 📝 Add docstrings to `dnywh/chore/link-to-dropped-objects`

Docstrings generation was requested by @dnywh.

* https://github.com/supabase/supabase/pull/41527#issuecomment-3680610884

The following files were modified:

* `apps/studio/data/config/project-upgrade-eligibility-query.ts`

* New line

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>

* Use API types instead

* Update API types

* Add manage replicas CTA to upgrade warning if unified replication and project has replicas

* Nit

* use actionable language

* gap

* simplify

* prettier

* Add URL

* better links

* add tables and encode links

* remove replication link

* nit ordering

* rabbit

* Small simplify

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-01-26 12:50:18 +08:00
Charis
b7203bc349 fix(studio): use paginated buckets endpoint for command menu (#42080)
The command menu search option uses the unpaginated version of the
buckets endpoint, which times out / causes jankiness when users have
tends of thousands of buckets.

Switch to using the paginated version. The old behaviour is preserved,
where only the first 10 results are shown, and the user has to specify a
more specific search query to get other buckets. This is for UX
simplicity, since this is a convenience feature, and fully
infinite-loading search is available in the full Storage interface.
2026-01-23 15:18:44 +00:00
Joshen Lim
1536ee1064 Joshen/fe 2287 summary nodegraph in replication page (#42042)
* init

* Init 2

* Finalize

* bit more details in the summary graph

* Moreeee details

* Clean

* 🧹

* FIIIXX

* Fix rabbit

* Simplify long polling logic to only depend on database for destinations UI

* ADdress rabbit

* Address feedback
2026-01-23 17:59:52 +08:00
Joshen Lim
bddd04bbc6 Use new action runs endpoints (#41808)
* Use new action runs endpoints

* Clean up

* Nit

* Unify DiffEditors

* Fix TS

* Fix TS

* Fix merging
2026-01-23 15:29:02 +08:00
Charis
d34cc65e30 fix(studio): handle large cron.job_run_details table gracefully (#41992)
* fix(studio): check job_run_details size in cron display

When cron.job_run_details grows too large (200k+ rows), loading the
cron jobs overview can timeout and affect other queries by pulling
excessive data into shared buffers.

This change:
- Estimates table size using pg_stat before fetching cron jobs data
- Shows a cleanup notice when the table exceeds the threshold
- Provides batched deletion using ctid ranges to avoid buffer pollution
- Allows scheduling an automated daily cleanup cron job
- Handles timeout errors gracefully with a "suspected overflow" state

The useCronJobsData hook now returns a discriminated union status that
tracks loading, estimate-error, overflow-confirmed, overflow-suspected,
and ready states, allowing the UI to respond appropriately to each case.

* fix(studio): use index when querying cron.job_run_details

cron.job_run_details is only indexed by runid, not by start_time. Change
the query to use the runid index (which gives the same result, since
runid is auto-incrementing).
2026-01-22 11:17:49 -05:00
Joshen Lim
f293036ec7 Add UX guardrails for edge functions RE unsaved and unimported files (#41921)
* Add UX guardrails for edge functions RE unsaved and unimported files

* useLatest on hasUnsavedChanges

* Remove checking of unimported files + add VS code like indicator for modified and unsaved files

* Nit

* Fix TS

* Fix

* nit

* Fixes

* Nit

* move hasUnsavedChanges on demand

* code rabbit nit

* code rabbit nit 2

* prettier

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-01-22 13:31:28 +08:00
Ali Waseem
9e1df69853 fix: handle errors better in index advisor (#42043)
* fix: handle errors better in index advisor

* added admonition
2026-01-21 11:11:39 -07:00
Andrey A.
21e9d07dea fix: skip incident status query for CLI and self-hosted (#41972) 2026-01-20 10:07:49 -07:00
Ignacio Dobronich
485dff74e3 chore: project scoped roles entitlement (#41587)
* chore: project access entitlment

* typegen
2026-01-20 22:00:11 +09:00
Pamela Chia
90fbf041ce feat(studio): add cached egress quota violation label (#42000)
feat(usage): add cached egress quota violation label
2026-01-20 14:16:45 +07:00
Joshen Lim
3b7bba9a9a Add read replicas details page from database replication (#41784)
* Add read replicas details page from database replication

* Clean

* Address 🐰

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2026-01-19 13:44:41 +08:00
Peyton Nowlin
bf250547f6 fix: correct typos across codebase (#41038)
- Fix 'occured' -> 'occurred' in ErrorDetailsButton.tsx

- Fix 'requried' -> 'required' in storage bucket mutations

- Fix 'reponse' -> 'response' in API spec files

- Fix 'localy' -> 'locally' and 'depoy' -> 'deploy' in README

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-01-15 05:15:18 +00:00
Joshen Lim
2e7b968b1c Fix Auth OAuth apps request error if oauth server has not been configured (#41870)
* Fix Auth OAuth apps request error if oauth server has not been configured

* Clean up
2026-01-14 09:31:03 +07:00
Charis
718fa372d4 fix(studio): functions egress not showing in daily breakdown chart (#41848)
The daily breakdown chart doesn't show functions egress because the key
we're looking for doesn't match the key being sent by API.
2026-01-12 03:52:21 -05:00
Joshen Lim
b867dd73bb Update FDW type for server_options to be nullable and fix TS issues (#41811) 2026-01-09 17:33:35 +08:00
Pamela Chia
2346baf51c chore(telemetry): standardize event naming conventions (#41786)
* docs(telemetry-constants): add naming conventions and review note

* refactor(telemetry): rename event interfaces to include Event suffix

* refactor(telemetry): rename branch merge success event to completed

* refactor(telemetry): rename cron job deleted event to removed

* refactor(telemetry): rename events to submitted/completed

* docs: add previous event names to telemetry comments
2026-01-08 17:11:48 +07:00
Saxon Fletcher
0dab4d93fe Enable or disable Data API access per table (#41218)
* feat(studio): add mutation to update table access privileges

Adds a mutation to update table grants for `anon` and `authenticated`
roles.

* feat(studio): add data api toggles

Add toggles to the Table Editor, allowing fine-grained grants to the
anon and authenticated roles.

* fix(studio): don't show rls policies warning if table not exposed

RLS policies warning was showing in Table Editor side panel even if
table was not exposed due to no grants to anon/authenticated.

* fixup! feat(studio): add data api toggles

* fixup! feat(studio): add data api toggles

* fix(studio): revalidate rls lints when table grants are toggled

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2026-01-07 12:12:15 -05:00
kemal.earth
dca74177c8 feat(studio): stacked bars by default on db reports (#41741)
feat: stacked bars by default on db reports
2026-01-07 12:15:39 +00:00
Riccardo Busetti
1238a19fe4 feat(etl): Expose more configuration parameters (#41758)
* feat(etl): Expose more configuration parameters

* Nit nudges

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-01-07 15:36:32 +08:00
Saxon Fletcher
81098b2926 Event triggers (#41657)
* event triggers

* rename to event

* fixes

* fixes

* template

* use supabase roles instead

* useMemo array operations

* use blank as default

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2026-01-07 09:12:10 +10:00
Riccardo Busetti
d795240928 feat(etl): Add integration with new validation endpoint (#41731)
* feat(etl): Add integration with new validation endpoint

* Fix

* Fix

* Fix

* Fix

* UI nudges + clean up + refactors

* Fix TS

* Sort issues

* Small improvement

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-01-07 00:32:08 +08:00
Riccardo Busetti
c62cd07b86 feat(etl): Implement batch rollback (#41552) 2026-01-06 04:13:25 +01:00
Saxon Fletcher
d2f4e808e5 Filter pattern refactor (#41545)
* filter refactor

* update tests

* prettier

* fix ts

* remove filter preview

* Filter bar in table editor behind flag (#41546)

filter bar in table editor behind flag

* fixes

* ts fix

* filter v1 refactor

* rename helpers

* unmount timeout

* fixes

* fix

* more
2026-01-06 08:04:28 +10:00
Joshen Lim
a88c88fa36 Hide RLS disabled CTA in table editor header if no lints (#41517)
* Hide RLS disabled CTA in table editor header if no lints

* Clean

* Update e2e tests

* INvlidate lints when creating tbale

* Revert

* Invalidate lints when duplicating table
2026-01-05 12:14:19 +07:00
Ivan Vasilov
f9cbf661ca fix: Fix a bug in Edit FDW sheet (#41685)
* Add types to the getDecryptedValues function.

* Refactor the edit-wrapper-sheet to fetch the secrets by id, instead of name.

* Add try/catch for the secret values fetching.

* Minor CodeRabbit nitpicks.

* Small improvement for types in EditWrapperSheet

* Small fix for WrapperRow icon space issue hiding ChevronRight

* Update comment

* Only fetch encrypted IDs if value is a valid UUID

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-01-05 12:00:49 +07:00
Aditya kumar singh
30fd0087ae fix(auth-config): invalidate lint cache on update to dismiss stale Pe… (#41652)
* fix(auth-config): invalidate lint cache on update to dismiss stale Performance Advisor warnings

* Do the invalidations in parallel.

* Fix prettier error.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-01-02 12:36:26 +00:00
Ali Waseem
b6874ff76d fix: update to rollback and changes with insert,update or delete on pretty explai (#41651)
update to rollback and changes with insert,update or delete
2025-12-30 09:29:38 -07:00
Danny White
c2231301e0 chore(studio): improve HeaderBanner (#41525)
* design polish

* better banner

* defensive truncation

* better incident banner

* better prop names

* improve warnings

* fix variant

* OrganizationResourceBanner

* notice banner

* improve ClockSkewBanner

* add ARIA label

* rabbit

* lil dot

* 📝 Add docstrings to `dnywh/chore/improve-header-banner` (#41526)

* 📝 Add docstrings to `dnywh/chore/improve-header-banner`

Docstrings generation was requested by @dnywh.

* https://github.com/supabase/supabase/pull/41525#issuecomment-3680124020

The following files were modified:

* `apps/studio/hooks/misc/useOrganizationRestrictions.ts`

* new line

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>

* fix clock docs link

* Small nits

* Fix URL for grace period warning to point to usage instead of billing

* rabbit

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-29 15:16:10 +11:00
issuedat
115ca3a2e3 feat(auth): improved user search (#41199)
* feat(auth): improved user search

* chore: fix types for columns

* feat: cursor-based pagination

* chore: remove trigram indexes in favour of b-tree
2025-12-24 12:24:43 +01:00
Matt Linkous
0e2c31bf60 feat: Stripe Sync Engine integration (#41317)
* add initial installation flow of stripe sync engine

* update docs link

* Add supabase_vault extension dep

* Add stripe logo to sync engine integration

* Move overview content to bottom of integration pages

* Add sync state to stripe sync page

* only check sync state if stripe integration is installed

* Use proper stripe-sync package and setup flows

* Improve sync engine installation ux

* Remove unused hardcoded dep

* Add alpha status to stripe sync engine integration

* fix typo

* run format

* fix types

* Rename the stripe-sync path to remove the 'integration". The path needs to have BASE_PATH to work on prod.

* Design tidy up (#41337)

UI tidy up

* update to latest sync engine package

* Add stripe key verification

* Remove noop try/catch

* Add integration isntallation telelemtry

* Add basic settings page

* Address coderabbit comments

* remove unused dep

* Remove state setting on render

* s/description/comment

* Cleanup settings screen UI

* Improve settings screen design

* update schema test snapshot

* Use latest stripe-sync-engine package

* Update repo url to new official location

* revert marketing change

* Update stripe sync engine package

* Add link to table from overview page

* Add feature flag and improve telemetry

* Fix missing useMemo dep

* add uninstall telemetry note

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
2025-12-20 00:42:10 +00:00
Joshen Lim
cbeb0912a2 Joshen/fe 2195 rework project api overview section with connect button (#41485)
* Update API keys panel

* Dnywh/chore/fe 2195 design pass (#41484)

* first pass

* fancy

* fixes

* text

* lang

* lang

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>

* Clean up

* Clean

* Nit

* Update enabled features

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2025-12-19 16:51:58 +08:00
Danny White
f0acececce feat(studio): incident notice on support ticket creation (#41379)
* callout

* progress

* plural issues

* better handle multiple issues

* refactor

* remove fancy copywriting

* return IncidentAdmonition to support form page

* progress

* cleanup

* rabbit

Potential control flow issue: execution continues after handleError when data is undefined. When a non-401 error occurs, handleError(error) is called but execution continues to line 24 where data is accessed. If handleError doesn't throw, this will cause a runtime error accessing (data as any).is_healthy on undefined. Additionally, the as any cast on line 24 violates the coding guidelines. Consider validating the response shape instead.

* animate in

* fix

* reset

* remove unused dayjs

* rabbit

* rabbit

* fixes from code review

* rabbit

* rabbit

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-12-19 00:28:02 +00:00
Charis
1d49e9e954 feat(studio): show icon on tables exposed by data api (#41416)
* feat(studio): show icon on tables exposed by data api

Show an icon in the Table Editor for tables that are exposed via the
Data API.

* refactor(studio): move table api access query up to parent

* fix(studio): invalidate table privileges query on table create

* fix(studio): make RLS disabled warning on table editor more obvious

Change from warning -> danger

* Only show add foreign key in side panel if isSuccess

* chore(studio): put data api exposed badge behind feature flag

Only show badge for now if flag `dataApiExposedBadge` is enabled.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-18 16:50:26 +00:00
Ivan Vasilov
01c6b56a7c feat: Add disabled state for PostgREST (#39625)
* Fix the type for the project service status query.

* Fix the statuses math in ServiceStatus for services health.

* Minor fixes.

* Fix minor type issues.
2025-12-18 16:00:20 +00:00
kemal.earth
1e84d28c81 feat(studio): filter out internal schemas from index advisor (#41428)
* feat: prototype of filtering out internal schemas from index advisor

* chore: coderabbit suggestion

* chore: use zod for ia schema
2025-12-18 13:24:18 +00:00
Joshen Lim
31d2e8ac5b Shift ETL destination components into a separate folder (#41457)
* Shift ETL destination components into a separate folder

* Small fix
2025-12-18 18:55:07 +08:00
Ivan Vasilov
a36b65e7a3 fix: Refactor all Table Editor links to include sorts and filters (#41075)
* Possible solution with building the URL from local storage.

* Refactor the local storage for tabs to use table ids.

* Fix the saving table state to local storage.

* Minor fixes.

* Open the correct schema when following the link.

* Minor fixes from CodeRabbit.

* Address charis' feedbacks

* Clean

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-18 10:21:09 +01:00
Andrew Valleteau
38176b82a3 feat(studio): setup soft-delete and easy branch restore (#40353)
* wip: branch deletion grace period

* fix: allow to force delete pending

* fix: update for staging

* fix: typo

* fix: revert soft-delete by default

* chore: revert branch-delete-mutation changes

* fix: revert platform.d.ts changes

* fix: use INVALID status as distinguisher

* fix: hide unusable options

* fix: apply review suggestion

Co-authored-by: Ali Waseem <waseema393@gmail.com>

* updated formatting

* fix: lint

* fix: react v5 update

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2025-12-18 12:14:52 +08:00
Stephen Morgan
48b372d29b Feature/private link (#41094)
* privatelink integration

* mock queries

* add integration endpoints

* poll for updates on transition states

* prevent ui for multiple posts

* changes to copy for existing accounts

* update privatelink documentation

* hide privatelink for customer under Team plan

* added connected state tip

* linting fixes

* fixed issue due to merge

* Add cc feature flag

* Nit clean up

* Small revert

* Nudge UI a little

* Update react queries to fit new structure

* Fix

* Clean up

* nit

* revert padding

* Fix

* fix: tanstack changes

* added feature to pricing page

* Update apps/docs/content/guides/platform/privatelink.mdx

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: dropdown copy change

* Update apps/docs/content/guides/platform/privatelink.mdx

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>

* Update apps/docs/content/guides/platform/privatelink.mdx

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>

* Smol clean up

---------

Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2025-12-18 07:28:38 +13:00
Joshen Lim
0c2f44d0b8 Remove use of useQueryStateWithSelect for auth users (#41380)
* Remove use of useQueryStateWithSelect for auth users

* Address code rabbit
2025-12-17 14:35:52 +08:00
Charis
000c79e22b fix(studio): rework global storage size validation (#41378)
The global storage size validation depends on an unpaginated buckets
query to determine whether it is lower than any individual bucket's
cutoff. This causes a problem for users with tens of thousands of
buckets.

There's a bit of a UX/performance problem here, because in order to
determine whether any bucket's `file_size_limit` exceeds the global
setting, we need to get the max `file_size_limit` of `storage.buckets`
-- however, that column is not indexed.

My workaround is:
- Below a certain threshold (10,000) buckets, the query for max
`file_size_limit` is automatically run on form submit.
- Above that threshold, the user must confirm whether they want to run
the query. They're still allowed to change the storage config without
running it -- this does open a loophole where they can have a global
storage setting lower than an individual bucket's file size limit, but
though this is a potentially confusing situation, it's not strictly an
error.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-16 09:02:31 -05:00
Ivan Vasilov
5fb5acc0b9 chore: Refactor the generation of ids for snippets (#41264)
* Add a generateDeterministicUuid function and tests for it.

* Use the new function and generate an id automatically when creating a snippet.

* Clean up extra code.

* Don't pass in id when creating a snippet.

* Add generateSnippetTitle function and use it instead of fixed string.

* When SQL editor is open, generate an id form a generated snippet title.

* Add id override for SQL editor to avoid flash when saving the snippet.

* Merge the two generate functions to happen in the same useMemo block.

* Save the snippet to the API when adding it.

* Minor fixes from CodeRabbit review.

* Hide new folder CTA in sql editor for self-hosted

* Don't add the snippet for saving, just set the value.

* UpsertContentPayload always has an id.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-16 09:43:59 +01:00
Joshen Lim
34b5e0bf07 Fix deleting a user shows User not found toast error (#41339) 2025-12-15 07:42:08 -07:00
Joshen Lim
84e5df97ea Fix log drains error handling (#41343) 2025-12-15 21:13:36 +08:00
Joshen Lim
27188c147c Support creating multiple publishable keys, and deleting publishable keys (#41186)
* Support creating multiple publishable keys, and deleting publishable keys

* FIx types

* Smol

* Smol fix

* Address issues

* Update comment

* Replace all usage of useApiKeysVisiblity for checking permissions to just call useAsyncCheckPermissions directly

* Clean up and deprecate useApiKeysVisibility hook

* ADdress
2025-12-12 16:07:36 +08:00
Joshen Lim
77944aca9a Decouple foreign schema creation from vector buckets (#41258)
* Decouple foreign schema creation from vector buckets

* Clean up

* Fix ts

* Fix issues
2025-12-12 14:42:56 +08:00
Saxon Fletcher
9f3af6e502 Generate policies experiment (#40881)
* policy generation

* add ai

* refactor

* table create performance

* policy list

* style

* simplify

* refactor

* flag

* tracking

* track

* ts

* fixes

* connection string

* re-add rls and realtime toggle

* restore old logic

* base path

* badge

* false rls

* copy

* add permissions button

* Refactor based on comments

* Fix TS

* More nudge

* Update tests

* Fix test

* Fixx

* Fix

* Address feedback

* Address issues

* Improve experiment telemetry for generate policies A/B test (#41172)

* Address code rabbit catch

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Sean Oliver <882952+seanoliver@users.noreply.github.com>
2025-12-12 12:44:11 +08:00
Joshen Lim
511229f7a6 Fix creating users not invalidating users list and count (#41254) 2025-12-11 11:06:06 -07:00
Ivan Vasilov
581ae07120 fix: Hide favourites and share snippets on self-hosted variant (#41227)
* Hide favorite and share actions for self-hosted version.

* Rename the query on save only on platform.

* Simplify useCheckOpenAiKeyQuery.

* Rename with AI now depends if the OPENAI_API_KEY is set.

* Minor fixes.

* Fix the tests to use .skip for skipping tests. Remove extra port params.

* Make the test for favourites work only on platform variant.
2025-12-10 10:12:15 -07:00
Ali Waseem
e7a4ca9b74 Feature: show index advisor in table editor (#41166)
* added table advisor query

* updated to include table editor performance

* updated JSON B

* added side panel

* updated query indexes to show highlights context

* show index advisor in table editor

* updated invalidation logic

* added color updates

* added query indexes

* updated query performance type

* updated overflow and title

* put behind flag

* remove gap

* added on close

* Update apps/studio/data/database/table-index-advisor-query.ts

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* updated styling

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-12-10 09:28:45 -07:00