Commit Graph

45 Commits

Author SHA1 Message Date
Stojan Dimitrovski
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 Young
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
Ivan Vasilov
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
Alaister Young
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 Sutton
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 Rasool
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
Joshen Lim
dd206a1db3 Temp disable euc1 and use1 for project creation (#20945) 2024-02-02 04:17:52 +00:00
Ivan Vasilov
eac073219a fix: Enable APSE (#20909)
* Revert some of the changes in 20982 and 20987.

* The default env for staging should be Singapore.
2024-01-31 23:17:12 +00:00
Joshen Lim
e7a9131d56 Allow apse1 on staging and local only (#20897)
* Allow apse1 on staging and local only

* Fix

* Fix

* Fix

* Fix

* Fix
2024-01-31 15:50:16 +07:00
Joshen Lim
8cc6855cb3 Disable apse 1 prod (#20892) 2024-01-31 05:03:30 +00:00
Alaister Young
f74294612c chore: better ipv6 migration notices (#20817)
* chore: better ipv6 migration notices

* adds multiple dismisses

* add migration for ipv6_active_status rpc

* fix sql syntax

* use rpc

* Fix NoticeBanner acknowledged logic

* ci: Autofix updates from GitHub workflow

* Remove console log

* Lint

* Fix logic

* Update pgbouncer and vercel notices to be project specific

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
2024-01-30 13:54:22 +07:00
Kevin Grüneberg
f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
Kevin Grüneberg
33e7c24f5c chore: use currency formatter (#20755) 2024-01-26 13:13:16 +08:00
Joshen Lim
88ef61bd6f Add cron schema to EXCLUDED_SCHEMAS (#20664) 2024-01-23 09:56:52 +00:00
Thomas
43cc703ce8 Improve Billing Breakdown section (#20498)
* Displays current costs

* Displays Compute Credits

* Adds tooltips for Compute Hours, Compute Credits, Current Costs and Projected Costs

* Formats amounts properly

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-01-22 13:18:51 +01:00
Joshen Lim
b4023b6eb2 Chore/banner for ipv4 deprecation notice (#20334)
* Add LayoutWrapper component to DRY the layout height change when incident banner is toggled

* Add notice banner for pgbouncer and ipv4 deprecation
2024-01-11 16:20:38 +08:00
angelico
8f2ad8bd07 fix: check for major DB version as well (#20332) 2024-01-11 15:44:10 +08:00
Joshen Lim
199dd37ac8 Offer select closest region CTA in project creation (#20262)
* Offer select closest region CTA in project creation

* Update region select CTA to use cloudflare and support all regions

* Auto select region, remove CTA

* Update apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-01-11 15:23:34 +08:00
Ariel Aharonson
6d121f1546 feat(dashboard): Add column-level privileges management (#13745)
* add privileges page

* fix

* fix: could have both global and column-specific privileges + is global per privilege

* Trigger Build

* load permissions data for current table only

* fix style for light theme

* add a guide to Privileges

* Update apps/docs/pages/guides/auth/column-level-security.mdx

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>

* Update apps/docs/pages/guides/auth/column-level-security.mdx

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>

* Update doc

* Update docs

* progress moving privileges to pg-meta

* split up column privileges and table privileges

* adds loading state to toggles

* Add feature flag, move from auth section to database section

* Cleanup

* Update meta store table lists, add header warnings, update docs

* Add alert if any columns have privilages

* Spelling

* fix api.d.ts

* fix link

* move to auth pages

* only show editable schemas

* limit roles

* auto select first table

* remove roles meta store

* inline toggling

* apply privileges all at once

* add preview and use new switch component

* fix spelling

* handle long column names

* warn users about losing changes when changing schemas/tables

* remove strange docs link

* fix feature preview after reload

* use shadcn select

* Update select.tsx

* Minor UX fixes

* Update toast

* Update feature preview image for cls

* update cls warnings

* update warnings

* fix toast message

* Add migration alert to preview page

* Add link to CLS from feature preview, and add empty state on CLS page if feature preview is not enabled

* Shift local storage keys hard code to lib/constants

---------

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-01-10 17:39:03 +11:00
Kevin Grüneberg
d12332ea5a chore: xmas cleanup (#19938) 2024-01-04 17:27:49 +01:00
Stojan Dimitrovski
ebb28813ca feat: remove sentry sign in events (#20084) 2024-01-02 09:22:57 +01:00
Paul Cioanca
8e4a094f26 Revert "Chore: change EU aws region name" (#20050)
Revert "Chore: change EU aws region name (#20044)"

This reverts commit e51fdbdba7.
2023-12-28 20:22:38 +00:00
Monica Khoury
e51fdbdba7 Chore: change EU aws region name (#20044)
* Chore: change EU aws region name

* Prettier

* Prettier
2023-12-28 16:31:41 +01:00
Joshen Lim
da792ba0ba Chore/show rr UI only if project is enabled (#19642)
* Only show RR UI if project is enabled

* Only show RR UI if project has read replicas enabled, shift DatabaseSelector state to valtio, add Database Selector to API URl

* Update usage of Project interface from types to Project from project-details-query

* Fix ts errors

* Another one

* Another one...

* God one more

* Fingers crossed

* jesus

* Add deprecate mark on ProjectBase

* Resolve conflicts

* Rename ProjectState from valtio to DatabaseSelectorState

* Rename file

* fix imports

* tiny code changes

* Fixes

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2023-12-20 16:49:53 +07:00
Ivan Vasilov
563ef1cff2 chore: Remove dangling dependencies and files (#19785)
* Delete probably unneeded files.

* Remove unused deps.
2023-12-18 12:11:15 +00:00
Alaister Young
8706865e85 chore: move sign_in telemetry event (#19823)
* chore: move sign_in telemetry event

* don't clear telemetry consent on logout

* remove # section of page location telemetry url
2023-12-18 15:52:15 +11:00
Joshen Lim
18840b5e3b Chore/column editor show types from extensions schema (#19580)
* Show types from extensions schema in table editor

* Shift postgres types to RQ

* Deprecate types store in mobx

* Address feedback

* Update label
2023-12-11 15:11:23 +07:00
Alaister Young
e6006b9653 feat: user impersonation (#18945)
* feat: user impersonation

* refactor

* add anon impersonation

* add user impersonation to graphiql

* thanks Ivan for this one

* add radio buttons

* progress

* working user selector

* adds loading and error states to user selector

* nicer popover button

* default graphiql to use service role key

* styling updates

* fix padding in graphiql

* add service role warning to graphiql

* add user impersonation to realtime inspector

* add feature flag

* use Alert_Shadcn_ instead of old Alert

* Update apps/studio/lib/role-impersonation.ts

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

* update title

* Update apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx

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

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

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

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

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

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

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

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

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

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

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

* Update apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx

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

* add constant padding at the bottom of user selector

* update graphiql buttons font size

* make rls warning dismissable

* use text-foreground on rls warning title

* fix no results while impersonating a role

* fix error line number when impersonating a role

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2023-12-04 04:45:11 +00:00
Joshen Lim
f65c847b54 Chore/rls ai assistant updates (#19325)
* Have rls ai assistant sit in feature preview + shown via feature flag

* Support editing existing policy in new AI assistant panel

* Beef up feature preview

* Shift AI settings modal to components/ui and add AI settings to RLS AI assistant panel

* Update apps/studio/components/interfaces/App/FeaturePreview/RLSAIAssistantPreview.tsx

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>

* Update apps/studio/components/interfaces/App/FeaturePreview/RLSAIAssistantPreview.tsx

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>

---------

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
2023-12-01 11:24:12 +01:00
Joshen Lim
3620ca8ebe RR Scaffolding Work (#18658)
* Init demo world map for read replicas

* Update package.json

* Scaffold and mock data for flow view of project settings infrastructure configuration

* Shift map stuff and install deck.gl to experiment

* Flesh out map view a bit more

* Scaffold deploy new replica panel

* Add restart replica option

* Add animations, shift node generation into utils, attempt to show region nodes

* Experiments

* General improvement to chart and map UI

* Improve some copy writing for restart and drop replica modals

* Simplify loading, error, success states in DatabaseSettings

* Scaffold DB selection in connection string section

* Link replica node to connection string

* Scaffold database selection for SQL editor

* Make DatabaseSelector into a component

* Add database selector to infra activity

* Update

* Hide read replicas UI behind a feature flag

* Update flags

* Update package-lock

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2023-11-27 12:50:19 +08:00
Alaister Young
301504009f chore: change default region to usw1 (#19138) 2023-11-22 20:19:16 +11:00
Ivan Vasilov
436bdb10ae chore: Move the studio app to apps/studio (#18915)
* Move all studio files from /studio to /apps/studio.

* Move studio specific prettier ignores.

* Fix the ui references from studio.

* Fix the css imports.

* Fix all package.json issues.

* Fix the prettier setup for the studio app.

* Add .turbo folder to prettierignore.

* Fix the github workflows.
2023-11-15 12:38:55 +01:00