* Refactor and remove the CreateFunctionStore.
* Fix a duplicate key in the functions table.
* More fixes for the create-function form.
* Add excluded schemas to schema selector.
* Cleanup the createFunction code after the merge.
* Remove unneeded wrapper fragments.
* Minor fixes for the FormItemLayout stories.
* Refactor the CreateFunction panel using the new FormItemLayout.
* Revert the migration to use FormItemLayout. Will revisit later.
* Add a CSS class for popover content width to match its trigger width. Use it on the schema selector.
* Replace all listboxes with selects.
* Fix the comments.
* Switch to FormItemLayout wherever possible.
* Move the createFunction file to its own folder.
* Refactor the panel to use shadcn components: Sheet, SheetContent and SheetHeader.
* Add showClose prop to the Sheet component.
* Add function editor and a feature to maximize/minimize the code editor.
* Some fixes
* Add sameWidthAsTrigger to the popover component.
* Fix the icon size.
---------
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Connect UI Prisma DATABASE_URL param to be transaction mode - port 6543
* Connect UI Prisma DIRECT_URL param to be pooler string with session mode - port 5432
* Change checking if read replicas can deployed from if PITR addon is available, to if walg is enabled
* Fix RLS assistant not surfacing error
* Update]
* fix
* Final replacements of ui setNotification with toast
* Rip out UiStore
* Rip out UiStore
* Shift files under authConfigSchema to components/Auth
* Rip out use of observers
* Replace all methods of MetaStore with react queries.
* Remove unneeded usages of MetaStore.
* Remove RootStore completely. The only thing left from these stores is uiStore.
* Remove unnecessary comments.
* Delete MetaStore.
* Fix the usage of the wrong toaster.
* Remove unused variables
* Remove onSqlQuery
* Convert some ui setNotification calls to direct toast calls
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* 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>
* 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
* 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>
* Start
* Refactor code and remove unused imports
* Refactor SchemaFlowHandler and UserChat components
* Refactor code and remove unused files
* Refactor Thread component and remove CurrentThreadName import
* Remove oldest_messages view from supabase.ts
* Refactor supabase.ts file
* Hook up loading state ChatInput component and remove old route handlers
* Add updated prompt
* Refactor chat form component and remove unused code
* Make the suspense work when fetching messages.
* Small refactor in the chat assistant form component.
* Experimenting with streaming responses. WIP.
* Move all components to thread_id/message_id folder.
* Massive refactor but uses Nextjs app router properly.
* Add a conditional submit which is used if the user haven't been logged in.
* Add a typecheck command to db-new app.
* Minor fixes.
* Bunch of minor fixes.
* Clean up more code.
* Refactor the AssistantChatForm to use the new React forms features.
* Run fitView after 50 milliseconds because it didn't run in some cases.
* Style and flow nudges
* Prettier
* Delete old file
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Add create, update and delete mutations for tables.
* Use the new mutations instead of the table store.
* Fully remove the TableStore from the MetaStore.
* Move the methods from MetaStore into pure functions in SidePanelEditor utils.
* Remove TableStore.
* Refactor the onError callbacks to be on the mutations.
* Convert some of the UIStore invocations.
* Fixed not closing the modal in case of an error. Migrate some uses of uiStore.
* Use onSettled on all RQ hooks.
* Remove the ui param to the create/updateTable functions.
* Add a missing connection string.
* Add progress bar for loading UI for importing rows
* Update apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.utils.tsx
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* Add highlight for new rls assistant
* Optional close function
* Update UI
* Update button text
* Small style fixes on rls assistant ui
* Small style fixes
* Add cta to revert feature preview in rls assistant
* Fixes and ensure RLS assistant CTAs do not overlap into storage policies
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* chore: improve auth screens loading
* Update apps/studio/components/interfaces/Auth/Users/UsersList.tsx
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* handle error
* better pagination for users list
* disgusting boolean logic
* return user to previous page after deleting last user
* only show reloading indicator when it's refetching
* fix date formatting
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>