Commit Graph
76 Commits
Author SHA1 Message Date
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
Kevin Grüneberg 136728f6ab perf: reorganize a few imports to improve bundle size (#21743) 2024-03-05 12:49:58 +08:00
Kevin Grüneberg f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
74563fbeba chore(branching): GitHub integration 2.0 (#21008)
* start new github integration

* query/mutation updates

* progress

* branch management

* update codegen

* progress

* progress

* Refactor GitHub integration URLs

* Refactor GitHubIntegrationAuthorize component

* Updates

* Do not remove GitHub connection when creating new one

* Deleting a GH connection when branching is enabled for the project, will also disable branching for that project

* Add link to configure connection from org integration settings page

* Slight refactor

* Support updating CWD path

* Change cwd_path to workdir and disallow empty values

* Allow for triggering branches on supabase directory changes only

* Pass missing supabaseChangesOnly value

* Small style fix

* Add Authorization GitHub step

* Small change

* Fix supabase integrations form in project settings

* Revert URLa nd client ID

* Fix UI issues

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com>
2024-03-04 18:17:26 +11:00
Terry SuttonandJoshen Lim 377cb2dc7c Add a toggle for intellisense to the sql editor (#21643)
* Add a toggle for intellisense to the sql editor

* Cleanup

* Ensure that we dont load suggestions in browser unless intellisense is enabled

* Small fix

* Lol spelling

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-29 08:49:33 -03:30
Ivan Vasilov f4f5a8b7e9 chore: Add telemetry events for the realtime inspector (#20672)
* Added telemetry events for the realtime inspector.

* Add some fixes.

* Add headers to the realtime inspector.

* Minor fixes.
2024-02-27 09:57:43 +00:00
Ivan Vasilov b4e768b74f fix: Migrate SQL editor and Log explrorer to use ShadCN Resizable (#21454)
* Add resizable component to ui package.

* Migrate the LogExplorer to use the new resizable component.

* Migrate the SQL editor to use the new component.

* Remove react-split.
2024-02-26 09:39:23 +01:00
Alaister Young 05edf56f55 fix: browser jwt generation (#21544) 2024-02-26 15:50:29 +11:00
Kevin Grüneberg efda654789 chore: sign impersonation JWT with browser crypto (#20212) 2024-02-19 15:16:42 +08:00
Jordi Enric cf1264f614 fix window undefined error when ssr some pages (#21295)
fix
2024-02-15 12:52:57 +00:00
Faizan RasoolandJoshen Lim 31fca2d7ea remove trailing commas (#20781)
* remove trailing commas

* test cases added

* Opt for immutable way in JsonEditor

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-05 14:41:07 +08:00
Kevin Grüneberg becd39cc23 feat: revamped instance size selection (#20765) 2024-02-05 12:03:43 +08:00
Div Arora 68fa83d188 Revert "Temp disable euc1 and use1 for project creation (#20945)" (#20967)
This reverts commit dd206a1db3.
2024-02-03 01:28:39 +00:00