Commit Graph
475 Commits
Author SHA1 Message Date
Jordi Enric 381d936c4d fix: dates and 14 day selector (#21783) 2024-03-05 18:24:14 +01: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
Jordi EnricandJoshen Lim 010aa4bf90 fix: add payment method fix - revert hcaptcha changes (#21781)
* revert

* Fix missing hcaptchastore import in _app

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-05 23:51:16 +08:00
Beng Eu 64bbbab499 fix: invalidate project details after connected successfully (#21778) 2024-03-05 23:29:57 +08:00
Kyle Rummens 523f241067 Fix/#21742 format stats chart numbers (#21760)
fix: format numbers in statistics charts on hover
2024-03-05 15:11:17 +00:00
Terry Sutton f3086ddbd5 Fix snippet truncation (#21777) 2024-03-05 09:55:08 -03:30
Beng EuandJonathan Summers-Muir 26a10bee92 feat: add alert for restart of projects scheduled for migration, showing planned maintenance window (#21701)
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2024-03-05 21:12:54 +08:00
Kevin Grüneberg 0f251bc337 chore: bump turbo (#21773) 2024-03-05 12:49:12 +01:00
Jonathan Summers-MuirandJoshen Lim 9104cbc359 Chore/add first pattern docs (#21741)
* remove un-needed stuff

* Update preview.js

* Update preview.js

* upgrade sb

* Update preview.js

* chore: main init of the confirmTextModal

* update modals

* dialog positioned fixed

* fix backdrop

* chore: overlay now wrapping DialogContent !!

* more modal updates

* fix props

* update size

* padding fixed

* Update Dialog.stories.tsx

* add padding to more Dialog stuff

* update text

* start using subcomponents in storybook

* make thinner because it's too wiiiiide

* Tiny fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-05 18:08:28 +08:00
Jonathan Summers-MuirandJoshen Lim 8c68a09fc4 Chore/improve search input sql editor (#21546)
* init input and button changes

* clean up

* button now active state when dropdown or popover active

* Update TableEditorMenu.tsx

* Update TableEditorMenu.tsx

* fix hover issues

* Update SchemaSelector.tsx

* Add new patterns for inner side panel. expose HoverCard. Update Tooltip

* update SQL editor patterns

* Fix general bugs found, just not 100% on the UX

* Revert default open

* row back changes

* improve empty state

* update snippet headers

* Small fixes

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-05 17:47:49 +08:00
Beng Eu c390068102 fix: handle new size for connection pooling settings (#21700) 2024-03-05 13:14:43 +08:00
Kevin Grüneberg f16810af06 perf: load hcaptcha on demand (#21745) 2024-03-05 12:52:39 +08:00
Kevin Grüneberg c98c59938a perf: lazyload feature preview modal (#21744) 2024-03-05 12:51:47 +08: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
Div Arora cc2425d11b fix: typo in region name (#21761) 2024-03-05 09:43:06 +08:00
Wen Bo XieandCharis 4085e31304 docs: re-order Read Replicas doc sections (#21703)
* docs: re-order Read Replicas doc sections

* chore: fix typo about compute size change

* Update apps/docs/content/guides/platform/read-replicas.mdx

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

* Update apps/docs/content/guides/platform/read-replicas.mdx

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

* Update apps/docs/content/guides/platform/read-replicas.mdx

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

* docs: remove duplicate image

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2024-03-04 15:09:12 -08:00
Michael Owen b7ea0994e4 Format numbers in statistics charts #21742 (#21750)
use Intl.NumberFormat() without explicit locale.
2024-03-04 18:36:44 +00:00
Kevin Grüneberg f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
Joshen Lim fb9dfac075 Remove observer and ui.setNotification calls (#21725)
* Remove observer and ui.setNotification calls

* lint

* Fix missing export
2024-03-04 11:12:22 +00:00
Kevin Grüneberg 13cfc0abb5 fix: barrel imports (#21728)
Avoid importing all components via barrel files that lead to bloated bundles/chunks
2024-03-04 18:39:53 +08:00
Ivan Vasilov 520562f72e fix: Better errors in SQL editor (#21696)
Throw the same error instead of wrapping it and losing information like formattedError.
2024-03-04 11:18:15 +01:00
Joshen Lim bb5108e154 Chore/foreign key management in column editor (#21683)
* Support adding foreign key via ColumnEditor

* Support updating/deleting foreign key from ColumnEditor
2024-03-04 16:00:00 +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
Joshen Lim 5c9ab30902 Close nav bar on click link (#21686)
* Close nav bar on click link

* Remove onClick for navigationiconbutton

* If user clicked on nav icon thats within the nav bar, dont reopen until mouse left side bar once

* Fix
2024-03-04 15:05:20 +08:00
2901606b08 feat/ add log out button, and user details into user popover (#21724)
* Update NavigationBar.tsx

* small nits

* only show email if it's different from username

* Update apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-03-04 06:43:41 +00:00
Joshen Lim 8fa042930e Update content to show project ref (#21680)
* Update content to show project ref

* fix

* Fix

* Remove stray console logs

* Fix

* Update
2024-03-04 14:14:24 +08:00
Pamela Chia 6cf3fcc20b chore: improve disk related descriptions (#21720) 2024-03-04 12:43:10 +08:00
Alaister Young 528285b54d fix: remove wrong non-null assertion operator (#21717)
* fix: remove wrong non-null assertion operator

* make organizationSlug optional

* also make projectRef optional while we're at it
2024-03-03 18:38:19 +11:00
Terry SuttonandJoshen Lim 8f9b1367c1 Chore/fix intellisense query (#21702)
* Remove window check on intellisense query

* Fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-02 03:59:08 +00:00
Jordi Enric 24da48d0b1 FIX: rm breaking error handler (#21692)
rm breaking error handler
2024-03-01 15:36:57 +01:00
Jordi EnricandJoshen Lim 6fcb3c1254 feat: SQL Editor Charts (#21638)
* add charts

* add ff

* Some minor style fixes

* Fix

* reuse imports for resizable

* fix jsonb breaking the chartconfig component, fix format of numbers in chart

* swap checkbox compo

* rm unnecessary divs, make jonny happy

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-01 13:38:14 +01:00
Ivan Vasilov 0942bfee87 fix: Refactor the host calculation logic for the realtime inspector (#21689)
Refactor the host calculation logic for the realtime inspector.
2024-03-01 11:48:33 +01:00
Jonathan Summers-Muir d8e7ecbfe5 Chore/move dialog to patterns (#21688)
* update exampleps

* move text confirm modal
2024-03-01 10:47:36 +00:00
Jonathan Summers-Muir c4a492002b Chore/move confirmation dialogs (#21651)
* move confirmation dialogs

* Update index.tsx

* Update ExtensionCard.tsx
2024-03-01 18:16:25 +08:00
Ivan Vasilov 59a109a78f fix: Remove all csp rules for non-platform studio (#21666)
Remove all csp rules for non-platform studio.
2024-03-01 10:33:16 +01:00
Francesco Sansalvadore 502931b537 update favicons (#21635)
* update all favicons

* prettify manifest

* switch studio and docs favicons

* prettify manifest
2024-03-01 12:26:48 +08: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
Alaister Young a8ee3a212b feat: branching statuses first pass (#20631)
* feat: branching statuses first pass

* handle error

* use warning icon
2024-02-29 20:18:00 +11:00
Jonathan Summers-Muir 1bff39b956 Update ConnectDropdown.tsx (#21654) 2024-02-29 15:24:48 +08:00
Joshen Lim edcc89ce81 Disable cancel button when creating org (#21653) 2024-02-29 05:48:54 +00:00
Joshen Lim a6379bc15b Add separate flag to disable compute size changes (#21629)
* Add separate flag to disable compute size changes

* Add check in onConfirmUpdateComputeInstance

* Update

* Lint import order
2024-02-29 13:14:33 +08:00
Joshen Lim 0ddd1b4711 Remove duplicated types-query, use enumerated-types-query instead (#21632)
* Remove duplicated types-query, use enumerated-types-query instead

* Fix type
2024-02-29 11:29:57 +08:00
Joshen Lim 2cd98f6f3d Configure speed insights (#21627)
* Configure speed insights

* Update CSP

* bye speed insights
2024-02-28 09:34:38 +00:00
Joshen Lim 7c8786b26c Minor fixes to collapsible nav (#21626)
* Minor fixes to collapsible nav

* Revert back to 109
2024-02-28 08:11:03 +00:00
Joshen Lim 4002dce2ad Add vercel speed insights (#21625) 2024-02-28 15:57:45 +08:00
Jonathan Summers-MuirandJoshen Lim eb5039c5e6 Feat/collapsible nav bar (#21550)
* Update IconButtons to expose all props and pass ref. Use UI lib tooltip instead.

* start making it collapsible

* Update app-state.ts

* more transition stuff

* add new icons in. add icon size control with constants

* rename component

* wordmark added

* fix up bottom options

* Update NavigationBar.tsx

* Update NavigationBar.tsx

* Update NavigationIconLink.tsx

* Update NavigationBar.tsx

* add button component

* Update NavigationBar.tsx

* Update NavigationIconButton.tsx

* Update NavigationBar.tsx

* Delete supabase-wordmark.svg

* Add key prop

* Lint classname

* Lint

* Small fixes

* Refactor some handleErrors in EQ

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-28 15:34:16 +08:00
Joshen LimandJonathan Summers-Muir 8deb0865c5 Chore/rls assistant iteration templates (#21447)
* Add templates to RLS assistant

* Update button

* lint

* Chore/rls assistant iteration templates styling (#21459)

* Update index.tsx

* update icon pack

* add new classes

* expose hover card

* add slight shadow to scroll area

* monaco editor updated

* tabs border-b updated

* message styling updated to use circle AI icon

* templates side panel updated to use new tailwind classes and ScrollArea

* Updated tab label to "Assistant" and adjusted background colors

* header updated to use simpler open/close button

* divide-y styling added to chat

* fix tabs bg state

* shadcn tooltip updated to use correct bg color and added default delay duration

* updated styling of codeblocks in chat

* updated open / close button. also added a tooltip

* divide border styling

* add 'slide in' animation option for Hover Card

* update code block

* switch to Card Button

* Update CardButton to expose props and allow any props to be applied

* init

* Apply suggestions from code review

* Add entry step when clicking on create new policy for rls ai

* templates code replacement state highlight selected template

* Ai message code replacement state highlight selected message

* Opt to leave templates panel open

* Fix templates to use template name in policy sql

* Fixes

* fix

* Remove unused imports

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2024-02-28 14:44:17 +08:00
Ivan Vasilov 5b4f27b611 fix: Install python and git when building the Docker image (#21606)
Install python, git and build essentials for both architectures.
2024-02-27 11:32:42 +01:00
Joshen Lim 0bafd1dff7 Dont show empty search results if no projects on home page (#21605) 2024-02-27 18:13:32 +08:00