Commit Graph

36 Commits

Author SHA1 Message Date
Ali Waseem c5666f8e76 fix(auth): toggle shortcut repeats (#45728)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Remove unneeded checks and its handled by the shortcut

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved the empty state interface in the Third Party Auth integration
form, enhancing the display and alignment when no integrations are
available.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-08 22:16:24 +02:00
Ali Waseem 0278672102 feat(studio): add Auth sub-page navigation chords (#45696)
## Summary
- Adds contextual `A + <letter>` chord shortcuts for jumping between
Authentication sub-pages while `AuthLayout` is mounted, mirroring the
existing database-nav chord pattern.
- Wires the shared `LIST_PAGE_*` shortcuts (focus search, create new,
reset filters, schema selector) onto the Auth list pages so they behave
like the Database list pages.
- Fills in the previously-missing `A + U` chord for the **Users** page
so every entry in the Auth menu has a chord.

Resolves
[FE-3187](https://linear.app/supabase/issue/FE-3187/add-a-u-keyboard-shortcut-for-auth-users-page).

## Auth navigation chords

Active anywhere under `/project/<ref>/auth/*`. Press `A` then the listed
letter.

| Page | Chord |
| --- | --- |
| Overview | `A` `O` |
| Users | `A` `U` |
| OAuth Apps | `A` `A` |
| Email | `A` `E` |
| Policies | `A` `P` |
| Sign In / Providers | `A` `I` |
| Passkeys | `A` `K` |
| OAuth Server | `A` `V` |
| Sessions | `A` `S` |
| Rate Limits | `A` `R` |
| Multi-Factor | `A` `M` |
| URL Configuration | `A` `L` |
| Attack Protection | `A` `T` |
| Auth Hooks | `A` `H` |
| Audit Logs | `A` `G` |
| Performance | `A` `F` |

## Auth list-page shortcuts

Each Auth list page opts into the shared `LIST_PAGE_*` registry — same
chords as the Database list pages (`Shift+F`, `Shift+N`, `F` `C`, `O`
`S`). Coverage matches the controls each page actually exposes:

| List page | Search (`Shift+F`) | New (`Shift+N`) | Reset filters (`F`
`C`) | Schema selector (`O` `S`) |
| --- | :---: | :---: | :---: | :---: |
| Custom Auth Providers | ✓ | ✓ | ✓ | — |
| OAuth Apps | ✓ | ✓ | ✓ | — |
| Policies | ✓ | — | ✓ | ✓ |
| Auth Hooks | — | ✓ | — | — |
| Redirect URLs | — | ✓ | — | — |
| Third-Party Auth | — | ✓ | — | — |

## Test plan
- [x] While anywhere under `/project/<ref>/auth/*`, every chord in the
navigation table jumps to the corresponding page.
- [x] On each list page in the second table, the marked shortcuts focus
the search input / open the create flow / reset filters / open the
schema picker as expected.
- [x] Chords are not active outside of `/project/<ref>/auth/*` and do
not trigger while typing in inputs (where `ignoreInputs` applies).

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

* **New Features**
* Global keyboard shortcuts for Auth pages: navigate auth sections,
focus/search inputs, reset filters, and open "Add" flows (providers,
OAuth apps, hooks, URLs, policies).
* "Add" controls in lists respond to shortcuts and show appropriate
disabled/tooltip states when unavailable.
* Product menu and shortcuts reference now include an "Auth Navigation"
section and per-item shortcut hints.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-05-08 07:13:25 -06:00
Vaibhav aeda6a88a8 fix: third-party auth layout (#45470)
## before
<img width="1278" height="397" alt="image"
src="https://github.com/user-attachments/assets/ba57eca0-81cc-4fa4-929a-8d42933e66e1"
/>

## after
<img width="1265" height="492" alt="image"
src="https://github.com/user-attachments/assets/c09e081e-bcfd-43ea-960a-eedef0494c7d"
/>


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

## Summary by CodeRabbit

## Release Notes

* **Style**
* Improved the integration card layout for better content visibility and
status badge positioning.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-01 19:23:00 +00:00
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
Joshen Lim 7f5865872a Enforce noUnusedLocals and noUnusedParameters in tsconfig.json + fix all related issues (#45264)
## Context

Enforce `noUnusedLocals` and `noUnusedParameters` in tsconfig.json + fix
all related issues
2026-04-27 17:42:34 +08: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 564f4f66ee Joshen/fe 2660 clean up stale feature flags enabled for 2 months part 1 (#43329)
## Context 

Just cleaning up feature flags that have been toggled on for all users
and unchanged for the past 2 months
- advisorRules
- newJwtSecrets
- isWorkOSTPAEnabled
- EnableOAuth21
- gitlessBranching
- showRefreshToast
- awsPrivateLinkIntegration
- useBedrockAssistant (Already not used)
- enableStripeSyncEngineIntegration
- ShowExplainWithAiInQueryPerformance

Doing it in 2 parts so its easier for review
2026-03-04 13:08:39 +08:00
Ali Waseem 2dd75cbfdd chore: Update aria-controls and aria-expanded for components (#42961)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

- React Doctor fixes for aria controls and aria expanded
- Updated eslint to include the role
2026-02-18 16:41:10 +00:00
Ivan Vasilov 7e9f243f51 chore(studio): update Cursor rule to use queryOptions (#42446)
## Summary

- Updates the Cursor rule at `.cursor/rules/studio/queries/RULE.md` to
recommend the `queryOptions` pattern from TanStack React Query instead
of custom `useXQuery` wrapper hooks
- Provides an example implementation by refactoring
`thirdPartyAuthIntegrationsQuery` from a
`useThirdPartyAuthIntegrationsQuery` hook to
`thirdPartyAuthIntegrationsQueryOptions`

## Why this pattern?

The `queryOptions` factory pattern from TanStack Query v5 offers several
benefits:

1. **Type safety** - Query keys and return types are properly inferred
2. **Reusability** - The same query config can be used with both
`useQuery()` in components and `queryClient.fetchQuery()` for imperative
fetching
3. **Consistency** - Aligns with TanStack Query's official
recommendations
4. **Simplicity** - Removes the need for custom generic wrapper hooks

## Test plan

- [ ] Verify the ThirdPartyAuthForm component works correctly with the
new pattern
- [ ] Check that the Cursor rule provides clear guidance for writing new
queries

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

## Summary by CodeRabbit

## Release Notes

* **Documentation**
* Updated query pattern documentation with revised implementation
guidance.

* **Refactor**
* Updated third-party authentication integrations data fetching
mechanism.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-04 21:46:12 +00: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 031b227165 studio(chore): badge component defrag (#40118)
* component clean up

* optically center

* docs and type size

* code badge variant

* sensible defaults

* fix product menu flex

* badge sweep

* new project badges

* logs

* compute badge

* studio badge sweep

* www sweep

* docs sweep

* clean up

* fixes

* cleanup

* fixes

* better docs

* fixes

* misc fixes

* consistency

* Minor fixes for issues i found

* simplify mt-0

* mt simplification

* remaining optical alignment

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-02 11:15:50 +11:00
Danny White 080cc7aeab chore(studio): authentication empty states (#40883)
* auth hooks and docs

* third-party auth

* remove unrelated changes

* remove unrelated changes

* docs tighten

* docs tighten

* Nit clean up

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-28 14:57:56 +08:00
Saxon Fletcher adf760ebf4 Auth interface components new page components (#40670)
* pages first

* auth interface components new page components

* fixes

* update components

* fix
2025-11-28 15:22:02 +10: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
Alaister Young 5f533247e1 Update docs url to env var (#38772)
* Update Supabase docs URLs to use env variable

Co-authored-by: a <a@alaisteryoung.com>

* Refactor: Use DOCS_URL constant for documentation links

This change centralizes documentation links using a new DOCS_URL constant, improving maintainability and consistency.

Co-authored-by: a <a@alaisteryoung.com>

* Refactor: Use DOCS_URL constant for all documentation links

This change replaces hardcoded documentation URLs with a centralized constant, improving maintainability and consistency.

Co-authored-by: a <a@alaisteryoung.com>

* replace more instances

* ci: Autofix updates from GitHub workflow

* remaining instances

* fix duplicate useRouter

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: alaister <10985857+alaister@users.noreply.github.com>
2025-09-26 10:16:33 +00: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
Joshen Lim 4124f0ed98 Shift useFlag hook and configcat library to common package, remove from Studio (#38203)
* Shift useFlag hook and configcat library to common package, remove from studio

* Fix test

* Fix test
2025-08-27 13:42:20 +07: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
Stojan Dimitrovski 74a3be9aa8 feat: add workos tpa ui behind feature flag (#36254) 2025-06-09 19:56:06 +02:00
Joshen Lim a4d5af48c8 Downgrade and fix radix dialog version to 1.0.5, and remove unnecessary modal props from all usages of DropdownMenu (#35027)
* Downgrade and fix radix dialog version to 1.0.5, and remove unnecessary modal props from all usages of DropdownMenu

* Downgrade and fix radix dialog version to 1.0.5, and remove unnecessary modal props from all usages of DropdownMenu

* Fix PopoverPOrtal

* Fix
2025-04-15 17:29:32 +08:00
Stojan Dimitrovski 63d1dfb941 fix: underline clerk connect page link (#34574) 2025-03-31 16:13:53 +02:00
Stojan Dimitrovski 884a66639b fix: reword clerk tpa dialog (#34534) 2025-03-29 12:44:55 +00:00
Stojan Dimitrovski 8b8a29ddf2 feat: clerk tpa fully available (#34402) 2025-03-28 17:23:31 +01:00
Joshen Lim 32a042379e Auth Settings IA Update - Sign In / Up (#33579)
* page components

* page component changes

* settings but broken saving

* rvert

* use sheet for provider

* styling

* remove things

* Some refactoring and fixing, added JSDocs to layouts

* Smol refactor

* Fix

* Update JSDocs

* updated scaffolding

* Clean up

* Spelling

* Clean up FormFieldWrappers

* One last clean up

* Smol CSS tweak

---------

Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
2025-02-21 16:09:50 +08:00
Stojan Dimitrovski 127dd8afc9 feat: add clerk as third-party auth provider / TP-MAU pricing (#33327)
- Adds Clerk as third-party auth provider, behind feature flags for future release
- Adjust pricing according to new pricing RFC
- Remove paid plan feature gatekeeping
2025-02-21 14:59:38 +08:00
Joshen Lim d9a7b43cac Chore/fix cron job card (#32767)
* Add copy action to cron job card command

* Fix

* Remove unused code

* Refactor the cron job parsing. Expanded some of the existing tests. Added more tests.

* The last run data can be undefined if the cron was just created. The data for caching in RQ can't be undefined so it's forced to null.

* Test whether the edge function points to its own project. If not, parse it as a HTTP request.

* Use toStrictEqual instead of toMatchObject for more correct tests.

* Add min height to the codeblock, the copy button was obscured if the code was a one-liner.

* Add snippet to all types of cron jobs. Automatically update it when the form changes.

* Minor fixes.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-01-20 14:33:53 +08:00
Stojan Dimitrovski 3122efc7b7 feat: make firebase tpa generally available (#32573)
* feat: make firebase tpa generally available

* Simplify the dropdown menu label.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-01-09 13:27:02 +01:00
Joshen Lim fdf4dec344 Chore/cleanup feature flags 041224 (#30885)
* Deprecate enableFreeSupport flag

* Deprecate enableExperimentalTheme flag and ThemeSettingsOld component

* Deprecate httpsAuthHooksEnabled flag

* Deprecate thirdPartyAuth flag

* Deprecate logdrains flag

* Deprecate enableNewRegions flag

* Deprecate cronUi flag

* Deprecate queues flag and old ProjectIntegrationsLayout folder
2024-12-04 17:04:53 +08:00
Ivan Vasilov fd3309c886 feat: UI for pg-cron (#29291)
* Add crons option in the database menu.

* Add react-hook-form to the studio package.json.

* Refactor the functionSelector to be used by other features.

* Add the bulk of the functionality for the cron UI. Some of the code is copy-pasted from functions feature, needs to be cleaned before merging.

* Tons of changes, the Create Cron sheet works now.

* Added some more functionality for the cronjob feature.

* Convert the Cron table to a listing with cards.

* Add click-to-copy in the Auth Hooks feature.

* Remove extra prop.

* Fix type errors.

* Fix some random issues. Fix the tests.

* Fix the tests.

* Add a style for disabled radio button item.

* Make the default SQL snippet. Handle the case pg_net is not installed.

* Fix the heading and save button when creating a new cron job.

* Change the name of the custom label in the schedule dropdown.

* Minor fixes.

* Rename all mentions of cronjobs to cron jobs.

* Always show the cron jobs link.

* Rename the link from crons to cron-jobs.

* Fix the disabled state for the stacked radio group.

* More minor fixes.

* More small fixes.

* Fix the tests.

* Minor UI tweaks

* More minor tweaks

* Add padding bottom

* Add feature flag for the cron ui.

* Fix the SQL function option.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-10-03 15:11:17 -02:30
Ivan Vasilov df52ea7ee0 feat: Replace all toasts with sonner (#28250)
* Update the design of the sonner toasts. Add the close button by default.

* Migrate studio and www apps to use the SonnerToaster.

* Migrate all toasts from studio.

* Migrate all leftover toasts in studio.

* Add a new toast component with progress. Use it in studio.

* Migrate the design-system app.

* Refactor the consent toast to use sonner.

* Switch docs to use the new sonner toasts.

* Remove toast examples from the design-system app.

* Remove all toast-related components and old code.

* Fix the progress bar in the toast progress component. Also make the bottom components vertically centered.

* Fix the width of the toast progress.

* Use text-foreground-lighter instead of muted for ToastProgress text

* Rename ToastProgress to SonnerProgress.

* Shorten the text in sonner progress.

* Use the correct classes for the close button. Add a const var for the default toast duration. Remove the custom width class from sonner.

* Set the position for all progress toasts to bottom right. Set the duration for all toasts to the default (when reusing a toast id from loading/progress toast, the duration is set to infinity).

* Fix the playwright tests.

* Refactor imports to use ui instead of @ui.

* Change all imports of react-hot-toast with sonner. These components were merged since the last commit to this branch.

* Remove react-hot-toast lib.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2024-08-31 07:50:51 +08:00
Alaister Young dd79d9e2cb chore: update cmdk 1.0.0 (#28937)
* chore: update cmdk 1.0.0

* update react-popover

* fixed disabled states

* address breaking changes from cmdk update

* fix formatting

* update column options popover
2024-08-28 21:53:16 +08:00
Stojan Dimitrovski 185590c1cd fix: rename AWS Cognito to Amazon Cognito (#28765)
fix: rename AWS Cognito to Amazon Cognitog
2024-08-20 14:04:17 +02:00
Ivan Vasilov b73317fc67 feat: Pricing for TPA (#28454)
* Don't set fixed height on the generateSecret button in hooks sheet.

* Block two of the TPA providers on free plan orgs.

* Fix some copy. Add more explanation about the pricing.

* Update copy

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-08-14 11:01:58 +02:00
Stojan Dimitrovski 08b162e9e3 feat: put firebase auth tpa behind feature flag (#28511)
* feat: put firebase auth tpa behind feature flag

* Minor reordering of the components.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-08-09 18:06:01 +02:00
Ivan Vasilov 9ac44f5985 feat: Add Third Party Auth settings (#27564)
* Add queries and mutations for third party auth.

* Show the ThirdPartyAuth form in the auth settings.

* Minor fixes to the mutations.

* Add a comment for TODO.

* Add all components for third party auth.

* Minor fixes.

* Update the firebase icons.

* Update the api-types.

* Fix the barrel file imports.

* Make the sheets more intuitive.

* Add a dialog for adding RLS policies for the firebase integration.

* Hide the 3rd party auth section behind a form.

* Fix a type error.

* Update the wording on the Add RLS policy dialog.

* Replace the sheets with dialogs.

* Add fixes for the comments on github.

* Minor fixes.

* Fix a type error.

* Make the delete integration awaitable.
2024-07-25 11:07:09 +02:00