Commit Graph

32 Commits

Author SHA1 Message Date
Jonathan Summers-Muir
748635aa9b Chore/update component imports (#21959)
* init

* fix build issues

* move deps over

* Update CommandMenuWrapper.tsx

* build fixes

* Update sitemap_www.xml

* reset

* Update sitemap_www.xml

* Update tsconfig.json

* Update package.json

* Update package.json

* Update package-lock.json

* Update package.json

* update max w

* fix

* chore: rename imports for Dialog
2024-03-12 04:59:42 +00:00
Terry Sutton
921afb0875 Chore/turn off dbdesign (#21843)
redirect
2024-03-07 10:23:15 -03:30
Terry Sutton
53fa2a8997 Chore/schema visualizer styles (#21614)
* Nudge schema visualizer

* Remove old file

* Fix a forgotten import.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-02-28 11:19:07 +01:00
Jonathan Summers-Muir
84f092ac43 chore: update table editor input and schema selector styling (#21486)
* 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
2024-02-26 13:24:29 +00:00
Terry Sutton
d10804c60e Move cookiestore to client call (#21369)
* Move cookiestore to client call

* Bump ssr package
2024-02-21 10:26:33 -03:30
Terry Sutton
b4fa734c85 Chore/use completions api (#20246)
* 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>
2024-02-19 15:52:58 -03:30
Ivan Vasilov
5754c23abb feat: Move some components into ui-patterns (#20774)
* Change all imports in the ui package which import via the @ui shortcut.

* Add a new ui-patterns package. Add it to all apps.

* Migrate PrivacySettings from ui to ui-patterns.

* Migrate ConsentToast from ui to ui-patterns.

* Remove providers folder from ui package.

* Move GlassPanel.

* Migrate IconPanel.

* Migrate TweetCard.

* Migrate ThemeImage.

* Remove LWXCountdownBanner.

* Migrate CountdownWidget.

* Migrate SchemaTableNode.

* Migrate ExpandableVideo.

* Migrate ThemeToggle.

* Fix bunch of imports in the docs app.

* Revert some unnecessary changes.

* Expand the README.md.

* Fix the tailwind configs, they were using old folder structure.

* Fix leftover merge conflicts.

* Remove a deleted page in master.

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-02-12 12:44:00 +01:00
Joshen Lim
30245c9490 Revert "Feat/sql editor support bulk deletes" (#21003)
* Revert "Feat/sql editor support bulk deletes (#20927)"

This reverts commit 27c2cff395.

* ci: Autofix updates from GitHub workflow

* Lint

---------

Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
2024-02-05 14:01:24 +11:00
Kevin Grüneberg
f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
Greg Richardson
0417b8d96e Fix invalid json in AI doc SSE stream (#20706)
fix: invalid json in ai doc sse stream
2024-01-24 13:00:26 -07:00
Prasad
22ff5e0fa5 19719-File name updated to resolve clone issue (#19720)
File name updated to resolve clone issue
2023-12-14 12:17:25 -03:30
Ivan Vasilov
a72f60ff61 chore: Remove unused stores (#19637)
* Remove DatabaseStore and AppStore.

* Remove ForeignTableStore.

* Remove MaterializedViewStore.

* Cleanup FunctionsStore.

* Remove project functions store.

* Fix a misspell error on master.

* Remove columns, policies and functions stores from the meta store.
2023-12-13 15:37:25 +01:00
Jonathan Summers-Muir
1245ee7236 db design now saving messages to supabase db (#19380)
* First

* Fix the parsing of SQL.

* Get thread data action

* Remove old page

* Wait for data to complete

* SSR everywhere

* Remove unused

* Add monaco settings

* update loaders

* Add sorting

* supress hydration warnings

* Fix profile layout

* more server action action

* fixes

* Update page.tsx

* Update actions.ts

* Update AssistantChatForm.tsx

* init

* add polling

* Update actions.ts

* redirect to message id

* init

* Update SchemaFlow.tsx

* Add latest message to thread record

* Fix object object on new thread load

* Fix build

* Prettier

* Fix type errors for build

* Add proper loaders

* Remove badger

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2023-12-11 21:08:40 -03:30
Ivan Vasilov
efa055f068 fix: RLS Editor with Streaming AI - second attempt (#19462)
* Reapply all changes from the reverted PR.

* Move the API route to pages folder.

* Turn off outputFileTracing.
2023-12-06 15:54:22 +01:00
Kevin Grüneberg
d6b7c1b7ba Revert "feat: Add streaming responses to the new RLS Editor (#19304)" (#19439)
This reverts commit a2b01e0bc5.
2023-12-05 16:50:26 +00:00
Ivan Vasilov
a2b01e0bc5 feat: Add streaming responses to the new RLS Editor (#19304)
* Add vercel/ai. Commit additional next types.

* Add a API route in /app for streaming responses.

* Make the components work with streaming response.

* Add a dummy page to /app folder to fix a linking bug.

* Fix the dummy page.

* Fix the dummy page again.

* Add an empty layout to the app folder.

* Make the code snippets in the chat read-only.

* Remove queries and mutations for suggest.

* Reset the chat when closing the panel.

* Make the AI instructions a bit better.

* Don't render empty code blocks.

* Try to use remark for rendering the code. Style fixes for CodeBlock in AI assistant panel.

* Fix the styling of the definitions when sending them to OpenAI.

* Fix the css styling of the messages and code blocks.

* Move the suggest API route from app to pages folder.

* Revert the change for app API routes.

* Make the API route look like the rest of the API routes.

* Use Pre instead of Code because the <code> tags aren't working if between spans.

* Minor leftovers.

* Revert to using app route handlers.

* Change the wording on the diff header.

* Add nextjs types.

* Fix a missing import.

* Move AssistantChatForm back to db-new.

* Fix a build error.

* Rename the suggest route to assistant.

* Fix Joshen's comments.
2023-12-05 16:05:02 +01:00
Jonathan Summers-Muir
7abc9d24c4 Chore/more server actions (#19379)
* First

* Fix the parsing of SQL.

* Get thread data action

* Remove old page

* Wait for data to complete

* SSR everywhere

* Remove unused

* Add monaco settings

* update loaders

* Add sorting

* supress hydration warnings

* Fix profile layout

* more server action action

* fixes

* Update page.tsx

* Update actions.ts

* Update AssistantChatForm.tsx

* init

* add polling

* Update actions.ts

* redirect to message id

* Update page.tsx

* Update page.tsx

* handle run loading states with use client state with valtio

* reduce first load JS

* test action v1

* test action v2

* server action test 3

* test action 4

* test action 5

* test 6

* test 7

* test 7

* test 8

* test 9

* test 10

* test 11

* TEST 12

* TEST 13

* try and make it work

* Update page.tsx

* Update actions.ts

* redirect added in

* Update page.tsx

* Update SchemaFlow.tsx

* Update SchemaFlowHandler.tsx

* 14

* Update SchemaFlow.tsx

* move parse tables to client

* a11y fixes

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2023-12-03 21:01:14 -03:30
Terry Sutton
a5ffe1e693 Chore/remove react query (#19332)
* First

* Fix the parsing of SQL.

* Get thread data action

* Remove old page

* Wait for data to complete

* SSR everywhere

* Remove unused

* Add monaco settings

* update loaders

* Add sorting

* supress hydration warnings

* Fix profile layout

* more server action action

* fixes

* Update page.tsx

* Update actions.ts

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2023-12-01 15:41:51 -03:30
Ivan Vasilov
f102168588 fix: Ignore other types of statements when parsing the SQL query (#19343)
Allow other types of statements in the SQL query, but only createStatement will be type-safe and taken into consideration.
2023-11-30 18:23:19 -03:30
Jonathan Summers-Muir
903be591de schema visualizer styles moved to UI package (#19313)
* init

* tidy
2023-12-01 04:41:33 +08:00
Jonathan Summers-Muir
5ef9784506 chore: added pattern UI for assistant input (#19294)
* chore: added pattern for input

* migrated whole form over

* Update packages/ui/src/patterns/AssistantChatForm.tsx

* Update packages/ui/src/patterns/AssistantChatForm.tsx

* Update packages/ui/src/patterns/AssistantChatForm.tsx

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2023-11-30 14:22:39 -03:30
Jonathan Summers-Muir
d1c65ed77d chore: add non authenticated flow (#19243)
* add a new component for input

* add textArea

* some colors

* rename

* Update page.tsx

* move files

* Update ChatInput.tsx

* Update Header.tsx

* chore:upgrade next14

* Update package-lock.json

* update graphql

* add graphql dep

* Update package.json

* Update package-lock.json

* added server action in

* more actions

* getting actions in everywhere

* Update ConfirmDeleteThreadModal.tsx

* Update Input.tsx

* update modal action

* Bump nextjs in database-new to v14.

* fix build

* trying server hooks

* more experiemntal stuff

* update delete

* shimmering

* update thread UI

* Update actions.ts

* Update actions.ts

* Update Thread.tsx

* Update Input.tsx

* updated

* delete thread updated

* chore: add non authenticated flow

* fix build

* Update page.tsx

* fix builds

* Update package-lock.json

* Update package.json

* Update package-lock.json

* Add login message

* Cleanup

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2023-11-28 15:35:06 -03:30
Jonathan Summers-Muir
fe053fffb1 Chore/server state hooks (#19203)
* add a new component for input

* add textArea

* some colors

* rename

* Update page.tsx

* move files

* Update ChatInput.tsx

* Update Header.tsx

* chore:upgrade next14

* Update package-lock.json

* update graphql

* add graphql dep

* Update package.json

* Update package-lock.json

* added server action in

* more actions

* getting actions in everywhere

* Update ConfirmDeleteThreadModal.tsx

* Update Input.tsx

* update modal action

* Bump nextjs in database-new to v14.

* fix build

* trying server hooks

* more experiemntal stuff

* update delete

* shimmering

* update thread UI

* Update actions.ts

* Update actions.ts

* Update Thread.tsx

* Update Input.tsx

* updated

* delete thread updated

* fix build

* Update package-lock.json

* Update edit thread modal

* fixing build

* reset

* Update package-lock.json

* Update SpreadsheetImport.utils.ts

* reset

* Update package-lock.json

* Update sitemap_www.xml

* pacakge update

* change to node 18

* Fix deleting threads

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2023-11-28 12:35:44 -03:30
dependabot[bot]
5d3faf8fcf chore(deps): bump postcss from 8.4.29 to 8.4.31 (#19245)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.29 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.29...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 12:32:13 +05:30
Terry Sutton
385d9a9e61 Faqs updates (#19208)
* Faqs updates

* Add file

* Apply suggestions from code review

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2023-11-25 06:27:50 +00:00
Jonathan Summers-Muir
efab162ff9 Chore/server actions (#19200)
* Migrate database-new to use server actions.

* Revert the package-lock.json changes, leftover from a rebased commit.

* Add server actions config back

* Cleanup

* Cleanup

* Undo

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
2023-11-24 13:15:43 -03:30
Jonathan Summers-Muir
7ce355222b Chore/next14 database design (#19190)
Bump nextjs in database-new to v14.
2023-11-24 17:05:36 +01:00
Jonathan Summers-Muir
afd18c0e81 Chore/db design input component (#19191)
* add a new component for input

* add textArea

* some colors

* rename

* Update page.tsx

* move files

* Update ChatInput.tsx

* Update Header.tsx
2023-11-24 16:15:28 +01:00
Terry Sutton
4c20bb0d52 Chore/db visualizer 3 (#19177)
* Midway doing something

* Small refactor

* Some mobile responsiveness

* bit fix

* Update name

* One more name

* One more name, again

* Footer and faqs

* Fix

* Style fixes

* Style fixes

* Add titles

* Add CTAs to copy, download or load SQL in supabase

* Styling

* mobile

* Add suggestions

* Add delete action

* Cleanup

* Add delete thread and edit thread modals

* Restore server action

* Fix build error

* Import common theme switcher

* Add file

* Restore thread list

* force revalidating profile path

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2023-11-24 13:48:14 +08:00
Terry Sutton
9af8f5cd54 Feat/db new login 2 (#19153)
* Add supabase backend

* add ssr

* Add thread name to supabase

* Update supabase.ts

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2023-11-23 14:13:02 +08:00
Ivan Vasilov
fbfe910c22 Initial work on database.new visualizer (#19027)
* Initial commit.

* Remove bunch of unneeded deps.

* Fix the providers.

* Minor fixes to make the themes work.

* Fix prettier errors.

* Add default constraint.

* Midway styling

* General styling improvements

* More styling stuff

* Bit more styling

* Bit more pizzazz

* Scaffold all threads modal

* Small style fix

* Ensure loading state persist in new page until redirect

* Fix

* Test';

* Add basic validation

* Fix

* Remove console logs

* Hide show all threads button

* chore: style the blocks

* fix: stroke width

* add some shadow

* stroke width

* Update TableNode.tsx

* Swap hide chat for hide code

* more sidebar styling

* Resolve conflicts

* Some style fixeds

* Some style fixeds

* mock profile

* update user dorpdown

* Update globals.css

* Chore/db new layouts and url params (#19142)

* chore: layouts

* Fix + clean up

---------

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

* Fix header

* Scaffold profile and conversations

* Some quick styling

* Update apps/database-new/.env.local.example

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

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
2023-11-22 12:31:32 -03:30
Ivan Vasilov
e129ac577b feat: Add database-new app (#18982)
* Initial commit for the database-new app.

* Change the port to 3002.

* Run prettier on database-new app.
2023-11-15 14:07:28 +00:00