Commit Graph
88 Commits
Author SHA1 Message Date
Kamil Ogórek 7dd11016a4 ref: Use local state to improve GitHub integration security (#29321) 2024-09-16 16:46:33 +02:00
Long Hoang db35ef9f3c feat: show new org page on first login for subset of users (#29188)
* feat: show new org page on first login for subset of users

* chore: keep local storage key in constants
2024-09-12 16:21:01 +08:00
Joshen Lim 17fd107f50 Chore/persist schema visualizer node positions (#29136)
* Midway implementing persist schema visualizer node positions

* Implement persisting node positions in local storage

* Fix SupportForm

* Improve default positions of new nodes
2024-09-09 11:11:32 +08:00
Terry SuttonandIvan Vasilov f8228f1f48 Chore/update opt in message (#28846)
* Working

* Allow for opting-in in place on the SQL Editor page

* Show a warning after the first message

* Fix width

* Remove import

* Add context to schema dropdown

* Cleanup

* no message

* Revert the package-lock.json.

* Remove the extra div.

* Move the confirmation modal outside so that it can be triggered by the first message alert.

* Add another alert to guide the user to selecting a schema.

* Fix imports

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-09-03 15:04:01 -02:30
Joshen Lim 25bf3eae89 Silence config cat warnings (#29034)
* Silence config cat warnings

* Refactor
2024-09-03 11:09:13 +07:00
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 YoungandKevin Grüneberg bee86a9c63 feat: upgrade via pricing page (#28942)
* feat: upgrade via pricing page

* reinstall cmdk

* fix button size

* improve search & autoclose

* Update apps/www/lib/fetchWrapper.ts

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

* Update apps/www/lib/fetchWrapper.ts

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

* update telemetry events

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-08-28 21:43:00 +00:00
Ivan Vasilov 8c6d0f1890 feat: Save the selected schema in the URL and local storage (#28662)
* Add nuqs package.

* Add useSchemaQueryState hook.

* Use the new hook in all places where there's is a schema selector.

* Make the useQueryState work with SSR in playwright.

* Fix the saving to local storage to happen as a side effect without any additional rerenders.
2024-08-19 13:28:25 +02:00
Jordi Enric 7da83a9080 Add last sign in method used to sign in ui (#28631)
* add last sign in feat

* wrap only the button for email, update colors in wrapper

* foreground light for wrapper text

* use a Badge and move it to the right

* add outline

* use default colors
2024-08-15 11:03:13 +02:00
Ivan VasilovandJoshen Lim 6a29cd2bec feat: Choose which schemas to share with OpenAI (#28594)
* Change the getEntityDefinitions query to accept list of schemas instead of being hardcoded to public schema.

* Add a schema combo box for selecting schemas.

* Use the combobox in the SQL editor to select which schemas should be sent to the AI when asking a question.

* Add configurable schemas to AiPolicyEditor.

* Remove unneeded hook.

* Fix the AI settings modal.

* Add keys to the entity definitions query.

* Fix the AI settings modal which is used by cmdk flow.

* Minor fixes.

* Address feedback

* Some fixes

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-08-15 14:38:19 +08:00
Ivan Vasilov d6a33be225 feat: Make the AI panel in the SQL Editor resizable (#28506)
* Fix a "A component is `contentEditable` and contains `children` managed by React." error. Reexport ResizableHandle from react-resizable-panels. Add correct display name for text area.

* Change the AI panel to be resizable.
2024-08-09 16:23:14 +02:00
Ivan VasilovandJoshen Lim 0895081f4f fix: Make the onCopyUrl work on Safari (#27215)
* Add a new hook for copying URLs.

* Refactor the copyToClipboard function.

* Make the onCopyUrl function awaitable.

* Fix the test.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-08-07 13:50:50 +08:00
f0cacd6223 Add an Authenticator Assurance Level toggle for impersonating users in Studio (#28332)
* Add AAL2 toggle for user impersonation

* Move AAL toggle into user selector & tweak styles

- Since the AAL level can only be toggled before a user is selected, move the toggle into the user selection area
- Also display the AAL status in the UserImpersonatingRow and the RoleImpersonationPopover
- Improve display styles

* Run prettier

* - fixes light mode text issue
- adds "Advanced options" collapsible
- adds info tooltip linking to MFA docs

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
2024-08-02 15:39:16 +08:00
Charis 5cd8384bca feat(docs), refactor(docs,studio): add regions list to docs (#28125)
* feat(docs), refactor(docs,studio): add regions list to docs

Adds list of supported AWS regions to docs.

Pulls the region information into `shared-data` package to provide common source of truth for dashboard and docs.

* style: format
2024-07-23 12:45:44 -04:00
Pamela Chia 1904d02e33 chore: remove unnecessary telemetry (#28127) 2024-07-23 13:39:35 +08:00
Etienne Stalmans 22d66f4999 chore: update docs and templates with search_path (#28066)
Advisor warns about missing search_path on the handle_new_user function,
which we supply in docs and SQL starter templates.
We have updated this in some docs but haven't pulled it through to everything
2024-07-18 17:54:15 +02:00
Alaister YoungandJoshen Lim b897d51a53 feat: use TUS for file uploads in dashboard (#28030)
* feat: use TUS for file uploads in dashboard

* handle upload progress

* add fallback for mime types

* lowercase extensions

* add note about mime

* Handle file size 0 and make check for nbsp replacement

* Fix NaN in progress

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-07-17 13:27:00 +08:00
Alaister YoungandKevin Grüneberg 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 9123889139 Ignore 504 errors on sentry (#27745)
* Ignore 504 errors on sentry

* Ignore insertBefore errors

* Ignore r.default.setDefaultLevel is not a function

* Ignore copyToClipboard errors
2024-07-02 19:23:28 +08:00
Joshen Lim 4b367a53ea Fix changing provider doesnt change default region (#27615)
* Fix changing provider doesnt change default region

* Update package-lock
2024-07-02 15:15:17 +08:00
Alaister Young c918aea9ee chore: new project statuses (#27213)
* chore: new project statuses

* add restarting layout

* add restore failed state

* update project cards

* update wording

* fix ts errors

* address feedback

* add pause failed state
2024-06-24 16:06:58 +08:00
Jonathan Summers-MuirandJoshen Lim 330ae6e407 [Dashboard] Chore/refactor new project form (#26997)
* init layouts in project settings

* Update general.tsx

* update gap

* Update Scaffold.tsx

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* spacing issues

* now added a enabled switch

* Revert "now added a enabled switch"

This reverts commit f22050302a.

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* revert

* Update project-postgrest-config-update-mutation.ts

* add bottom padding

* init changes

* Update PostgrestConfig.tsx

* Update [slug].tsx

* Update PostgrestConfig.tsx

* fix

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* Pull updates, resolve conflicts

* remove staging/local specific logic.

• stopped provider Select from flashing
•

* Update [slug].tsx

* split up region query

* Update [slug].tsx

* Update [slug].tsx

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-06 19:32:10 +08:00
Joshen Lim 9e45053d25 Chore/sql editor pagination of results (#26857)
* Add pagination to SQL editor for results longer than 100 rows

* Change pagination to automatically setting a limit

* Fix

* Address initial comments

* Compress SQL editor actions when ai assistant is open and screen is of a certain width

* Fix checking

* Add some fixes and tests

* Add a message if the query had an error and the limit was applied

* Rename to suffixWithLimit

* Small refactor and fix
2024-06-04 15:20:18 +07:00
0a0f2260f9 Chore/gracefully handle large text or json in table editor (#26792)
* Support rendering large text/jsons in grid

* Support rendering large json in side panel, and large text in grid

* Support rendering large text in side panel

* Fix

* Update comment

* Fix the editValue type for json fields.

* Fix

* Update blur value

* Fix

* Feex

* Padding bump

* Small refactor

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-05-29 17:10:07 +08:00
Ivan Vasilov 71f860b28d fix: Use beforeSend hook in Sentry to check for telemetry consent (#26700)
* Add a beforeSend hook to sentry client config.

* Remove the canSendTelemetry function and all its uses.

* Use captureException for capturing unhandled error messages.
2024-05-23 17:04:27 +02:00
Monica Khoury cd43912a2f Chore: block multiple account deletion requests (#26304)
* Chore: block multiple account deletion requests

* add key to LOCAL_STORAGE_KEYS
2024-05-23 09:02:47 +00:00
Ivan Vasilov 79dbfd1ccc fix: Add sourcemaps and error stacks in Sentry errors (#26474)
* Use Sentry Error boundary.

* Add a button for throwing error to test the sentry error boundary.

* trigger an error during rendering.

* Move the throwing of error.

* Fix the error boundary state.

* Try to throw an error from the project list.

* Revert to using react error boundary.

* Minor fixes.

* Add an example page for throwing an exception to be caught by Sentry. Remove the error filter from the Sentry client config.

* Remove config for allowing errors only from our code.

* When capturing an exception with Sentry, add a tag if the exception is in the boundary.

* Minor fixes.

* Remove testing code.

* Move forgotten code.

* Add a function for anonymized user id.

* Set the sentry user id by anonymizing the actual user id.

* Don't send Sentry reports if the user hasn't consented to the telemetry.

* Add a helper function whether the studio can send telemetry data.

* Reuse the helper function in the _app file.
2024-05-22 10:35:15 +00:00
divit 45a9555c3b feat: change default region to us east (#26336) 2024-05-15 17:09:36 +05:30
Ivan Vasilov 6f5cabdc62 feat: Make the conversational AI in the SQL editor default (#23142)
* Remove feature preview for the conversational AI for SQL editor.

* Remove all code related to the previous implementation of editor ai.

* Update the snapshots for the ai commands.

* Remove unneeded code from the ai panel.

* Show the diff bar when debugging.

* Convert the updateEditor function into a callback.

* Simplify the debugging functionality by using react state instead of react context.

* Erase the AI disclaimer when formatting code as modification.

* Add a button to clear the chat history.
2024-05-14 15:40:42 +02:00
Pamela Chia 44610ba978 chore: remove deprecated comments (#25840) 2024-05-07 22:36:05 +08:00
Kevin Grüneberg ac1225249f Revert "chore: switch default provider to AWS (#23435)" (#23436) 2024-04-30 08:40:11 +00:00
Kevin Grüneberg 0677469bb0 chore: switch default provider to AWS (#23435) 2024-04-30 07:51:05 +00:00
Jordi Enric ff8a306a76 Feat: query performance - add btn to hide bottom section (#22902)
* add btn to hide bottom section

* fix onResetReportClick not being optional for old UI
2024-04-19 14:09:58 +02:00
Charis 5d8cef6040 fix: update all examples and snippets to use select for auth rls func… (#22632)
fix: update all examples and snippets to use select for auth rls functions
2024-04-11 12:56:11 -04:00
Jordi Enric 5675b59d00 fix icons in reports menu (#22426)
* fix icons in reports menu

* use product icons instead
2024-04-03 09:08:01 +00:00
Kevin Grüneberg 927b61e7cf feat: supavisor egress chart (#22424) 2024-04-03 16:39:35 +08:00
Kang Ming 87f7f6ce81 chore: bump supabase-js (#22361)
Revert "Revert "chore: bump supabase-js" (#22325)"

This reverts commit 67e1b1b00b.
2024-04-03 14:23:55 +08:00
Joshen Lim 0d300642c4 Revert "Prevent creating projects in west us" (#22399)
Revert "Prevent creating projects in west us (#22396)"

This reverts commit a51fea999f.
2024-04-02 07:52:38 +00:00
Joshen Lim a51fea999f Prevent creating projects in west us (#22396) 2024-04-02 14:23:08 +07:00
280928a8e6 Feat/lints (#22003)
* Add lints, 2

* Add basic table

* Handle ignoring lints

* Add loading state

* Cleanup

* move utils

* Cleanup

* Shift lint to react query

* Merge master solve import lint issue

* Update lints UI

* Optional params

* Add entity and schema name

* Rename lints to linter, format results

* Wrap in markdown

* Adjust layout of some components

* Add CTAs to each lint

* fix ignored problems section

* Update type

* Add cta buttons for auth rls initialization issues

* Change metadata object

* Remove unneeded file.

* Add a component for CTA for a lint row.

* Make the lint query to be more type-safe.

* Various fixes to the lint table.

* Show the remediation link.

* Fix the button icons.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-04-01 20:37:48 +00:00
Kang Ming 67e1b1b00b Revert "chore: bump supabase-js" (#22325)
Revert "chore: bump supabase-js (#22312)"

This reverts commit 0ff546a539.
2024-03-29 04:45:11 +00:00
0ff546a539 chore: bump supabase-js (#22312)
* chore: bump supabase-js

* more gotrue renames

* chore: update types

* chore: prettier

* chore: typings

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Bobbie Soedirgo <bobbie@soedirgo.dev>
2024-03-29 11:18:04 +07:00
Kang MingandJoshen Lim 0a569e4790 feat: add anonymous sign-ins config (#21813)
* feat: add anonymous sign-ins config

* fix: update anonymous sign-ins toggle & policy editor

* Couple of UX changes

* fix: update user impersonation with is_anonymous claim

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-28 00:14:42 +07:00
cc9ed7174f feat: limit sign-in password length to 72 (#20571)
* feat: limit sign-in password length to 72

* limit password length on signup

* Update apps/studio/lib/schemas.ts

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

* Update apps/studio/components/interfaces/SignIn/SignInForm.tsx

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

* don't limit password length on sign in

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-19 16:45:25 +07:00
Kamil Ogórek 45421ed917 ref: Add GitHub configuration/revoke links for better UX (#22005) 2024-03-14 12:38:57 +11:00
Joshen Lim 6b741bc964 Replace ui setnotification with toast midway (#21867)
Replace ui setnotification with toast
2024-03-08 15:46:52 +08:00
Alaister Young c5afd2e7f8 chore: add branching feature flag (#21840)
* chore: add branching feature flag

* rename BranchingWaitListPopover component

* remove preview branch opt in tag
2024-03-07 11:05:55 +00:00
Alaister YoungandJoshen Lim 384b6c4f58 Braching fixes 06/03 (#21800)
* branching fixes 06/03

* fix width in project linker

* add space

* Fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-06 20:49:10 +11:00
7548fd1850 feat: Conversational AI for the SQL Editor (#21388)
* Add a API endpoint for generating queries for the SQL editor.

* Merge all multiline props.

* Add a new component for diff actions.

* Copy components for the AI panel.

* Add useChat hook.

* Add a feature preview for the this feature. The preview is dependent on the feature flag.

* Reorder the nesting in the SQL editor to accomodate the AI assistant.

* Try to fit both AI assistants in the SQL editor, available via a feature preview.

* Refactor the SQL editor to make the diff work correctly in all cases.

* Minor fixes for the old AI feature.

* Fix the debug functionality to work with both assistants.

* Fix some copy-paste leftovers.

* Remove unneeded code.

* Make the icons softer.

* Fix the name of the panel component.

* Fix console.logs.

* Add overflow to the AI assistant.

* surface opt in config in ai settings button

* Skip diffing if editor is empty

* Add selected state when selecting a message to insert/replace code

* Add sample prompts

* Add SQL ai dislaimer when replacing code

* Light mode action bar nudges

* Add text for the feature preview.

* lang nudges

* Hide the command suggestions for now.

* Set the discussion url to undefined.

* Don't add the disclaimer twice.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-03-05 17:26:11 +01:00
Kevin Grüneberg 0073518136 perf: improve prism-react-renderer setup (#21752) 2024-03-05 12:51:11 +08:00