Commit Graph

865 Commits

Author SHA1 Message Date
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
Ivan Vasilov
0d5be306ef chore: Bump React Query to v5 (#40174)
* Bump the deps, refactor deprecated code.

* Migrate keepPreviousData usage.

* Migrate all uses of InfiniteQuery.

* Fix refetchInterval in queries.

* Migrate all use of isLoading to isPending in mutations.

* Fix accessing location in claim-project.

* Fix a bug in duplicate query keys.

* Migrate all queries to use isPending.

* Revert "Fix accessing location in claim-project."

This reverts commit 2a07df64b5.

* Revert the rss.xml file to master.
2025-12-10 10:10:29 +01:00
Charis
9225eebccb feat(studio): use bucket pagination for api docs (#41090)
* feat(studio): use bucket pagination for api docs

API docs V2 updated to use pagination for fetchign storage buckets.

Also some refactoring to split up large components for docs V2
interfaces.

* fix(studio): use bucket endpoint for getting single bucket
2025-12-09 13:17:59 -05:00
Jordi Enric
434634f59f fix(reports): update disk metrics (#41108)
* update docs

* update composedchart to accept bytes per sec

* handle bytes per sec

* update charts
2025-12-09 18:08:32 +01:00
Joshen Lim
9c244df9f1 Add columns to database indexes UI (#41152)
* Add columns to database indexes UI

* Nit

* Update codeowner
2025-12-09 22:27:23 +08:00
Kevin Grüneberg
6b2d789284 chore: use simplified support form for platform orgs (#41177)
* chore: use simplified support form for platform orgs

* Nit

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-09 12:57:04 +08:00
Ignacio Dobronich
69dde81f88 chore: entitlements feature catalog (#41107)
* chore: entitlements feature catalog

* Forgot to save

* Matched keys to backend keys

* Schema

* Simplified

* Restored

* Restore

* Done

* import
2025-12-08 17:27:37 -03:00
Charis
8e705ecdbc fix(export all rows): use cursor pagination if possible (#40536)
Exporting all rows (in CSV, SQL, or JSON format) currently uses offset pagination, which can cause performance problems if the table is large. There is also a correctness problem if the table is being actively updated as the export happens, because the relative row offsets could shift between queries.

Now that composite filters are available in postgres-meta, we can change to using cursor pagination on the primary key (or any non-null unique keys) wherever possible. Where this is not possible, the user will be shown a confirmation dialog explaining the possible performance impact.

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-08 13:39:10 -05:00
Kamil Ogórek
762bdfa741 ref: Remove unused queries/mutations (#41163) 2025-12-08 18:39:05 +01:00
issuedat
cb25d2383a feat(auth): allow opting in to creating indexes on auth.users (#40955)
* feat(auth): allow opting in to creating indexes on `auth.users`

* chore: organize imports. use alert above table.

* chore: use default type to avoid 2 primary actions
2025-12-08 10:42:18 +01:00
Lakshan Perera
16e03f0de4 fix: use deno2 entrypoint when it's available (#41149) 2025-12-08 15:06:55 +08:00
Ivan Vasilov
26b469894d fix: Refactor the foreign tables query to use FE pg-meta (#41077)
Refactor the foreign tables query to use FE pg-meta.
2025-12-04 18:36:14 +01:00
Raúl Barroso
09df6e8373 refactor: infra queries to use attributes (#41018)
* refactor: infra queries to use `attributes`

This PR refactors the infrastructure monitoring query code reducing duplication and unifying the API request to always be `attributes`:

•  Removed the separate useInfraMonitoringQuery hook and getInfraMonitoring function that handled a single monitoring query
•  Consolidated all infrastructure monitoring queries into a unified useInfraMonitoringAttributesQuery hook that handles multi-attribute requests
•  Moved interval selection logic from the query layer to the consumer (InfrastructureActivity.tsx), where it can be computed dynamically based on user-selected date ranges
•  Simplified query types by removing intermediate InfraMonitoringData and InfraMonitoringVariables types
•  Interval is now computed in the component (defaults to 1d, switches to 1h for date ranges ≤48 hours) rather than hardcoded in the query layer
•  All queries now use the unified multi-attribute endpoint with explicit parameter passing

* fix: handle single-attribute response format
2025-12-04 16:16:12 +01:00
Kevin Grüneberg
915a08812d feat: support new platform plan (#40890) (#41046)
Forward compatible changes to support new platform plan (similar handling to Enterprise)
2025-12-04 17:31:27 +08:00
Joshen Lim
de50740b04 Chore/request upgrade plan modal (#40889)
* init request upgrade plan modal

* Consolidate UpgradeToPro components across UI + use UpgradePlanButton, UpgradePlanButton determines whether to show request upgrade CTA

* Allow to pass icon to Admonition

* Tiny fix on upgrade plan button CTA to consider addons

* Hook up upgrade request endpoint

* Update API types

* remove hardcode

* Add request upgrade CTA in plan side panel

* Fix disk compute

* Show request upgrade button for change to large compute

* Nit
2025-12-04 16:02:01 +08:00
Jordi Enric
0d95b4f9c4 feat(reports): add request country map (#40903)
* wip

* move map to file, fix projection

* fix

* support micro countries

* cleanup code, add tests, improve theming

* remove border on hover

* fix theme detection

* fix query

* update map json to simplify code

* formatting

* make active color opacity based

* fix names

* rm flaky test

* rm comment

* Update apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add missing import

* rename

* validate error safely

* undo tsconfig change

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-03 20:59:02 +00:00
Lakshan Perera
380dfbc91d Increase the max file size for Functions code editor to 20MB (#41005)
fix: increase max file size in function code editor to 20mb
2025-12-04 05:23:56 +11:00
Charis
73c834001c feat(storage): use pagination for storage bucket list (#40695)
The bucket list endpoint now accepts pagination options. Adapting the
storage buckets table UI to paginate in pages of 100 buckets at a time,
with infinite loading/scrolling.
2025-12-03 13:16:40 -05:00
Ali Waseem
8ea734eaa2 fix: bucket delete wait for all files to be deleted (#40992)
* added utility poll function

* fixed unit test

* updated error message
2025-12-03 07:46:27 -07:00
Div Arora
999e7ab11b chore: rename internal repo (#41003)
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-03 15:39:54 +08:00
Joshen Lim
888b1794c6 Revert "feat: support new platform plan" (#40980)
Revert "feat: support new platform plan (#40890)"

This reverts commit ae4fe1b740.
2025-12-03 10:41:53 +08:00
Joshen Lim
bc12d796ed Patch org audit logs (#40981)
* Patch org audit logs

* patch account audit logs
2025-12-02 23:05:20 +08:00
Joshen Lim
27e89ed64e Analytics bucket support creating bucket tables in dashboard (#40858)
* Midway

* Hook up create/delete table, and update all iceberg RQs with mgmt API routes

* Add insert data CTA, update create table logic for decimal and fixed types

* Clean up

* Nit

* Fix test
2025-12-02 22:17:13 +08:00
Raúl Barroso
7860dad841 fix: organization usage page (#40956)
* fix: organization usage page

Fixes https://linear.app/supabase/issue/API-759/egress-graph-does-not-change-when-filtering-by-project

* test: org usage
2025-12-02 14:37:24 +01:00
Kevin Grüneberg
ae4fe1b740 feat: support new platform plan (#40890)
Forward compatible changes to support new platform plan (similar handling to Enterprise)
2025-12-02 15:35:39 +08:00
Eduardo Gurgel
206512d5a4 fix(studio): realtime metrics (#40824)
* Connected clients is now showing the number of connections at the time. 
* Broadcast events 
* Presence events 
* Postgres changes events
* Rate of Channel joins (unchanged)
* Message payload size : median of payload size 
* Broadcast From Database Replication Lag:  median replication from commit to broadcast
* (Read) Private Channel Subscription RLS Execution Time: median time RLS execution to subscribe
* (Write) Private Channel Subscription RLS Execution Time: median time RLS execution to publish
2025-11-28 10:44:32 +13:00
Ali Waseem
58a4e73650 Fix: small Sentry error for undefined value (#40874)
fix sentry error
2025-11-27 17:29:58 +00:00
Saxon Fletcher
9d66964b62 table create performance (#40857)
* table create performance

* test

* Clean up + refactor

* Nit housekeeping

* Minor housekeeping again

* Fix

* Fixy

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-27 20:27:19 +08:00
Ivan Vasilov
d33fdcb4f2 fix: Refactor the temp API keys creation for oAuth Server apps (#40849)
* Remove the query for temp keys. Remove the query for supabase client. Add a function which creates a supabase client with a temp key.

* Add a new query for building the endpoint URL.

* Migrate all oAuth queries and mutations to use the new function for creating a Supabase project client.

* Use the new queries/mutations in the code.

* Use query in refetchInterval for useProjectSettings.

* Replace all uses in StorageExplorer with createProjectSupabaseClient.
2025-11-26 15:15:51 -07:00
Joshen Lim
4982ef8703 Check storage config for vector buckets enabled (#40694)
* Check storage config for vector buckets enabled

* Update API types
2025-11-27 03:03:30 +08:00
Francesco Sansalvadore
5ae4a2f8cb chore: oauth apps update (#40776)
* chore(studio): add oauth apps update panel
* chore(studio): add client_type value to oauth app form
* chore(studio): add logo_uri upload field to oauth apps
* chore(studio): don't show oauth app credentials when successfully editing
* chore(studio): apply correct filters to oauth apps
* chore(studio): show client_secret only on confidential apps
* chore(studio): hide regenerate client secret on public oauth apps
* chore(studio): add docs link on auth server page
2025-11-26 16:44:17 +01:00
Joshen Lim
5701a291fe Fix Users page not invalidating data when switching search mode (#40809)
* Fix Users page not invalidating data when switching search mode

* Nit fix
2025-11-26 16:15:34 +08:00