* Set up banning and unbanning user, although untested due to API CORs issue
* Update search filter UI for users management V2
* Update API types
* Minoir
* Small fix
* Update UI
* Add support for resizing and re-ordering columns
* Add google profile image url to csp
* Revert test button
* Implement toggling of columns
* Fix loading
* Fully implement banning/unbanning user
* Fix
* Update apps/studio/components/interfaces/Auth/Users/UserOverview.tsx
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* Fallback non CSP supported avatar urls to user icon
* Fix some bugs
* Remove prism-react-renderer from studio, add to ui patterns
* Migrate users query from API to studio
* Address some feedback
---------
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* 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>
* 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
* add docs, and creds management
* FIx api types.
* add accesskey to table
* cmt
* fix issues, url, styles, rm unused mutation keys
* Apply suggestions from code review
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
* renaming of things and use correct compos
* Update apps/studio/components/to-be-cleaned/Storage/StorageSettings/S3Connection.tsx
Co-authored-by: Inian <inian1234@gmail.com>
* rename storage url to endpoint
* when a user clicks the X after creating a credential, reset the form
* Fix button component disabled state when loading is true, and add docs url to s3 connection section
* Fixes
* fix btn disabled prop not reaching btn
---------
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Inian <inian1234@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* chore: increase react-query stale time
* keep staleTime: 0 for table rows
* use staleTime: 0 for all user sql queries
* use staleTime: 0 for all pg-meta queries
* Some fixes
* fix updating tables
* fix bug while editing column names
* Fix deleting column in database/tables column list not revalidating UI
* Fix updating column in database/tables column list throwing ane rror
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* 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>
* Add two more sizes to the Panel component.
* Add alias for the older openai-api library. The new one is added under the openai name.
* Add API routes
* Add components for the new AI RLS panel.
* Bunch of changes to the AI Policy Editor.
* Add a button for opening the new Policy Editor.
* Add a feature flag for the new editor.
* Add a confirmation modal when closing the panel.
* Fix leftover data when closing the panel.
* Make the copy button work.
* Add the next/swc packages to package-lock.json.
* Merge master
* Scaffold debug sql in rls editor
* Small improvements to policy chat
* Hook up debug to ai assistant panel
* Improve debug UX
* Add debug request badge
* Some styling fix
* Small styling fix
* Another small styling fix
* Shift create new policy ai button + fix error stylign with code editor height
* Add tooltips to apply changes and copy code from assistant message
* Hide assistant button is not platform
* Small lint
* Add default error handlers to all AI RQ mutations
* Small fix
* Remove IS PLATFORM check for rls assistant
* Add placeholder to RLS code editor
* Fix diff + rls code editor
* Add placeholder message after sending prompt
* Small style
* RLSCodeEditor hit tab if empty to populate placeholder text
* Light mode nudeges
* Update logic for when confirmation close modal should show
* Set render overview ruler as false for rls diff editor
* improve chat UX to make it smoother (thank you alaister for your help 🙏)
* Dynamically do keepPreviousData
* Gracefully handle errors for add prompt
* Use animated ai icon while message is loading
* using Sheet component
* Address commernts
* Bit more improvements
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
* 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.