The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Initialize explorer home page (#48790)
Joshen Lim8618991b6f0f
diff --git a/apps/studio/components/interfaces/Explorer/ExplorerHome.tsx b/apps/studio/components/interfaces/Explorer/ExplorerHome.tsxnew file mode 100644index 00000000000..a14d056cbc8--- /dev/null+++ b/apps/studio/components/interfaces/Explorer/ExplorerHome.tsx@@ -0,0 +1,107 @@+import { MessageCirclePlus, NotebookText, SquareCode } from 'lucide-react'+import { useState } from 'react'++import { ActionCard } from '@/components/layouts/Tabs/ActionCard'+import { AssistantChatForm } from '@/components/ui/AIAssistantPanel/AssistantChatForm'+import { AssistantModel } from '@/state/ai-assistant-state'++export const ExplorerHome = () => {+ const [value, setValue] = useState<string>('')+ const [selectedModel, setSelectedModal] = useState<AssistantModel>('gpt-5.4-nano')++ const onCreateNotebook = () => {}++ const onCreateChat = () => {}++ return (+ <div className="bg-surface-100 h-full flex flex-col items-center justify-center">+ <div className="w-full max-w-2xl">+ <div className="flex items-center justify-center flex-col gap-y-1 mb-12">+ <h1 className="heading-section">Explore your project</h1>+ <p className="text-foreground-lighter text-sm">+ Ask the Assistant about your data, or begin with a new resource.+ </p>+ </div>++ <AssistantChatForm+ loading={false}+ className="bg"+ placeholder="Ask anything about your project"+ value={value}+ onValueChange={(e) => setValue(e.target.value)}+ selectedModel={selectedModel}+ onSelectModel={setSelectedModal}+ onSubmit={() => {}}+ />++ <section className="mt-6">+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2">+ <ActionCard+ icon={<NotebookText className="h-4 w-4 text-foreground" strokeWidth={1.5} />}+ title="Create a notebook"+ description="Combine notes, queries, and results"+ bgColor="bg-blue-500"+ onClick={onCreateNotebook}+ />+ <ActionCard+ icon={<SquareCode className="h-4 w-4 text-foreground" strokeWidth={1.5} />}+ title="Run SQL"+ description="Write and run an ad-hoc query"+ bgColor="bg-blue-500"+ onClick={onCreateNotebook}+ />+ </div>+ </section>++ <section className="mt-8 flex flex-col gap-y-3">+ <h2 className="text-sm font-medium text-foreground">Start with a template</h2>++ <div className="grid grid-cols-1 gap-3 sm:grid-cols-3">+ <ActionCard+ icon={<NotebookText className="h-4 w-4 text-foreground" strokeWidth={1.5} />}+ title="Authentication health"+ description="Notebook template"+ bgColor="bg-blue-500"+ onClick={onCreateNotebook}+ />+ <ActionCard+ icon={<NotebookText className="h-4 w-4 text-foreground" strokeWidth={1.5} />}+ title="Signup funnel"+ description="Notebook template"+ bgColor="bg-blue-500"+ onClick={onCreateNotebook}+ />+ <ActionCard+ icon={<NotebookText className="h-4 w-4 text-foreground" strokeWidth={1.5} />}+ title="Incident review"+ description="Notebook template"+ bgColor="bg-blue-500"+ onClick={onCreateNotebook}+ />+ <ActionCard+ icon={<MessageCirclePlus className="h-4 w-4 text-foreground" strokeWidth={1.5} />}+ title="Investigate errors"+ description="Chat template"+ bgColor="bg-blue-500"+ onClick={onCreateChat}+ />+ <ActionCard+ icon={<MessageCirclePlus className="h-4 w-4 text-foreground" strokeWidth={1.5} />}+ title="Explore your schema"+ description="Chat template"+ bgColor="bg-blue-500"+ onClick={onCreateChat}+ />+ <ActionCard+ icon={<MessageCirclePlus className="h-4 w-4 text-foreground" strokeWidth={1.5} />}+ title="Optimize a query"+ description="Chat template"+ bgColor="bg-blue-500"+ onClick={onCreateChat}+ />+ </div>+ </section>+ </div>+ </div>+ )+}diff --git a/apps/studio/components/interfaces/Explorer/ExplorerPage.tsx b/apps/studio/components/interfaces/Explorer/ExplorerPage.tsxdeleted file mode 100644index afa62fcd98f..00000000000--- a/apps/studio/components/interfaces/Explorer/ExplorerPage.tsx+++ /dev/null@@ -1,20 +0,0 @@-import { Compass } from 'lucide-react'-import { EmptyStatePresentational } from 'ui-patterns/EmptyStatePresentational'-import { PageContainer } from 'ui-patterns/PageContainer'-import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'--export const ExplorerPage = () => {- return (- <PageContainer size="default">- <PageSection>- <PageSectionContent>- <EmptyStatePresentational- icon={Compass}- title="Explorer is coming soon"- description="This page is a placeholder for the Explorer feature."- />- </PageSectionContent>- </PageSection>- </PageContainer>- )-}diff --git a/apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx b/apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsxindex ec966dbe214..e8e4b916ea5 100644--- a/apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx+++ b/apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx@@ -56,7 +56,7 @@ export const ExplorerLayout = ({ browserTitle, children, title }: ExplorerLayoutnewTabButton={<NewTabButton />}/></div>- <div>{children}</div>+ <div className="h-full">{children}</div></div></ProjectLayoutWithAuth>)diff --git a/apps/studio/components/ui/AIAssistantPanel/AssistantChatForm.tsx b/apps/studio/components/ui/AIAssistantPanel/AssistantChatForm.tsxindex 12913d7bdfa..9db5c0488e5 100644--- a/apps/studio/components/ui/AIAssistantPanel/AssistantChatForm.tsx+++ b/apps/studio/components/ui/AIAssistantPanel/AssistantChatForm.tsx@@ -154,6 +154,7 @@ const AssistantChatFormComponent = forwardRef<HTMLFormElement, FormProps>() : (<ButtonTooltiptype="submit"+ variant={canSubmit ? 'primary' : 'default'}aria-label="Send message"icon={<ArrowUp />}disabled={!canSubmit}diff --git a/apps/studio/pages/project/[ref]/explorer/index.tsx b/apps/studio/pages/project/[ref]/explorer/index.tsxindex 82ae81843a3..d44d4c1a2b7 100644--- a/apps/studio/pages/project/[ref]/explorer/index.tsx+++ b/apps/studio/pages/project/[ref]/explorer/index.tsx@@ -1,10 +1,10 @@-import { ExplorerPage } from '@/components/interfaces/Explorer/ExplorerPage'+import { ExplorerHome } from '@/components/interfaces/Explorer/ExplorerHome'import { DefaultLayout } from '@/components/layouts/DefaultLayout'import { ExplorerLayout } from '@/components/layouts/ExplorerLayout/ExplorerLayout'import type { NextPageWithLayout } from '@/types'const ProjectExplorerPage: NextPageWithLayout = () => {- return <ExplorerPage />+ return <ExplorerHome />}ProjectExplorerPage.getLayout = (page) => (diff --git a/apps/studio/routes/project/$ref/explorer.tsx b/apps/studio/routes/project/$ref/explorer.tsxindex a67032bc417..d31f51f8179 100644--- a/apps/studio/routes/project/$ref/explorer.tsx+++ b/apps/studio/routes/project/$ref/explorer.tsx@@ -1,6 +1,6 @@import { createFileRoute } from '@tanstack/react-router'-import { ExplorerPage } from '@/components/interfaces/Explorer/ExplorerPage'+import { ExplorerHome } from '@/components/interfaces/Explorer/ExplorerHome'import { ExplorerLayout } from '@/components/layouts/ExplorerLayout/ExplorerLayout'export const Route = createFileRoute('/project/$ref/explorer')({@@ -10,7 +10,7 @@ export const Route = createFileRoute('/project/$ref/explorer')({function ProjectExplorerRoute() {return (<ExplorerLayout>- <ExplorerPage />+ <ExplorerHome /></ExplorerLayout>)}