Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Disable analyze button for notebooks if notebook is empty (#49674)

Joshen Limf1e080822373
diff --git a/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx b/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx
index 556e2f130cd..d34f51cd77c 100644
--- a/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx
+++ b/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx
@@ -366,6 +366,8 @@ export const ExplorerNotebookTab = () => {
<ExplorerToolbarAction
icon={<AiIconAnimation size={16} />}
loading={isCreating}
+ disabled={cells.length === 0}
+ tooltip={cells.length === 0 ? 'Add a cell to the notebook to analyze it' : undefined}
onClick={handleClickAnalyze}
>
Analyze