Commit Graph

43 Commits

Author SHA1 Message Date
Ivan Vasilov 56de26fe22 chore: Migrate the monorepo to use Tailwind v4 (#45318)
This PR migrates the whole monorepo to use Tailwind v4:
- Removed `@tailwindcss/container-queries` plugin since it's included by
default in v4,
- Bump all instances of Tailwind to v4. Made minimal changes to the
shared config to remove non-supported features (`alpha` mentions),
- Migrate all apps to be compatible with v4 configs,
- Fix the `typography.css` import in 3 apps,
- Add missing rules which were included by default in v3,
- Run `pnpm dlx @tailwindcss/upgrade` on all apps, which renames a lot
of classes
- Rename all misnamed classes according to
https://tailwindcss.com/docs/upgrade-guide#renamed-utilities in all
apps.

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2026-04-30 10:53:24 +00:00
Ivan Vasilov 308cd791a2 chore: Prep work for migrating to Tailwind v4 (#45285)
This PR preps the monorepo for a migration to Tailwind v4:
- Bump all Tailwind dependencies and libraries to the latest possible
version, while still compatible with Tailwind 3.
- Cleans up obsolete Tailwind 3 specific options and configs.
- Cleans up unused CSS files and fixes the CSS imports.
- Migrates all `important` uses in `@apply` lines to using the `!`
prefix.
- Move `typography.css` to the `config` package and import it from the
apps.
- Migrated all occurrences of `flex-grow`, `flex-shrink`,
`overflow-clip` and `overflow-ellipsis` since they're deprecated and
will be removed in Tailwind 4.
- Make the default theme object typesafe in the `ui` package.
- Migrate all `bg-opacity`, `border-opacity`, `ring-opacity` and
`divider-opacity` to the new format where they're declared as part of
the property color.
- Bump and unify all imports of `postcss` dependency.
2026-04-28 11:33:53 +02:00
Gildas Garcia 0facd341a6 chore: remove UI form components _Shadcn_ suffix (#45212)
## Problem

We used to have a `_Shadcn_` suffix for all the shadcn form components
because we also had `formik` form components.
This is not needed anymore.

## Solution

- Remove the suffix
- Update all usages
2026-04-24 12:14:15 +02:00
Charis bff92df845 convert fdw sql utilities to safesql (#45069)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved SQL query handling for vector bucket creation and Foreign
Data Wrapper operations

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-20 15:06:49 -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
Ivan Vasilov ee8eae7309 chore: Clean the ui package from next imports (#44278)
This PR moves several components which rely on `next` out of the `ui`
package to the `ui-patterns` package.

`ui-patterns` package is intented to be imported with specific imports
so it's ok if there are components reliant on `next` in there.

The `SonnerToaster` component has removed its dependency by requiring a
prop for `theme`.
2026-03-30 10:58:37 +02:00
Joshen Lim 9aa6e167c9 Update vector bucket SQL queries for wrappers ext 0.5.7 (#42274)
## Context

There's some changes for Vector Buckets with the wrappers extension on
version 0.5.7 and above

The "Query from Postgres" CTA (which runs an import foreign schema
command) no longer accepts the bucket name as part of the schema options
(ref
[changelog](https://github.com/supabase/wrappers/releases/tag/v0.5.7)),
and instead takes the bucket name as the remote schema name.

So changes here are to update the SQL for importing foreign schema for
vector buckets if wrappers extension is above 0.5.7

Also - the `::embd` type no longer seems to exist in 0.5.7 as well, so
updated the example code too

## To test

Can probably test on a new US East 1 project on the preview
- [ ] Verify creating a vector bucket table + can query from postgres
(via the Insert vectors CTA after creating a table)

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

* **Bug Fixes**
  * Fixed breadcrumb navigation links for vector bucket pages.

* **Improvements**
* Unified loading state for schema workflows and disabled actions while
loading.
* Enhanced version compatibility checks for foreign schema imports to
support newer extension syntax.
* Adjusted generated SQL for vector data to use the appropriate
embedding syntax based on extension version.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-30 18:53:53 +08:00
Charis 5b83b714b9 fix(studio): remove bucket list query for useSelectedBucket (#42114)
* fix(studio): use paginated buckets query for useSelectedBucket

Part of the effort to migrate all buckets list queries to the paginated
version. This migrates the useSelectedBucket hook, which is used on the
bucket details page to fetch the bucket info.

* fix(studio): flash of stale content when switching buckets

There's a flash of stale content when switching between buckets in the
File Explorer. This happens since the change to useSelectedBucket,
because when the bucket changes, the new data is no longer available
immediately. It must be awaited, and meanwhile `columns` in global
storage state is stale. This commit adds a check for whether the state
is stale by checking the current ID against the stored ID.

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2026-01-27 09:41:47 -05:00
Danny White 196aa05924 chore(studio): use the shared createNavigationHandler (#41628)
* design system references

* fix remaining tables

* rabbit

* fix
2026-01-20 03:24:10 +00:00
Joshen Lim 32e1fedc79 (chore) studIo: Refactor use query state with select part 01 (#41819)
* Refactor to remove usage of useQueryStateWithSelect in auth policies and vector bucket

* Refactor to remove usage of useQueryStateWithSelect in edge functionn secrets
2026-01-12 12:30:04 +07: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
Ivan Vasilov cc47bcfa6d chore: Migrate studio to use ui-patterns/shimmeringLoader (#41405)
* Add shimmering-loader CSS to ui-patterns.

* Import the shimmering-loader classes from the ui-patterns component.

* Remove ShimmeringLoader from studio.

* Migrate studio to use ui-patterns/ShimmeringLoader.

* Migrate away from using default import for ShimmeringLoader.

* Fix the css imports in docs and studio.
2025-12-17 14:54:07 +01: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
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
Danny White 11dc1324aa chore(studio): improve alert composition and usage (#41147)
* finesse optical alignment

* improvements

* actions styling

* improvements

* margins

* improvements

* fix docs

* fix

* improve schema warning admonition

* misc fixes

* tweaks

* docs and improvements

* alphabetical sidebar navigation

* remove alert-error

* fix build error

* Tiny fixes

* tiny docs update

* semantic description

* handle intro pages

* note NoPermission component

* docs sidebar ordering

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-10 08:05:30 +00:00
Danny White 0399beba0e chore(studio): use Admonition and deprecate AlertError (#41095)
* use admonition and deprecate

* spot fix

* remove mb on admonition itself

* smart layout handling based on actions count

* fixes

* remove class

* fixes

* remove mb-0 instances

* remove redundant m-0

* remove single-use component

* use props

* reset leading

* remove redundant clause
2025-12-08 12:15:18 +11:00
Joshen Lim e61d0e69cd Reinstate copy action for TextConfirmModal for staff only (#41042)
* Reinstate copy action for TextConfirmModal for staff only

* Clean

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2025-12-05 14:52:35 +00:00
Danny White 203beab855 feat(studio): recommended schemas for extensions (#40968)
* fix docs links

* recommended schema for wrappers

* more extensible approach
2025-12-03 08:15:14 +11: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
Saxon Fletcher da0b4c6f57 Storage page components (#40935)
* storage page components

* Nit fixes

* Small refactor

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-01 16:51:34 +08:00
Danny White 46156d5f95 chore(studio): better vector put docs and comment (#40879)
improve docs and comment
2025-11-28 09:28:02 +01:00
Francesco Sansalvadore dfecff7629 fix(ui-patterns): responsive with_icon spacing (#40841) 2025-11-27 15:38:10 +00:00
Ivan Vasilov 784f77d398 Add example code for Vector buckets (#40440)
* Add examples.

* Move the button for creating a vector bucket outside of the dialog.

* Install the wrappers extension if missing when creating a vector bucket.

* Refactor the quick start code for vector buckets.

* Fix a type error.

* chore(studio): vector tables UI improvements (#40598)

* Add examples.

* clearer examples

* clearer dimension samples

* quick start as sheet

* improve structure

* cleanup

* icons and text size

* improve snippet code

* icons

* sql editor link

* cleanup

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>

* Minor naming fix.

* Fix the link to the Table Editor.

* Smol fix + refactor and clean up

* Nit

* Nit improvement

* Make the SQL option default.

* fix docs link

* fix example code

* remove redundant card

* Check if the project has secret keys or service role keys. Remove the NEXT_PUBLIC from the env vars to avoid exposing them to the FE.

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-27 11:26:25 +01:00
Riccardo Busetti 09cda344a1 ref(etl): Add better badges (#40828)
* ref(etl): Add better badges

* Fix

* Update apps/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* UI nudges

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-27 11:42:27 +08:00
Joshen Lim 8f096b5d7c Chore/fix storage upload sanitize duplicate name (#40813)
* Fix URL when cmd/ctrl clicking files and vector bucket row

* Fix storage upload sanitize duplicate name
2025-11-27 00:39:22 +08:00
Timothy Lim 26630dee0e Fix link to Vector docs (#40819)
* Fix link to Vector docs

* Use DOCS_URL
2025-11-26 17:11:14 +08:00
Danny White 74fa49d4bd fix(studio): keyboard focus on button (#40458)
* add necessary prop to main button component

* remove redundant props

* docs

* docs improvements

* typo

* tabbable sidebar items

* aria-label and aria-hidden

* update docs

* clarification

* fix link

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2025-11-25 23:48:58 +00:00
Danny White 552522c16f chore(studio): improve vector storage UI (#40596)
* improve table sheet

* improve metadata keys

* fix styling of foreign schema

* reset radio group

* docs

* resize sheet
2025-11-25 21:37:30 +11:00
Danny White 0631444d37 feat(studio): fancy bucket icons (#40766)
* swap icons

* docs improvements

* better upgrade icons

* add sentry

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-25 16:41:32 +08:00
Joshen Lim 31a026e6f0 Joshen/depr 253 tighten field validation for bucket name and table name (#40739)
* Update validation for analytics bucket name

* Update comment

* Update bucket name validation for vector buckets
2025-11-25 12:34:07 +08:00
Ivan Vasilov 43cc61818c chore: Migrate all isPending uses in react-query (#40642)
* Bump react-query. Minor type and logic fixes.

* Migrate all use of isLoading to isPending in mutations.

* Fix type errors.
2025-11-20 16:44:53 +01:00
Ivan Vasilov a40ccc4b45 chore: Clean onSuccess and onError props on useQuery (#40641)
* Remove all onSuccess and onErrors from useQuery.

* Minor fixes to all refetchInterval.

* Fix smaller type issues.
2025-11-20 14:08:56 +01:00
Francesco Sansalvadore b3706fcc14 param routing: storage buckets (#40559)
* param routing: storage buckets
* update CreateBucketModal test to work with nuqs

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2025-11-20 09:43:31 +01:00
Joshen Lim 53396f84d8 Client side plan check for analytics and vector buckets (#40549)
* Client side plan check for analytics and vector buckets

* Add upgrade callout for ETL too
2025-11-18 18:14:37 +08:00
Joshen Lim 51e2f10ba7 Chore/add missing error handler for buckets (#40521)
* Add missing error handler for file buckets

* Add missing error handler for analytics buckets

* Add missing error handler for vector buckets
2025-11-17 22:47:56 +08:00
Joshen Lim 8b5a087eb7 Joshen/depr 262 bucketid route needs to handle if a bucket doesnt exist (#40430)
* Handle landing on a bucket id that doesnt exist in project

* Standardize re routing behaviour for files bucket

* refactor

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-11-14 15:25:59 +08:00
Danny White 1dd3ea1eae fix(studio): table row focus and hover (#40454)
* fix table row focus and hover

* add basic tabIndex

* fix buttons

* other table types

* Minor clean up

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-14 12:39:09 +08:00
Danny White 849c29f824 chore(studio): improve Storage UI (#40367)
* clarify breadcrumbs

* tiny badge variant

* improve admonition

* indicate max buckets limit

* nit

* Minor nits

* badge fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-13 20:30:49 +11:00
Ivan Vasilov c5bf65b0b4 feat: Create FDW for S3 Vectors buckets (#40206)
* Fix childProps in Admonition so that they're added as a prop to the main div.

* Replace the admonition with Alert in Wrapper tab page to add a gap between childs.

* Add s3 vectors fdw.

* Minor fix to FormSection.

* Update the fdw mutations to support passing in options.

* Refactor the vector flow to create fdws.

* Revert cron description change.

* If the bucket can't be created, don't create a fdw.

* Update/delete the fdw when deleting a table or a bucket.

* Minor fixes.

* Clean up the delete modal.

* Handle edge cases when missing a wrapper.

* Remove the admonition in the create bucket modal.

* Fix the loading state when creating a bucket.

* Fix the createWrapper sheet to work with s3 vectors.

* Fix undefined wrapperMeta issue.

* Create the schema when installing a wrapper.

* Tiny cleanup.

* Clean up unneeded useState. Create a wrapper only if the all conditions are met.

* Fix all comments.

* Add s3 vectors for docs.

* Add a link and fix the file name for S3 Vectors in docs.

* Hide the table editor button if the wrapper instance is missing.

* Small fixes.
2025-11-12 11:00:38 +01:00
Danny White 1d54b9d72b studio(chore): improve storage bucket presentation (#40230)
* badge and admonition updates

* whole file row tappable

* file bucket improvements

* match tables across all storage types

* keyboard focussable rows

* share function

* other bucket types

* fix: a11y of table rows

* clean up focus state on rows

* accessibility

* address review comments

* move accessibility

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-11-11 16:30:57 +11:00
Joshen Lim eabfebf0f7 Refactor/use text confirm modal for delete buckets (#40291)
* Refactor DeleteBucketModal to use TextConfirmModal

* Refactor DeleteAnalyticsBucket to use TextConfirmModal

* Update TextConfirmModal to disable button until text match

* Refactor DeleteVectorBucketModal to use TextConfirmModal

* Remove test case - no longer valid
2025-11-10 15:28:08 +08:00
Danny White 41afe37e27 feat(studio): clearer table row actions (#40170)
* files

* TableLink component

* triggers

* shared style instead

* remove bold

* revert medium on trigger
2025-11-06 08:56:34 +11:00
Ivan Vasilov 47e1134a1d feat: Vector buckets - initial work (#39597)
* Initial work on vector buckets.

* Add more queries and UI.

* chore(studio): vector buckets contents (#39705)

* language

* match analytics buckets

* shared empty state

* proper loading state

* create dialog cleanup

* simplify copywriting

* proper details

* filtering

* use real data

* chore(studio): vector buckets polish A (#39759)

* empty state

* better checks

* bucket name in sheet

* fix typo

* sheet improvements

* rename vector index to vector table

* cleanup

* More work on the vector indexes.

* Add delete for bucket and indexes. Create index should now work.

* chore(studio): vector buckets polish B (#39794)

* loading

* delete modal

* fix modal behaviour

* Add modal for deleting vector buckets.

* Bring back the shimmering loader.

* chore(studio): vector buckets polish C (#39887)

* fix bucketname on deletion dialog

* empty states

* remove extraneous padding

* proper loading and not-found cases

* Minor fixes.

* Minor updates to the vector components.

* Add more instructions to the cursor rules.

* Some refactors and shifting files around

* Refactor analytics buckets detial to improve time to fcp

* Fix

* Refactors + simplify

* Last few nits, just leaving comments

* If the bucket is not empty, delete all indexes first.

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-04 15:25:46 +01:00