Commit Graph
312 Commits
Author SHA1 Message Date
b09440bd47 fix: move table create update delete to query route (#35662)
* fix: move table create update delete to query route

* chore: implement query to fetch a single table

* fix: retrieve table after update

* chore: assign type to update table payload

* chore: use updated table columns for edit

* chore: make executeSql castable with generic (#35685)

* Chore/refactor derivate more types from queries (#35687)

* chore: make executeSql castable with generic

* chore: derivate types from performed queries

- It allows to decouple more the frontend logic and the pg-meta/sql-query logic allowing to reduce the number of cast
and get closer types between what we do fetch and what we expect in our components

* fix: remove existing check

* chore: handle null comment and check

* fix: format check name as identifier

---------

Co-authored-by: avallete <andrew.valleteau@supabase.io>
Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>
2025-05-20 10:34:59 +08:00
Joshen Lim 227bb54853 Improve auth policies RLS warnings granularity (#35579) 2025-05-14 18:02:07 +08:00
Han Qiao e2fddfeeeb fix: move policy requests to query route (#35500) 2025-05-12 23:54:46 +08:00
Joshen Lim 6412f67d5c Add loading state for RLS policies (#35519) 2025-05-07 18:27:59 +08:00
Kevin Grüneberg e1bd23d66f fix: do not translate USD prices (#35466)
When translation tools go over prices, they wrongfully convert USD into other currencies without changing the price. $25 becomes Rp25 (Rupiah).

By using `translate='no'` we avoid the translation of pricing info. There are some tooltips left that are not covered yet, but this should be the majority already.

Kept the docs Pricing component as simple as possible, just wrapping in a span to avoid translation, not modifying any formatting.
2025-05-06 12:03:35 +08:00
Francesco SansalvadoreandAlaister Young a4cfcd9b2e global user dropdown in docs and www (#35063)
* docs: user nav dropdown

* www: user dropdown nav

* update menus

* chore: add complete local storage allowlist

* move all local-storage to common

* reload after logOut

* add local storage key changes from #35175

* fix errors

* add more keys

* fix merge bugs

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-05-05 11:48:06 +02:00
Joshen Lim d75b7c37bb Update all links that were pointing to settings/auth to their respective updated pages (#35281) 2025-04-25 23:59:53 +07:00
Ivan Vasilov 8a321126ac chore: Clean dead code in ui package (#35093)
* Clean up unneeded files and exports in packages/ui.

* Fix references to LogoLoader.

* Import SimpleCodeblock directly from ui package.
2025-04-24 12:24:12 +02:00
Terry Sutton ed4709078c Policy row spacing fixes (#35045) 2025-04-15 19:45:21 -02:30
Joshen Lim 3bae4ccdd0 Fix editing policy via inline sql, placeholder sql is incorrect (#35038) 2025-04-15 22:28:43 +08: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
Kevin Grüneberg d05bbb669f perf: use subscription plan from org response (#34993) 2025-04-14 20:37:19 +08:00
Kevin Grüneberg 6d809e5ee6 fix: ensure MFA SMS pricing is displayed when toggling (#35000) 2025-04-14 12:00:16 +00:00
Alaister Young af462c0e57 chore: refactor role impersonation (#34827)
* chore: refactor role impersonation

* fix: handle undefined claims in role impersonation SQL generation
2025-04-11 08:17:13 +00:00
fb24d91305 Feat/ Org layout (#33150)
* update test

* move back button, fix width issues on sidebar

* update sidebar logic

* Update ProjectLayout.tsx

* lots of updates. layouts now streamlined. localstorage for tabs in use

* moar

* bunch of new tab logic

* fix empty tab issue

* Update tabs.ts

* layouts switched

* new pages now have fixed layouts

* fix tabs

* fix code bg

* add tabs support for multiple project refs

* intialization issue

* update ID handling

* fixed isOpened state for SQL snippets

* remove old assistant because its bugging up panels

* preview style works in sql editor

* fix border

* removes preview tab if there is one

* fix background of loading skeleton

* lots of issues with types/icons/redirect

* new tab cards

* snippets in empty state now work

* moar stuff

* tabs now in feature flags

* Update tabs.ts

* Update tabs.ts

* moar

* add feature previews

* remove code not needed

* Update next-env.d.ts

* Delete FeaturePreviewModal.tsx

* fix typescript errors. remove more explorer stuff

* remove explorer files

* fixed issues with templates and quickstarts tab

* fixed active state when tabs are not opted in

* logic error

* fix open/highlight issue when opted out of tabs

* templates/quickstarts now displayed with new cards

* Update recent-items.tsx

* Update new-tab.tsx

* add icon back in

* add old empty state back in

* recent items updated to respect project ref

* localstorage cleanup on deletion

* moar

* overflow tabs now working

* correct tab names used for new sql templates/quickstarts

* ongoing queries fix

* cleanup

* update images

* Update RouteValidationWrapper.tsx

* Update AppLayout.tsx

* Update NavigationBar.tsx

* add headers back into side panels

* improve writing

* tabs now drag and drop a billion times better

* Update tabs.tsx

* Update tabs.tsx

* init issues on stores, which caused a race condition.

* fix hydration error

* init

* init sidebars

* init

* Update app-default-navigation.tsx

* user dropdown updates

* moar layouts

* init

* moar

* moar

* updat

* reverse top bar

* some banners

* moar

* start adding account page

* change styling of dropdowns

* Update sidebar.tsx

* fix new tab issue in sql

* Update ProjectLayout.tsx

* Update pnpm-lock.yaml

* latest

* Update pnpm-lock.yaml

* moar layouts on account

* getLayout updates

* more fixes

* force a cache build

* moar

* Update app-default-navigation.tsx

* fix AI button animation

* moar layout

* account pages refactored

* Update user-dropdown.tsx

* Update new-tab.tsx

* move EditorMenuListSkeleton

* Fix type issues

* fixes: DESIGN-87

fixes: DESIGN-87

* refactor sort/filter components

* Update rules-set-button-text.tsx

* remove discussions for now

* small styling fixes

* Update FeaturePreviewModal.tsx

* Update FeaturePreviewModal.tsx

* Update RouteValidationWrapper.tsx

* revert

* revert

* revert

* revert

* revert

* more revert

* Update collapse-button.tsx

* Update SQLEditorTreeViewItem.tsx

* revert

* Update SchemaGraph.tsx

* Delete new-upcoming.tsx

* revert

* Update ProjectLayout.tsx

* fix home link

* Update table-editor.spec.ts

* test update

* Update projects.tsx

* remove

* Delete sidebar-open-top-banner.tsx

* add organizations page

* Update table-editor.spec.ts

* Fix the playwright tests.

* layout fixes

* layout fix

* revert sort/filter

* Update LastSignInWrapper.tsx

* revert

* revert

* remove

* update file names

* revert

* revert

* revert

* advisor lint page tabs revert

* revert

* revert

* revert

* revert

* revert

* revert tabs

* remove packages

* add sidebar

* sidebar docs added

* add sidebar

* fixed issues

* fix mobile

* fixes

* add org side bar in

* redirect updated

* fix more layouts

* move settings icon back down

* remove old stuff

* Delete SideBar.tsx

* use ProfileImage component

* spelling

* Update ThemeSettings.tsx

* Update ThemeSettings.tsx

* Update Sidebar.tsx

* layout udpate

* Update Sidebar.tsx

* fixes

* Minor lints

* Update Sidebar.tsx

* create a alt user dropdown for self hosting and local

* add fragment back in

* Adds Theme Selector for local/self hosting

* Update UserDropdown.tsx

* fix theme selector for local self host

* Update index.ts

* Update DefaultLayout.tsx

* now supports feature preview

* remove old files

* rename files

* revert

* Update LayoutHeader.tsx

* clean

* revert

* revert

* Update resource-banner.tsx

* remove redundant side bar stuff

* organizations action bar updated. removed hardcoded value

* fix type errors

* fix tests

* Undo test changes

* Fix account pages for when feature preview is off

* Bug fixes 1

* Missing key in map of EmailTemplates

* Fix missing border in StorageExplorer

* fix missing header in performance advisor

* Final clean up

* Fix DefaultLayout re-rendering issue on auth pages

* A couple of fixes

* Redirect to /organizations if land on /projects with feature preview on

* Route back to /projects if toggling preview off on /organizations

* Add HomePageActions to /org/slug

* make re-routing nicer

* Moar fixes

* Fix logging in redirect to /organizations irregardless of feature preview

* Fix missing withAuth in OrganizationLayout

* Minor clean upo

* Fix branch dropdown not aligned

* Add feature preview for update layout

* update dropdowns to only be chevron triggered in new layout

* Update content-query.ts

* Update entity-types-infinite-query.ts

* add IS_PLATFORM for org dropdown

* Add IS_PLATFORM check for EnableBranchingDropdown in LayoutHeader

* Midway fixing mobile nav

* Mobile nav fixes

* Address feedbacks

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2025-04-08 11:32:29 +08:00
Joshen Lim 5eddb59e36 Fix enabling captcha link to protection page, and add docs to captcha providers (#34789) 2025-04-07 21:03:34 +08:00
Joshen Lim 530988bc90 Set URL provider value to null on auth providers on cancel and save (#34788) 2025-04-07 19:00:55 +08:00
Joshen Lim 6d0a742ab7 Chore/fix linkedin OIDC checking in user overview (#34690)
* Fix linkedin oidc checking in UserOverview

* Improve refactor

* Update

* Last fix
2025-04-03 13:56:30 +02:00
Joshen Lim 6fc55300ed Support 1dp for inactivity timeout (#34654)
* Support 1dp for inactivity timeout

* Clean
2025-04-02 18:41:33 +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 DimitrovskiandJoshen Lim 672cc26eab fix: improve description for remove mfa factors button (#34105)
* fix: improve description for remove mfa factors button

* Update copy

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-03-29 13:28:50 +01:00
Stojan Dimitrovski 8b8a29ddf2 feat: clerk tpa fully available (#34402) 2025-03-28 17:23:31 +01:00
58272034b1 Multiple assistant chats (#34011)
* add assistant chats

* refactoring

* refactor

* refactor to use onfinish

* fix ts

* dependencies removal

* Update useAssistant.ts

* ts

* refactor useAssistant hook to valtio store

* Minor tweaks

* Add name param to newChat, and add names to each call of newChat

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-03-28 16:36:41 +08:00
Joshen Lim 8dc3ed42b8 Advisor Rules (Part 1) (#34175)
* Scaffold advisor rules

* Wrap up implementation

* Add feature flag

* Fix type issues

* Fix types

* fix

* Scaffold

* Revise UI for advisor rules

* Hide edit button

* Refactor AdvisorRulesLayout

* Some fixes from PR feedback
2025-03-28 15:51:19 +08:00
Kamil Ogórek 861fe9ec88 fix: Update TS checks according to latest API changes (#34372) 2025-03-25 14:24:52 +01:00
Saxon Fletcher ecaba079be fix duplicate policy name (#34316)
* fix duplicate policy name

* style
2025-03-21 11:28:36 +08:00
Saxon Fletcher 2d48ba3314 Click function/trigger/policy to edit (#34172)
click to edit
2025-03-13 20:49:33 +10:00
Charis 64bc54aa44 clarify length of recent session (#34097)
"logged in recently" is too vague a description to be useful, so added the actual time
2025-03-10 16:19:42 +01:00
Saxon FletcherandJonathan Summers-Muir 83bcb1e891 Updating authentication rate limits and session pages (#33957)
* init PrePostTab component

* init

* support auto fixing rounded of inputs/select/textarea

* remove form item layout prepost

* Update FormLayout.tsx

* Update FormLayout.tsx

* Update FormLayout.tsx

* form layout and advanced

* Update advanced.tsx

* protection and hooks

* rate limits and sessions

* remove default value

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2025-03-05 09:42:13 +10:00
Saxon FletcherandJonathan Summers-Muir 5bd430ca38 Updating authentication mfa and url pages (#33956)
* init PrePostTab component

* init

* support auto fixing rounded of inputs/select/textarea

* remove form item layout prepost

* Update FormLayout.tsx

* Update FormLayout.tsx

* Update FormLayout.tsx

* form layout and advanced

* Update advanced.tsx

* protection and hooks

* mfa and url

* remove onchange

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2025-03-05 09:42:02 +10:00
Saxon FletcherandJonathan Summers-Muir 419252c102 Updating authentication email pages (#33958)
* init PrePostTab component

* init

* support auto fixing rounded of inputs/select/textarea

* remove form item layout prepost

* Update FormLayout.tsx

* Update FormLayout.tsx

* Update FormLayout.tsx

* form layout and advanced

* Update advanced.tsx

* protection and hooks

* auth emails

* preview styles

* fix

* parse

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2025-03-04 10:22:45 +10:00
Saxon FletcherandJonathan Summers-Muir 326d2cbdcb Update authentication advanced page (#33955)
* init PrePostTab component

* init

* support auto fixing rounded of inputs/select/textarea

* remove form item layout prepost

* Update FormLayout.tsx

* Update FormLayout.tsx

* Update FormLayout.tsx

* form layout and advanced

* Update advanced.tsx

* protection and hooks

* fix

* parse

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2025-03-04 09:58:25 +10:00
Saxon FletcherandJoshen Lim 73644db62d Link to auth provider (#33951)
* link to provider

* Simplify implementation

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-03-03 17:03:10 +08:00
Joshen Lim 469dbd08c7 Tiny nit advanced auth form (#33740) 2025-02-21 17:56:05 +08:00
Joshen LimandSaxon Fletcher 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 LimandAlaister Young 38c5a38fa7 Chore/shift max auth db conns to auth advanced (#33729)
* Shift max auth db connections to auth advanced page

* Update URL for max auth db conns in empty state for auth settings

* Update check

* Fix

* fix form

* more fixes

* JESUS

* Add units

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-02-20 20:08:49 +08:00
Kamil Ogórek 0136e7bf52 fix: mfa_max_enrolled_factors value of 0 is valid (#33713) 2025-02-20 09:46:06 +01:00
Jordi Enric ee7f7e4b42 Update Log Detail (#33536)
* state refactor & new log detail

* fix type in tests

* use new hook in auth page logs
2025-02-19 16:44:44 +01:00
Saxon FletcherandJoshen Lim 28fe5811de Inline editor feature preview (#33541)
* add edge function knowledge

* deploy edge function mutaton

* add edge function block with deploy

* update function url

* update tools

* editor sql

* add templates

* use monaco editor

* hook up templates

* fixes

* add behind feature flag

* preview docs

* move editor

* initialPrompt

* consolidate widgets

* remove generic editor

* move logic

* fix ts

* include schema metadata

* Fix width of save snippet button

* Set tooltip position

* Use inlineLink component

* Remove unnecessary z index

* Lint

* Lint import statements in EditorPanel

* fixes

* fix keyboard shortcut

* show/hide results and invalidation

* fix focus issues in widget

* fixes

* fix ts

* Support cmd enter shortcut to run query in InlineEditor

* Update InlineEditorPreview to use admonition

* prompt updates

* add discussion url to preview

* schemas array

* One last clean up

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-19 14:58:58 +10:00
Jordi EnricandJoshen Lim 9f7c8f21ad Auth Management: Add link to open full log (#33359)
* add link to open full log

* fix bg overflow and border radius

* show button on focus for keyboard navigation

* Add logic to set selected row from url param

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-13 12:03:22 +08:00
Joshen Lim 6bba977213 Small refactor to use a separate confirmation modal for right click delete user (#33542) 2025-02-12 16:15:19 +08:00
Joshen Lim 25a4424869 Add context menu to auth users (#33524)
* Add context menu to auth users

* Smol lint
2025-02-12 11:24:02 +08:00
GulshanandJoshen Lim 0d9be5cfac Fix/auth config update (#33459)
* fix auth config update

* add comment

* Consolidate variables

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-11 19:36:28 +08:00
d4e9ea0b31 Move authentication settings (#33335)
* all settings moved into the right places

* clean a few things up

* update ui for auth settings

* more updating

* rearrange settings

* Update SmtpForm.tsx

* updated styling

* add old auth page to show links

* add copy

* udpate copy

* smtp links

* auth fixes

* Smol fix

* Another smol fix

* Fix tab page menu selection

* Add missing border

* Gah one last one

* Smol improvement for redirects from settings/auth to use id

* Update apps/studio/components/layouts/AuthLayout/AuthLayout.utils.ts

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>

* Update apps/studio/pages/project/[ref]/auth/mfa.tsx

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>

* Update apps/studio/pages/project/[ref]/auth/mfa.tsx

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>

* remove recommendation

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
2025-02-07 14:36:11 +10:00
Joshen Lim 7c9e450c0f Optimize auth users GH avatar img fetching (#33343)
* Optimize auth users GH avatar img fetching

* update

* Add try catch
2025-02-05 17:03:08 +08:00
Joshen Lim a7f872dd4e Set stale time for users infinite query on auth/users to infinite (#33308) 2025-02-04 19:53:35 +08:00
Joshen LimandAlaister Young cc6c6bf096 Fix unnecessary requests in auth users (#33269)
* Fix unnecessary requests in auth users

* fix hasNextPage

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-02-04 15:45:13 +08:00
Joshen Lim 5024df75c0 Refactor auth users the way we retrieve providers (#33258)
* Refactor auth users the way we retrieve providers

* Fix

* Fix
2025-02-04 10:38:12 +08:00