Commit Graph
14640 Commits
Author SHA1 Message Date
Joshen LimandAlaister Young 7ed5edd320 Add CTA to unrestricted badge in table editor (#37730)
* Add CTA to unrestricted badge in table editor

* Update apps/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2025-08-12 10:44:48 +07:00
Ivan Vasilov 76e8df5546 fix: Change the stale time for get-deployment-commit from 10 seconds to 10 minutes (#37845)
Change the stale time from 10 seconds to 10 minutes.
2025-08-11 19:54:38 +00:00
Francesco SansalvadoreandIvan Vasilov 7e91d7c4a3 fix cms types and build (#36145)
* fix cms types and build

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-08-11 17:44:38 +02:00
Jordi Enric 87292512b9 upgrade sentry (#37830)
* upgrade sentry

* bump docs sentry/nextjs

* add error button

* rm sentry test
2025-08-11 15:47:28 +02:00
28768b1872 feat: reference for the self referencing view error (#37560)
* feat: reference for the self referencing view error

* feat: adding format

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

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

* Update backups.mdx

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

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

* feat: linter

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

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

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

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

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

Co-authored-by: Div Arora <darora@users.noreply.github.com>

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

---------

Co-authored-by: andres.suarez <andres.suarez@supabase.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Div Arora <darora@users.noreply.github.com>
2025-08-11 13:12:16 +02:00
Riccardo Busetti e9424b98de feat(replication): Delete destination and pipeline atomically (#37790) 2025-08-11 08:23:15 +02:00
Joshen LimandDrake Costa a897cc27f0 Part 1 of swapping useCheckPermissions with useAsyncCheckProjectPermissions (#37751)
* Part 1 of swapping useCheckPermissions with useAsyncCheckProjectPermissions

* Update apps/studio/hooks/misc/useCheckPermissions.ts

Co-authored-by: Drake Costa <drake@saeris.io>

* Address feedback

---------

Co-authored-by: Drake Costa <drake@saeris.io>
2025-08-11 11:53:15 +07:00
Kevin Grüneberg d196ee3fdd chore: disallow larger instance size launch (#37785)
There is usually no good reason to immediately launch a project on a very large instance, unless it is fraudulent usage. To prevent easy fraud, we are not allowing to immediately launch >medium instances and just show a hint.
2025-08-11 12:35:56 +08:00
Peter c538c4dc6e database report: fix xlarge compute size max db connection in dashboard report (#37819)
* fix xlarge compute size max db connection in dashboard report

* pnpm format
2025-08-10 11:01:48 -05:00
Saxon Fletcher adfc138450 Remove error display temporarily (#37804) 2025-08-09 14:56:05 +10:00
Eduardo Gurgel 1e10ee6844 fix: specify that 3rd party JWTs must have kid header parameter (#37778) 2025-08-09 13:45:46 +12:00
Saxon Fletcher f28e6e9c8f Check error before handling (#37801)
check error before handling
2025-08-08 23:37:48 +00:00
Drake CostaandTerry Sutton d6fe8476f3 Refactor EditSecretModal to use shadcn components (#37258)
* chore: Refactor `NewAccessTokenButton` to use shadcn components

This brings `NewAccessTokenButton` into conformance with the latest UI patterns of using shadcn based components, zod schemas, and react-hook-form for form submission.

I based this refactor on the implementation of `CreateSecretAPIKeyDialog`, which already made use of the above.

* add success and failure toasts

* add smoke test for `NewAccessTokenButton`, fix vitest config

This adds a minimal test for `NewAccessTokenButton` but more importantly fixes a critical bug in the vitest configuration for `studio`.

Because `restoreMocks: true` was set in the config, this meant that the mock implementation for `window.matchMedia` defined in the `tests/vitestSetup.ts` file was being **reset** to an empty function before each test suite was run. While this didn't appear to be a problem before, that appears to be because none of the existing tests had `motion.div` in their component trees. Since `motion.div` calls `addListener` on a media query as part of it's lifecycle, that meant that any test which included it would fail as `addListener` would be undefined in this situation. Removing `restoreMocks: true` from the config results in the desired mocking behavior.

This change is necessary in order to test any component that has the `FormItemLayout` component, as it uses `framer-motion` to animate in error messages for input elements.

* add warning comment in case of future config regression

* update test cases, reset form on dialog close, testing setup fixes

This fixes an issue with the polyfills for the testing environment, where a call to `useMutation` would fail as a result of `TransformStream` being set to `null`.

Basic tests for access token creation and form resetting added. Adds `@faker-js/faker` to the studio app devDependencies to generate mock data for `msw` endpoint response.

Adds `shx` to the docs app devDependencies to ensure that the `codegen:examples` script runs cross-platform.

* ensure mocked date is a string

* update testing setup, pollyfills and add rich type support to addAPIMock

* add missing changes

* Move `EditSecretModal` to be child of `SecretRow`

In the accompanying PR for `DeleteSecretModal`, that one will also be moved over to `SecretRow`

* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* chore: Refactor `NewAccessTokenButton` to use shadcn components

This brings `NewAccessTokenButton` into conformance with the latest UI patterns of using shadcn based components, zod schemas, and react-hook-form for form submission.

I based this refactor on the implementation of `CreateSecretAPIKeyDialog`, which already made use of the above.

* add success and failure toasts

* add smoke test for `NewAccessTokenButton`, fix vitest config

This adds a minimal test for `NewAccessTokenButton` but more importantly fixes a critical bug in the vitest configuration for `studio`.

Because `restoreMocks: true` was set in the config, this meant that the mock implementation for `window.matchMedia` defined in the `tests/vitestSetup.ts` file was being **reset** to an empty function before each test suite was run. While this didn't appear to be a problem before, that appears to be because none of the existing tests had `motion.div` in their component trees. Since `motion.div` calls `addListener` on a media query as part of it's lifecycle, that meant that any test which included it would fail as `addListener` would be undefined in this situation. Removing `restoreMocks: true` from the config results in the desired mocking behavior.

This change is necessary in order to test any component that has the `FormItemLayout` component, as it uses `framer-motion` to animate in error messages for input elements.

* update test cases, reset form on dialog close, testing setup fixes

This fixes an issue with the polyfills for the testing environment, where a call to `useMutation` would fail as a result of `TransformStream` being set to `null`.

Basic tests for access token creation and form resetting added. Adds `@faker-js/faker` to the studio app devDependencies to generate mock data for `msw` endpoint response.

Adds `shx` to the docs app devDependencies to ensure that the `codegen:examples` script runs cross-platform.

* ensure mocked date is a string

* update testing setup, pollyfills and add rich type support to addAPIMock

* add missing changes

* Move `EditSecretModal` to be child of `SecretRow`

In the accompanying PR for `DeleteSecretModal`, that one will also be moved over to `SecretRow`

* fix imports

* Update test, fix rebase errors

* remove unnecessary code

* resolve type errors

* fix missing listen call for msw, resolve test type error

* fix imports

* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* remove duplicate test

* update testing setup

* implement requested changes

* cleanup unnecessary conditional logic for undefined `secret` prop

* remove unused import

* remove unnecessary code

* cleanup, replace lodash import with JS

* add required router mock

* fix broken lockfile

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2025-08-08 15:42:06 -02:30
Joshen Lim 00cad15723 Set unusualLineTerminators for grid monaco editor to auto (#37786)
* Set unusualLineTerminators for grid monaco editor to auto

* Set to off instead
2025-08-08 22:20:59 +07:00
Han Qiao 3f8db287d3 chore: add missing env vars to workflow (#37779) 2025-08-08 23:13:17 +08:00
Jordi Enric 5c28d11265 database report: fix keys in getConnectionLimits (#37795)
fix keys
2025-08-08 17:11:35 +02:00
Charis a99f86cd67 docs: remove supabase-js release notes (#37772)
Remove the Release Notes section from the JS reference docs, since no
one maintains them.
2025-08-08 10:21:41 -04:00
Rodrigo Mansueli edd4430432 Fix: database-cron-jobs-infinite-query.ts (#37792)
ORDER BY was before where
2025-08-08 15:40:35 +02:00
TaishiandJoshen Lim 81e1acc2d8 Add ability to stop AI Assistant responses mid-stream (#37628)
* get `stop()` from useChat and use it

* Implement abort signal in `generate-v4` API

* Enhance `onStop` functionality in AIAssistant to store partial message when aborted

* Update dependencies in AIAssistant to include `updateMessage` in effect hook (lint warning fix)

* change onStop prop to be required in AssistantChatForm

* add comment for saving partial AI responses

* remove redundant text size class

* Make onStop prop optional in AssistantChatForm and conditionally render stop button

* Add loading spinner to stop button in AssistantChatForm

* simplify opacity handling for submit button

* Add tooltips

* Improve UI error handler for assistant panel

* Small tweak

* Filter out any tool calls that are streaming in generate-v4, happens when aborting the assistant while a tool is being called

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-08 17:47:46 +07:00
Andrew Valleteau 9e6cbe6c9d docs: add direct links to the dashboard for some settings (#37767) 2025-08-08 12:44:02 +02:00
d60aceb562 Prompt and tool refactoring (#37500)
* try a really long context window to maximize caching

* update examples

* attempt to update packages and useChat

* update endpoints

* update zod

* zod

* update to v5

* message update

* Revert "zod"

This reverts commit ec39bac6b6.

* revert zod

* zod i

* fix complete endpoints

* remove async

* change to content

* type cleanup

* Revert the package bumps to rebuild them.

* Bump zod to 2.25.76 in all packages.

* Bump openai in all packages.

* Bump ai and ai-related packages.

* Remove unneeded files.

* Fix the rest of the migration stuff.

* Prettier fixes.

* add policy list tool

* refactor

* ai sdk 5 fixes

* refactor complete endpoint

* edge function prompt

* remove example

* slight prompt change

* Minor clean up

* More clean up

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-08 15:25:57 +07: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
d52e2c252b Update AI SDK 5 (#37656)
* attempt to update packages and useChat

* update endpoints

* update zod

* zod

* update to v5

* message update

* Revert "zod"

This reverts commit ec39bac6b6.

* revert zod

* zod i

* fix complete endpoints

* remove async

* change to content

* type cleanup

* Revert the package bumps to rebuild them.

* Bump zod to 2.25.76 in all packages.

* Bump openai in all packages.

* Bump ai and ai-related packages.

* Remove unneeded files.

* Fix the rest of the migration stuff.

* Prettier fixes.

* zod

* v4 again

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-08-08 14:15:39 +07:00
Stephen Morgan 18f3191b18 discourage email comparison (#37708) 2025-08-08 14:00:12 +07:00
Jordi Enric 47c8257827 prevent no permission flash in edge functions page (#37661)
* use async permission check

* deprecate usecheckpermissions
2025-08-07 18:51:56 +02:00
Jordi Enric 28e5a0ef19 add syncing between charts (#37599)
* add syncing between charts

* fix typeerr

* cleanup
2025-08-07 18:51:45 +02:00
Jordi Enric 9a80869981 fix custom report charts colors (#37595)
fix custom charts colors
2025-08-07 18:51:28 +02:00
Charis e8ef545d28 fix: tailwind build error (#37728)
We changed to default to ESM imports a while ago, which means local
builds are now breaking because the Tailwind uses a require. Changed to
CJS for Tailwind config file. (I have no idea how this has been working
on Vercel all this time.)
2025-08-07 08:19:24 -04:00
Riccardo BusettiandJoshen Lim 1ea8c656db feat(replication): Add new UI for new table state handling (#37662)
* feat(replication): Add new UI for new table state handling

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Improve

* Fix

* Fix

* Fix TS

* Some UI tweaks

* Tweaaakk

* Fix semantics

* Small optimization

* Some adjustments

* Bit more fixes

* Small UI tweak to simplify UI

* Fixy fix

* gahhh tiny tiny tiny

* Last bit of cleanup

* I swear one final tweak

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-07 12:16:03 +02:00
Chris ChinchillaandCharis e6e24aadad docs: Update user management docs for next JS (#37664)
* Draft

* Update text for guide

* Update text for guide

* Update code for newer next js versions

* Final small change

* Update apps/docs/content/_partials/project_setup.mdx

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

* Changes from review

* Use project name in tutorial text

* Fix up inclusion

* Fix inclusion

* Prettier

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-08-07 08:45:39 +00:00
a61927e790 feat: update dpa retrieval (#37563)
* feat: update dpa retrieval

* add tracking for other legal docs

* ci: Autofix updates from GitHub workflow

* update api types

* update pdf

* Refactor DPA with text confirm modal

* Nit consistency with using a and buttons

* Update TextConfirmModal

---------

Co-authored-by: pamelachia <26612111+pamelachia@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-07 16:12:54 +08:00
Saxon FletcherandChris Chinchilla d0972be7d5 Update branch framing (#37673)
* update branch framing

* shorten preview name

* Update apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>

* Update apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>

* Update apps/docs/content/guides/deployment/branching/branching-2.mdx

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>

* Update apps/docs/content/guides/deployment/branching/branching-2.mdx

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>

* Update apps/docs/content/guides/deployment/branching/branching-2.mdx

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>

* Update apps/docs/content/guides/deployment/branching.mdx

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>

* update name and add redirect

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2025-08-07 08:53:29 +10:00
Rodrigo Mansueliandgithub-actions[bot] d1853ed6a2 Chore: warning about static files & edge functions (#37733)
* Chore: warning about static files & edge functions

* Update limits.mdx

* Update wasm.mdx

* Update apps/docs/content/guides/functions/wasm.mdx

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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-06 17:53:43 -03:00
NJShanta d3693248b0 Fix grammar in Google Auth SHA-1 fingerprint note (#37417)
docs: fix grammar in Google Auth SHA-1 fingerprint instructions
2025-08-06 17:12:35 +00:00
Sean Oliver e3e8528f72 feat: add client-side PostHog telemetry tracking (#37442)
Adds client-side PostHog tracking to run in parallel with server-side telemetry across studio, docs, and www. This enables session replays and resolves a race condition where page views arrive before group assignments resulting in attribution errors.

Changes:
- Created PostHog client wrapper with consent-aware initialization in common package
- Integrated PostHog client calls into existing telemetry functions to send events to both PostHog (client) and backend (server)
- Updated CSP to allow connections to PostHog endpoints
- Added environment variable support for all apps
- PostHog client accepts consent as a parameter and respects user preferences
- Events can be distinguished in PostHog by $lib property (posthog-js vs posthog-node)
- PostHog URL configured based on environment (staging/local uses ph.supabase.green)
- Maintains full backward compatibility with existing telemetry system

Resolves GROWTH-438
Resolves GROWTH-271
2025-08-06 09:15:51 -07:00
f6a5ddf2f9 feat: update the main platform SSO documentation (#37705)
* feat: update the main platform SSO documentation

Update the main platform SSO documentation in preparation for the Self-Service SSO release (https://github.com/supabase/supabase/pull/36732)

---------

Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-08-06 16:10:23 +00:00
CharisandChris Chinchilla ef93da79b0 feat(docs): code samples with ts type stripping (#37695)
* feat(docs): code samples with ts type stripping

Introduce a new option to `$CodeSample`, `convertToJs`, which takes a
code sample written in TypeScript and strips the types to produce a
JavaScript version.

Adds tests for type stripping.

* Clarify instructions

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2025-08-06 10:21:51 -04:00
Rafael ChaconandRafael Chacon f5f0876b4e adds self to humans.txt (#37723)
Co-authored-by: Rafael Chacon <rafael.chacon@supabase.io>
2025-08-06 14:03:16 +00:00
kemal.earth 25fa7dd391 fix(studio): small clean up of block classes (#37721)
fix: small clean up of block classes

My linter was throwing problems because we had two Tailwind block element classes applied to the same elements. Clears that up.
2025-08-06 14:49:21 +01:00
Kevin Grüneberg 7eae9ad67a fix: docs links resulting in 404 (#37720) 2025-08-06 15:03:01 +02:00
Francesco Sansalvadore 6b172a2ee2 chore: remove lw15 banners (#37718)
remove lw15 banners
2025-08-06 07:42:27 -04:00
Han Qiao f6fa4987c5 chore: remove extra space from curl command (#37713) 2025-08-06 17:29:33 +08:00
Saxon FletcherandJoshen Lim a224598f1e Decouple editor panel (#37707)
* decouple editor panel from global state

* refactor again

* dont close assistant

* remove async

* onsave props

* Fix TS errors

* Remove editorPanel state from app-state, use useHotKey hooks for keyboard shortcuts

* Minor UX improvements to EditorPanel

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-06 15:03:53 +07:00
Joshen Lim 712a6b15e6 Chore/address danny friction log (#37659)
* Standardize more icons for table editor and storage explorer

* Standardize AI perms button CTA copy

* Improve toast error copy for invalid folder name

* Storage, open folder when its created

* Highlight FileExplorerRowEditItem when there's issues with name

* Adding a new folder, remove new row if onBlur and folder name has issues

* Update tabel editor header action Auth policy -> RLS policy

* Add dialog if navigating away from custom report while there's unsaved changes

* Add cmd s shortcut to save snippet in SQL editor

* Add toggling of favorite to context menu in sql editor

* Update save query label

* Fix SqlRunButton missing prop hasSelection for SQL editor
2025-08-06 11:22:45 +07:00
Joshen LimandJordi Enric 011f6c3e87 Fix Table Editor not identifying truncated array column values properly (#37683)
* Fix Table Editor not identifying truncated array column values properly

* Add comment

* update tests

* Fix TS issues and shift test file to beside the file its testing

* Fix tests

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2025-08-06 11:11:14 +07:00
Joshen Lim cab0585533 Fe 1799/consolidate to useselectedprojectquery and (#37684)
* Replace all usage of useProjectContext with useSelectedProjectQuery

* Replace all usage of useSelectedProject with useSelectedProjectQuery

* Replace all usage of useProjectByRef with useProjectByRefQuery

* Replace all usage of useSelectedOrganization with useSelectedOrganizationQuery

* Deprecate useSelectedProject, useSelectedOrganization, and useProjectByRef hooks

* Deprecate ProjecContext
2025-08-06 10:53:10 +07:00
Charis 09b7cb6957 fix: typo (#37700) 2025-08-06 09:47:58 +07:00
Greggors 8f6bb2515f Add Greg Kress to humans.txt (#37702) 2025-08-06 01:26:27 +00:00
Filipe Cabaço 8b98da65c0 realtime: fix blogpost example to work properly for delete use cases (#37704) 2025-08-06 01:47:17 +01:00
32b5d8c244 feat: enable Self-Service Single Sign-On (SSO) for orgs (#36732)
* Start

* Add join org logic

* Regenerate the API types and add RQ hooks.

* Various fixes to the UI for SSO config.

* Refactor the components to use RHF.

* Fix the loading/error states in the main file.

* fix: minor changes to SSO UI

* Expanded default attribute mapping preset for `Okta` to include `user_name`, `first_name`, and `last_name` to match our docs.
* Normalized role casing in the "Join Organization on Signup" dropdown to match the roles expected by the backend (`Owner`, `Administrator`, `Developer`).
* Added the role (`Read-only`) to the selectable roles for auto-join.
* Call update mutation when an `ssoConfig` has been retrieved.
* Treats `404` as a valid "create" flow state rather than an error.
* Conditionally renders the SSO config form when config is successfully loaded *or* when the provider is not found, allowing users to onboard from scratch and disable the provider.

* chore: prettier

* feat: add a button linking to SSO setup docs

* Revert "feat: add a button linking to SSO setup docs"

This will be included in a separate docs pr.

This reverts commit 0b616fdd2e.

* General clean up

* Nit copy

* Add empty state for SSO

* Smol change

* One last tweak

---------

Co-authored-by: Chris Stockton <180184+cstockton@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-05 17:03:30 -07:00