Commit Graph

62 Commits

Author SHA1 Message Date
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
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
Danny White 0a96a5d0ce chore(studio): polish database settings (#42970)
## What kind of change does this PR introduce?

UI update

## What is the current behavior?

- Database settings uses an older, much wider, layout
- This will become problematic later on as more complex elements are
added to the page
- Titles and descriptions are inconsistently formatted

## What is the new behavior?

| Before | After |
| --- | --- |
| <img width="1728" height="994" alt="Oldie 2 Toolshed
Supabase-EE998752-3696-45E4-A842-9666049153D8"
src="https://github.com/user-attachments/assets/8f0004cf-3bb4-4b00-900a-b116b80371a6"
/> | <img width="1728" height="994" alt="Oldie 2 Toolshed
Supabase-7E86FD58-35BB-4912-8B2F-8C7AAA03B462"
src="https://github.com/user-attachments/assets/606b51b4-21a0-4b7b-870b-ac92ed363f3c"
/> |
2026-02-27 11:16:02 +11:00
Joshen Lim a057c951ea Make edge functions page accessible on coming up (#42549)
## Context

Related prior work was making edge functions page accessible while
project is restoring - however the status of the project gets flipped to
COMING_UP while it's restoring hence why the functions page was still
inaccessible.

## Changes involved

- Update `NavigationBar.utils` to have edge functions link to
`/functions` irregardless of project status
- (Unrelated) Disable (with tooltip) deploy new function CTA on edge
functions page if project is not active
<img width="403" height="108" alt="image"
src="https://github.com/user-attachments/assets/88479247-999b-4d41-a444-6705f8c3993e"
/>


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

* **New Features**
* Deploy Edge Function button now disables and shows a tooltip when the
project is inactive to make deployment status clear.

* **Bug Fixes**
* Edge Functions link now points consistently to the functions view
regardless of project build state.

* **Refactor**
* Consolidated project-active check and reorganized related UI wiring to
standardize inactive-state handling across settings and controls.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-09 16:56:23 +08:00
Ivan Vasilov db4b10f328 fix: Check the password strength before creating a project (#41586)
* Fix types and lint warnings for the password strength function.

* Simplify the form for creating project. Move the password warning into the form schema. Minor fixes.

* Fix the name of the field.

* Move the common behaviour in a function.

* Minor fixes.
2025-12-24 16:18:29 +01:00
Francesco Sansalvadore 40af66c39d chore: db settings form pattern (#41263)
* chore(studio): update connection pooling form layout
* chore(studio): ssl config form pattern
* chore(studio): database settings form styling
* chore(ui): add contrast to PrePostTab text
2025-12-11 17:21:30 +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
Alaister Young a3e7cb7285 chore: move password check to frontend (#39927)
* chore: move password check to frontend

* remove barrel file export and fix test import

* move import inside function

* Update apps/studio/lib/password-strength.ts

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

* fix test

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-10-28 23:24:35 +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
Joshen Lim e75c4b2960 Swap useCheckPermissions with useAsyncCheckProjectPermissions part 3 (#37899)
* Swap useCheckPermissions with useAsyncCheckProjectPermissions part 3

* Fix loading state in edge function secrets
2025-08-13 19:07:35 +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
Saxon Fletcher c76707012d basic typography classes (#37613)
* basic typography classes

* Clean up classes for where we use h1 tags

* Clean up classes for where we use h2, h3, h4

* Clean up classes for where we use h6

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-04 20:55:34 +10:00
Joshen Lim 1331cc8b63 Remove connectDialogUpdate flag and clean up old connection string components (#32613)
* Remove connectDialogUpdate flag and clean up old connection string components

* Fix
2025-01-07 15:19:39 +07:00
Joshen Lim ec72485ca9 Standardize PH events (#31067)
* Standardize PH events

* Prettier

* Reinstate send events for sign in and sign up
2024-12-12 16:53:00 +08:00
Joshen Lim 862dee997d Reinstate reset db password (#31033) 2024-12-10 14:18:59 +08:00
Jonathan Summers-Muir f650b5ae67 Feat/connection string revamp (#30572)
* add new page

* moar

* moar

* added icons

* improve icons

* moved connect dialog to main header

* update text

* smaller screen support

* moar

* add python and sqlalchemyString

* moar

* add IPv4 warning

* moar

* Delete pooler-icons-v2.tsx

* tidy

* Delete DatabaseSettings.tsx

* tidy

* tidy

* moar. Session pooler is de-prioritized

* Update DatabaseConnectionString.tsx

* type issue

* moar

* Update DatabaseConnectionString.tsx

* Spelling

* Clean up LayoutHeader

* Clean up ConnectionPanel

* Clean up ConnectionParameters

* Last batch of clean up

* Fix loading state padding

* Shift old Connect files to new Connect folder outside of Home

* Final clean up

* Smol fix

* FIX

* Fix button link

* Fixes

* Lint

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-12-05 17:23:14 +08:00
Joshen Lim ecf001ab90 Refactor restore to new project by breaking into smaller components (#30604)
* Refactor restore to new project by breaking into smaller components

* Shift generateStrongPassword into a utils

* Update each notice component in restore to new project to be more consistent

* Add long polling in restore to new project

* Call refetch
2024-11-22 16:42:12 +08:00
Joshen Lim 585477752a Update all documentation buttons (#30163) 2024-10-31 13:58:17 +08:00
Joshen Lim 336d623910 Chore/refactor telemetry calls for dashboard to support PH (#29747)
* Refactor telemetry event into RQ hook, and update to support PH

* Refactor telemetry identify into RQ hook, and update to support PH

* Refactor telemetry page into RQ hook, and update to support PH

* Clean up and deprecate lib/telemetry

* Pretty

* Add ts-ignore in docs for telemetry calls temporarily

* Add credentials include for send event, page and identify mutation hooks

* Add consent check for event and page telemetry, allow RQ mutations for those to fail silently without a toast
2024-10-09 14:32:30 +08:00
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
Jonathan Summers-Muir 8579f6de0d Update DatabaseConnectionString.tsx (#28887) 2024-08-29 13:55:58 +02:00
Ivan Vasilov d4a1c5e689 fix: Fix the badge text in Database settings when IPv4 addon is added (#28094)
* When IPv4 addon is added, show the correct badge text.

* Pass the ipv4 addon boolean.
2024-07-22 09:25:55 +02:00
Jonathan Summers-Muir f912536db8 [Design system] Feat/sonner (#27382)
* fix toast examples

* add sonner stuff

* new sonner examples added

* updated

* add upload POC

* add

* Update sonner-upload.tsx

* move statusicons

* Minor fix.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-07-19 12:38:42 +02:00
Alaister Young 70da0f1d1d chore: cleanup packages (#27770)
* chore: cleanup packages

- Avoid circular imports
- Export API-types as types
- pg-format without depending on Node internal Buffer (not browser-compatible)
- Avoid importing from barrel files in ui dir

* chore: avoid barrel file imports in studio (#27771)

* chore: avoid barrel file imports

- Removes some unused imports
- Avoids barrel file import for faster builds + less memory

* add eslint rule

* type fixes

* delete layouts barrel

* delete components/grid barrel file

* delete components/grid/utils barrel file

* delete components/grid/components/common barrel file

* delete components/grid/components/editor barrel file

* delete components/grid/components/formatter barrel file

* delete components/grid/components/grid barrel file

* delete components/grid/components/header/filter barrel file

* remote components/grid/store barrel file

* remove components/interfaces/Auth/Policies barrel file

* delete components/interfaces/Settings/Logs barrel file

* delete components/ui/CodeEditor barrel file

* delete components/ui/Forms barrel file

* delete components/ui/Shimmers barrel file

* delete data/analytics barrel file

* delete hooks barrel file

* cleanup lib/common/fetch barrel file

* final * barral files cleanup

* global react-data-grid styles

* remove console.log

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>

* fix build

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-07-04 14:48:10 +08:00
Joshen Lim 1127c4ba88 Project Level Permissions (#27347)
* fix: update Permission params

* fix: upgrade check permission hook to support project level role

* fix: usePermissionsLoaded

* fix: Permission params can be undefined

* Scaffold new access management UI

* Add validation

* Update roles view

* Add tooltip

* Add button to apply role to all projects

* Update UI to select projects first instead of roles

* Merge master update UI

* Midway trying to implementation project level perms API

* First pass implementating updating project level permissions

* Add client side validation for assigning/removing roles

* Midway implementing new invites

* Integrate most of the project level permissions functionality

* fix: filter out org-level permissions before checking

* Add relevant UI guards in org level pages for project role POV

* Minor refactors

* Small refactors

* More fixes

* Moar refactors

* More fixes

* More fixes

* Refactor update role logic and smack some test cases on it

* Fixes

* Fix type issue

* Fix type

* more fixes, refactors, adding checks...

* MORE fixes

* Add perms checking for replicas

* Add ButtonTooltip component and use them to prevent repetition of pointer events auto for buttons with tooltips

* Convert all buttons with tooltips to use ButtonTooltip

* refactor

* PRettier

* Small fix

* Remove commented out code in organization-invitation-accept-mutation

* fix: switch to use the platform oauth authorizations routes

* Add perms checking for org audit logs and org oauth apps

* PRettier

* Fix incorrect URL for oauth app flow

* Fix incorrect URL for oauth app flow

* Fix

* Add perms checking for warehouse related UI

* Update roles helper icon

* remove unused lib

* Update package lock... again

* Update package lock... again

* Smalllll update

* Update some checks

* Add gate for project level permissions

* Last fix

* update codegen

* Update warehouse endpoint routes

* Fix

---------

Co-authored-by: phamhieu <phamhieu1998@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
2024-07-01 17:59:54 +08:00
Joshen Lim 140fbebaee Connection strings to be prefixed with postgresql:// instead of postgres:// (#27533) 2024-06-26 17:35:01 +08:00
Joshen Lim 683b8f87bc Tiny copy change for database password (#27521) 2024-06-25 18:23:04 +08:00
Jonathan Summers-Muir 972773ca87 [Dashboard] Chore: update Modal component to use new components (#26844)
* init

* add more examples

* update modal

* update modals

* more modals updated

* update modal

* Update NewAccessTokenButton.tsx

* Update NewAccessTokenButton.tsx

* fix: issue with scale on dialog opening. chore: added bg-dialog color

* fix modals

* add deprecation notices

* revert bg

* revert

* Update Modal.tsx

* Update PITRSelection.tsx

* update dialog docs

* fix: issue with payment method modal

* update terminal instructions

* update padding defaults
2024-06-05 10:06:55 +00:00
Wen Bo Xie cd930f5a2f feat: add IPv4 add on direct conn notice (#26903)
* feat: add IPv4 add on direct conn notice

* feat: add session mode warning

* fix: remove statement from Supavisor-related types

* Revert change in api types file

* Revert change in api types file

* Update API types file via codegen

* Smol feex

* Temp lint fix

* Fix

* fix: include serverless mention

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-05-31 17:07:25 +00:00
Joshen Lim cd4b7c0497 Remove all usage of read replicas enabled flag (#26819)
* Remove all usage of read replicas enabled flag

* Add fix for fly

* Fixes

* Prettier

* Swap to DropdownMenuRadioGroup
2024-05-29 11:46:15 +08:00
Terry Sutton 5e7817548b Fix connect ui bg (#26794)
* Fix connect ui bg

* Remove unused bodyclassname prop
2024-05-27 10:38:01 -02:30
Joshen Lim 271734eec2 Chore/support checking replication lag in database reports (#26290)
* Init replication lag chart in database reports

* Navigate to replication lag chart via query params

* Add view replication lag CTA in map view

* Add replication lag metric to instance node view

* Prettier
2024-05-14 20:00:20 +08:00
divit acf5164653 fix: open connection string docs link in new tab (#22895)
* fix: open connection string docs link in new tab

* ci: Autofix updates from GitHub workflow

---------

Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
2024-04-19 12:43:12 -04:00
divit 94f17c6d0e fix: missing closing quotes in connection string (#22897)
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2024-04-19 14:30:17 +00:00
Jonathan Summers-Muir 2581f978eb fix: update dark mode css. update borders for light and dark mode (#22392)
* update dark mode css. update borders for light and dark mode

* Delete concept-two.css

* Update Panel.tsx

* clean up
2024-04-05 07:46:24 +00:00
Joshen Lim 6b741bc964 Replace ui setnotification with toast midway (#21867)
Replace ui setnotification with toast
2024-03-08 15:46:52 +08:00
Ivan Vasilov 845167ca14 chore: Delete MetaStore and RootStore (#20034)
* Replace all methods of MetaStore with react queries.

* Remove unneeded usages of MetaStore.

* Remove RootStore completely. The only thing left from these stores is uiStore.

* Remove unnecessary comments.

* Delete MetaStore.

* Fix the usage of the wrong toaster.

* Remove unused variables

* Remove onSqlQuery

* Convert some ui setNotification calls to direct toast calls

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-08 14:56:28 +08:00
Kevin Grüneberg f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
Joshen Lim 4e039c9bf5 Remove config cat flag for read replicas (#21587)
* Remove config cat flag for read replicas

* Remove
2024-02-27 13:14:21 +08:00
Joshen Lim d1ab275bea Chore/read replica final touches (#21420)
* Add validation for max replicas check

* Small UI fixes

* Add useMemo for edges

* Fix nodes not shwoing up when switching between map and flow view

* Fix logs explorer copy button

* Add edge changes to useEffect

* Bump wait duration when creating replica

* Sync database selector and use pooler checkbox states across panels on settings database

* Fix InstanceConfiguration not showing any nodes

* Sort databases in DatabaseSelector to have primary first

* Logs explorer border fotter

* Add database selector for edge logs

* Make buttons more concise in logs

* Clean up

* Fix

* Fix home page empty empty state

* Attempt to support pooler logs

* minor qol fix for database selector

* Update shared-data pgbouncer to supavisor

* small fix
2024-02-23 18:08:06 +08:00
Joshen Lim 632f8f95f4 Chore/pooler strings for read replicas (#21383)
* Midway

* Show respective pooler parameters based on selected database

* Add optional params to DatabaseSelector to de-async state between connection string and connection params on database settings page

* remove badge
2024-02-21 14:50:53 +08:00
Terry Sutton cc008ef983 Feat/homepage connect modal combined (#20328)
* First

* Update

* Move connection string panel to its own component

* Add connection strings

* Format button

* Add dummy files to get logic working

* Add mdx packages

* add file handling and change logic

* Support connections

* Fix icons, add direct and graphql

* Remove mdx stuff

* Add pooler toggle

* Fix child logic

* Fix grandchild logic

* Refactor data object

* Move back to dialog ui

* Refactor to shadcn tabs

* Find the files

* Wire up icons

* Loop over connection types

* Reformat file paths

* Remove from project home

* fix tab rendering issue

* Check for unique keys

* Add new libs

* comment

* Add direct connection ui

* Get project connection strings

* Cleanup

* Add project keys

* Add types file

* Undo update

* Add next app files

* Add files

* Add next pages files

* Add nuxt

* Fix env vars

* Add rest of frameworks, graphql and orms

* Add orms

* Fix types

* Add guide links

* Run prettier

* Separate graphql

* Move ui

* Move direct connection to first position

* Move to single files

* Update styling

* Fix locations

* Fix next content

* Fix dialog close button, add proper light mode theme

* Fix dialog style issues

* CleanupA

* Pin to top

* Feat/homepage connect modal combined  styling update (#21079)

* chore: update styling. also moved useStates as it was sort of duplicated

* Cleanup

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>

* Close pooler modal

* Make the db connection panel blend in

* Allow for DatabaseSelector

* Dont open by default

* Some fixes

* Set min height to loader

* Fix

* Small styling fixes for table editor sort filter popover

* Make connect button stand out

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-15 09:25:17 -03:30
Joshen Lim 7f084ce27b Improve loading states for project settings (#21254)
* Improve loading states for project settings

* Remove console log
2024-02-15 17:10:59 +08:00
Joshen Lim 6c7b88272a Only show options if usePoolerConnection unchecked (#21214) 2024-02-13 17:24:19 +08:00
Joshen Lim 63f741bd56 Fix md5 connection string (#21208)
* Fix md5 connection string

* Fix

* Fix
2024-02-13 16:38:01 +08:00
divit b875a46430 fix: use db_user from api response for connection settings page (#21125)
fix: use db_user from api response
2024-02-09 01:34:25 +05:30
Joshen Lim 351fa698ce Update GET and PATCH pooling config to use supavisor endpoints (#20944)
* Update GET and PATCH pooling config to use supavisor endpoints

* Fix TS warning

* Small fix

* Remove unused import
2024-02-06 15:03:10 +08:00
Joshen Lim 90e63ae2f8 Chore/database settings kaizen 3 (#20895)
* Midway shifting some stuffs

* Add alert when setting to session mode, and default to session mode in usePoolerConnection

* Update copy

* Update copy

* Update pooling mode dropdown in usePoolerConnection
2024-02-01 11:58:05 +07:00
Joel Lee 6118a3986b feat: add warning to connection settings about SQLAlchemy dialect (#20858)
* Update DatabaseConnectionString.tsx

* fix: add dropdown for SQLAlchemy connections

* fix: remove redundant code

* Convert dropdowns to collapsibles

* ci: Autofix updates from GitHub workflow

* Remove unused states

* Lint

---------

Co-authored-by: joel <joel@joels-MacBook-Pro.local>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-01-31 07:48:03 +00:00
Kevin Grüneberg f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00