From ef2027f61a865a0d13ff2b97eb89a29cdb716871 Mon Sep 17 00:00:00 2001 From: Yazan Amer Abu Obaideh Date: Fri, 14 Nov 2025 20:34:16 +0300 Subject: [PATCH 1/2] fix: #38830 (#38856) Check whether schema is protected when setting table editor actions Co-authored-by: Ali Waseem --- .../studio/components/layouts/Tabs/NewTab.tsx | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/apps/studio/components/layouts/Tabs/NewTab.tsx b/apps/studio/components/layouts/Tabs/NewTab.tsx index db50b04f657f1..d6fda98c921cd 100644 --- a/apps/studio/components/layouts/Tabs/NewTab.tsx +++ b/apps/studio/components/layouts/Tabs/NewTab.tsx @@ -40,6 +40,8 @@ import { useEditorType } from '../editors/EditorsLayout.hooks' import { ActionCard } from './ActionCard' import { RecentItems } from './RecentItems' import { SIDEBAR_KEYS } from '../ProjectLayout/LayoutSidebar/LayoutSidebarProvider' +import { useQuerySchemaState } from 'hooks/misc/useSchemaQueryState' +import { useIsProtectedSchema } from 'hooks/useProtectedSchemas' const NEW_PROJECT_THRESHOLD_DAYS = 7 const TABLE_QUICKSTART_FLAG = 'tableQuickstart' @@ -57,6 +59,8 @@ export function NewTab() { const { profile } = useProfile() const { data: org } = useSelectedOrganizationQuery() const { data: project } = useSelectedProjectQuery() + const { selectedSchema } = useQuerySchemaState() + const { isSchemaLocked } = useIsProtectedSchema({ schema: selectedSchema }) const snap = useTableEditorStateSnapshot() const snapV2 = useSqlEditorV2StateSnapshot() @@ -161,16 +165,18 @@ export function NewTab() { } } - const tableEditorActions = [ - { - icon: , - title: 'Create a table', - description: 'Design and create a new database table', - bgColor: 'bg-blue-500', - isBeta: false, - onClick: () => snap.onAddTable(), - }, - ] + const tableEditorActions = isSchemaLocked + ? [] + : [ + { + icon: , + title: 'Create a table', + description: 'Design and create a new database table', + bgColor: 'bg-blue-500', + isBeta: false, + onClick: () => snap.onAddTable(), + }, + ] const sqlEditorActions = [ { From 4b2fb65a67942f00e9f62a37fe387a529c87fe45 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Sat, 15 Nov 2025 01:41:52 +0800 Subject: [PATCH 2/2] Fix cancel button for enable replication modal (#40475) --- .../interfaces/Database/ETL/EnableReplicationModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/studio/components/interfaces/Database/ETL/EnableReplicationModal.tsx b/apps/studio/components/interfaces/Database/ETL/EnableReplicationModal.tsx index a92ae3396cda3..a9c716873df77 100644 --- a/apps/studio/components/interfaces/Database/ETL/EnableReplicationModal.tsx +++ b/apps/studio/components/interfaces/Database/ETL/EnableReplicationModal.tsx @@ -65,7 +65,7 @@ export const EnableReplicationModal = () => { -