Commit Graph

32 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 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
Joshen Lim 5e2e6690ad chore(studio): Deprecate usage of useQueryStateWithSelect in more files (#42500)
## Context

Related to FE-2461

Just following from the previous part
[here](https://github.com/supabase/supabase/pull/41819)
PR removes the usage of `useQueryStateWithSelect` in
- Publishable API Keys (Delete)
- Secret API Keys (Delete)
- Auth Hooks (Edit)
- Database Indexes (Edit + Delete)
-
Ensures that the appropriate behaviours are in place too
- Toast should show when landing on a page with an invalid ID param that
entity doesn't exist
- Toast should not show when deleting the param (which
useQueryStateWithSelect was using useRef as a workaround prior)

## To test

- [ ] API keys (Both publishable and secret key)
  - URL updates when deleting a key
  - Refresh the page, delete dialog should open with the right key
- Update the query param to something invalid, should see the "not
found" toast
  - Delete a key, should only see a success toast
- [ ] Auth Hooks
  - URL updates when adding / edit a hook
  - Refresh the page, panel should open with the right hook
- Update the query param to something invalid, should see the "not
found" toast
- [ ] Database Indexes
  - URL updates when editing/deleting an index
  - Refresh the page, delete dialog should open with the right index
- Update the query param to something invalid, should see the "not
found" toast
  - Delete an index, should only see a success toast

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

* **Bug Fixes**
* Improved error handling and user notifications when API keys, hooks,
or indexes are deleted or become unavailable; users now see clear toasts
when a target item cannot be found.
* **Refactoring**
* Internal state and dialog visibility handling for API keys, hooks, and
database indexes have been simplified to make UI flows more reliable and
consistent.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2026-02-06 12:32:53 +08:00
Ali Waseem 4dda2e7f74 fix: remove message from api contact allowing users to flll helpful context (#41994)
fix: remove message from api contact allowing users to fill something helpful
2026-01-20 10:52:29 +08:00
Danny White c6351514b4 chore(studio): improve Alert Dialog component (#41336)
* index advisor

* support button type

* supasquad confirmation

* reset table

* reset table

* out of date notice

* copywriting

* fix inline flow

* nit

* button type

* fix type error

* rabbit

* fix descendants issue

* clearer copy

* remove redundant classes

* fix conflict with button type
2025-12-17 11:05:42 +00: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 e0febdadcb Change flag for API keys last used (#41221) 2025-12-10 17:20:49 +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
Ali Waseem f23f8d8594 fix: updated flag check for undefiend (#41205)
updated check
2025-12-09 13:13:02 -07:00
Ali Waseem 6f33a251f1 temp: added flag to hide last used (#41204)
* added flag to hide last used

* remove last used in 24 hours
2025-12-09 18:47:01 +00:00
Joshen Lim 0b517360cb Use timestamp info for api keys last used (#41180) 2025-12-09 14:47:17 +08: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
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
Francesco Sansalvadore af5d65793c param routing: db triggers and api keys (#40426)
* chore(studio): add param routing to policies crud panels

* chore(studio): policy not found if opening edit or delete panel with wrong id

* integrate useQueryStateWithSelect to Policies

* add useQueryStateWithSelect to db triggers

* add useQueryStateWithSelect to AddUserDropdown

* add useQueryStateWithSelect to OAuthApps

* add useQueryStateWithSelect to API Keyys

* revert policies and users param routing
2025-11-17 07:54:05 -07:00
Charis a5e2c62ef4 fix: check for api key permissions before requesting (#40452)
To prevent sending unnecessary requests for API keys when the user can't
view them (Read-Only Role), first check the permissions.
2025-11-14 09:43:34 -05:00
Charis d8f7cc0d57 feat(support form): attach dashboard logs (#39539)
* o11y: mirror and sanitize breadcrumbs

Mirror Sentry breadcrumbs as the basis for our own support logging. Also
adds more sanitization to breadcrumbs.

* feat(support form): toggle for attaching dashboard  logs

Add a toggle to the support form when the category is "Dashboard bug",
to attach recent dashboard logs. Users can preview the attached logs and
opt out.

* feat(support links): dedicated support link component

Add a new component for support links, which:
- Uses the serializer for support link params to ensure
serialization/deserialization pairs correctly
- Snapshots breadcrumbs so the attached log on the support form will be
cut off at the support link click (otherwise we will get support form
actions cluttering up the log)

* tests(support form): extend timeout on flaky test

* Minor clean up

* fix(support form): allow url to specifically indicate no specified project

* minor nits

* Fix tests

* Fix tests

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-22 08:57:49 -04:00
Danny White 6617418e1a chore(studio): consistent table rows across pages (#39507)
* consistent table rows across pages

* remove comments

* match copy

* Nit add loading icon when revealing secret key

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-15 10:45:17 +11:00
Joshen Lim 1160f89b70 Address various console warnings (#38789) 2025-09-17 22:36:07 +08:00
Joshen Lim d46525eac1 Chore/swap use check permissions with use async check project permissions part 8 (Season Finale) (#38619)
* Update perms checking in audit logs

* Deprecate useCheckPermissions, useIsPermissionsLoaded and useCheckProjectPermissions as they're no longer used

* Rename useAsyncCheckProjectPermissions to useAsyncCheckPermissions

* Fix TS
2025-09-16 17:05:57 +08:00
Danny White 65b962e771 design system: text color contrast (#38343)
* Refactor Drawer component and add date-fns dependency

Refactored the Drawer component for improved slot-based structure, updated styles, and added 'use client' directive. Added 'date-fns' as a dependency in design-system, updated tsconfig paths for icons, and marked ToggleGroup as a client component.

* nit: add env for svg path

* fix: instructions

* accent color docs and basic tidy

* copy value feature

* improve color contrast

* increase contrast on text-warning in light mode

* update changelog

* replace outdated text-warning utility classes

* remove redundant warning-600

* minor design-system docs updates

* docs updates

* remove unused brand-button class

* update docs

* fix: restore brand default

* update docs brand text color

* low hanging branded text fruit

* Nit refactor and clean  up

* re-add Kemal’s README instructions for hot reload

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-09-09 11:45:08 +10:00
Danny White 7f455ed5d5 chore: api keys ux improvements (#38390)
* simply API key pills

* add tooltip to other copy button

* consistent destructive dropdown icon

* design system documentation
2025-09-03 14:39:00 +10:00
Joshen Lim 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
Jonathan Summers-Muir 4b0bd73312 chore: jwt keys page table layout (#37097)
* Improve layout and truncation in SigningKeyRow

Added flex and truncation classes to ensure status labels and key IDs are properly truncated and aligned. This enhances the table's appearance and prevents overflow issues for long text.

* Improve icon layout and badge styling in UI components

Added flex-shrink-0 to icons in AlgorithmHoverCard for better alignment. Updated InfoPill to use min-w-0, overflow-hidden, and improved badge and label layout for consistent appearance and handling of long content.

* Remove unused cn import from InfoPill component

The cn utility import was removed from InfoPill.tsx as it is no longer used. The Badge component now uses a direct className string instead.

* Update JWT key table columns and add rotation info

Removed the 'Key ID' column and added a 'Last rotated at' column to the JWT secret keys table. The signing key row now displays the relative time since the key was last updated for previously used keys.

* Add Key ID column to JWT secret keys table

Introduces a new 'Key ID' column to the JWTSecretKeysTable component for improved visibility and management of JWT secret keys.

* Improve JWT key table UI and add tooltip to key ID

Updated the JWT secret keys table to enhance the empty state with an icon and explanatory text, and adjusted column alignment and visibility for 'Last rotated at'. Added a tooltip to the key ID for better accessibility and ensured the 'Last rotated at' column displays for both previously used and revoked keys.

* Improve API key table layout and responsiveness

API key name and description are now grouped together, with description shown under the name. The last seen column is hidden on smaller screens and displays 'Never used' when appropriate. ApiKeyPill max width is now responsive to screen size. The description column was removed from SecretAPIKeys to streamline the table.

* Adjust API key pill and input sizing for responsiveness

Reduced max-widths for ApiKeyPill and updated PublishableAPIKeys layout to improve responsiveness. ApiKeyInput now uses dynamic min/max widths for better display across breakpoints.

* Adjust lg breakpoint min-width for API key input

Changed the lg:min-w value from 40rem to 24rem for the API key input field to improve layout responsiveness at large screen sizes.

* Update PublishableAPIKeys.tsx

* Remove unused file

* Minor refactors

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-07-14 19:40:17 +08:00
Bobbie Soedirgo 90d355b9cb feat: show upgrade warning if user objects exist in internal schemas (#36654)
* feat: show upgrade warning if user objects exist in internal schemas

* Clean up warnings into a separate file

* Update API types + fix TS issues

* Update apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureInfo.tsx

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-06-27 08:26:03 +00:00
Stojan Dimitrovski 4945ba1861 feat: add asymmetric JWT UI (#36519)
* original files from previous PR

* get rid of router in jwt-secrets to make it show up

* rename jwt-secrets page to jwt-signing-keys

* add jwt-signing-keys query

* add legacy jwt signing keys query

* wire-up JwtSecretKeysTable with queries

* add jwt signing keys page to settings menu

* deduplicate labels, descriptions, etc

* add create, update jwt-signing-key mutations

* update types

* remove unused components, to be refactored later

* make everything into a mostly working state

* legacy migration added

* put jwt keys page like api keys

* fully migrate legacy jwt secret page

* fix prettier

* fix typecheck ts-expect-error

* rm unneeded file

* Fix compile errors.

* Rename the files and move them to the same folder.

* Merge the two constant files.

* Fix the imports.

* Fix a bug in the API keys page when opening it in a new tab.

* Change the page to be at /signing-keys

* Fix some minor types.

* Break apart some of the components in the signing keys UI.

* Use a feature banner for the initial action.

* Make a create key dialog and move functionality there.

* Fix some cosmetic issues.

* Minor cosmetic fixes.

* Remove extra keys in RQ cache.

* Add a missing link

* Add a banner when the feature flag is false.

* Minor type fix.

* more tiny type fix

* fix error on create standby key

* add alert to prevent revoking legacy jwt secret without disabling legacy api keys first

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-06-23 09:36:07 +12:00
Cemal Kılıç e014d5b0c7 fix: update the create ticket link on api keys page (#36494) 2025-06-18 00:16:44 +02:00
Stojan Dimitrovski 515359c3bc fix: more api key ui fixes (#36300) 2025-06-10 16:36:34 +02:00
Joshen Lim b2e368b623 Chore/api keys cleanup (#36097)
* Remove api-keys.tsx, duplicated with api-keys/index.ts

* Remove use of newApiKeys feature flag in SettingsMenu.utils.tsx

* Refactor use of newApiKeys flag to basicApiKeys

* Update logic for shouldDisableUI in useApiKeysVisibility hook

* Smol fix
2025-06-04 12:51:57 +08:00
Jonathan Summers-Muir 9318404e61 Feat/api keys rollout prep (#35559)
* first pass

* init

* updated types

* fix up key reveal

* Update QuickKeyCopy.tsx

* remove quick key copy

* api key pill now only allows reveal and copy if you have perm

* Update LegacyAPIKeys.tsx

* fix up layouts

* fix copy

* Fix action menu dropdown position, few small nudges

* Remove unused files.

* Remove the hardcoded and rename the feature flag for basic API keys.

* add support for name and description, some smaller improvements

* Fix the trims for the description.

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
2025-05-27 15:50:42 +02:00
Jonathan Summers-Muir 4649bf911e feat: new api keys [hidden] (#33252)
* feat: add basic api keys ui

* init JWT secrets. rough

* Update JWTSecretKeysTable.tsx

* added some info hover cards.

• found this this is probably the wrong direction
• will create a new page for next iteration.

* init new version

* add illustrations

* Update JWTSecretKeysTablev2.tsx

* chore: delete API key now works

* some style changes

* added better tables

* Update JWTSecretKeysTablev2.tsx

* add public JWT dialog

* moar

* adding sub layout in

* starts adding in a ButtonGroup

* about to make into separate components

* added quick copy to project loading screen

* build state

* basic loading

* confirm dialog and loading states

* switched for better loading experience

* moved styles of Input to InputVariants

* issue with ref type

* loading,error and rest states

* new loading states

* alt l;ayout

* add group

* updated error states for permissions

* copy button behaviour for secret keys

* delete dialog

* Update QuickKeyCopy.tsx

* fix type errors

* Update JWTSecretKeysTablev2.tsx

* update menu to hide pages

* Update SettingsMenu.utils.tsx

* Update resource-query.ts

* remove old file

* moved JWT secrets to use valtio

* Update api-keys-query.ts

* fix typecheck

* rename files

* remove JWT stuff

* revert file

* remove more JWT stuff

* Update package.json

* Update pnpm-lock.yaml

* Update ProjectLayout.tsx

* Update PublishableAPIKeys.tsx

* Update api-keys-query.ts

* refactor api-keys-query

* Update SettingsMenu.utils.tsx

* Some clean up

* more clean up and refactor

* Update APIKeyRow.tsx

* Update LayoutHeader.tsx

* resolve comments

* Update CreateSecretAPIKeyModal.tsx

* Update APIKeyRow.tsx

* Add perms check for delete API keys

* Remove console log

* Delete ConnectDialog.tsx

* use project ref

---------

Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-05 15:21:10 +01:00