remove zombie flags (#43341)

removing flags:
- `enableCreateCommands`
- `enableSearchEntitiesCommands`
This commit is contained in:
Francesco Sansalvadore authored and GitHub committed 2026-03-05 14:59:13 +01:00
1 parent a51470ca52
commit 03bd82de81
2 files changed
+12 -13

No files matched your search

@@ -1,25 +1,26 @@
'use client'
import { useMemo } from 'react'
import { Database } from 'lucide-react'
import { IS_PLATFORM } from 'common'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { Auth, EdgeFunctions, Storage } from 'icons'
import { Database } from 'lucide-react'
import { useMemo } from 'react'
import type { ICommand } from 'ui-patterns/CommandMenu'
import {
CommandHeader,
CommandInput,
CommandWrapper,
PageType,
useQuery,
useRegisterCommands,
useRegisterPage,
useSetPage,
useQuery,
} from 'ui-patterns/CommandMenu'
import { COMMAND_MENU_SECTIONS } from './CommandMenu.utils'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { orderCommandSectionsByPriority } from './ordering'
import { ContextSearchResults } from './ContextSearchResults'
import { useFlag, IS_PLATFORM } from 'common'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { orderCommandSectionsByPriority } from './ordering'
import type { SearchContextValue } from './SearchContext.types'
interface SearchContextOption {
@@ -81,7 +82,6 @@ function ContextSearchPage({
}
export function useContextSearchCommands() {
const enableSearchEntitiesCommandMenu = useFlag('enableSearchEntitiesCommandMenu')
const { data: project } = useSelectedProjectQuery()
const setPage = useSetPage()
@@ -147,6 +147,6 @@ export function useContextSearchCommands() {
useRegisterCommands(COMMAND_MENU_SECTIONS.QUERY, contextCommands, {
orderSection: orderCommandSectionsByPriority,
sectionMeta: { priority: 3 },
enabled: !IS_PLATFORM || (enableSearchEntitiesCommandMenu && !!project),
enabled: !IS_PLATFORM || !!project,
})
}
@@ -1,6 +1,6 @@
'use client'
import { IS_PLATFORM, useFlag } from 'common'
import { IS_PLATFORM } from 'common'
import { SIDEBAR_KEYS } from 'components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider'
import {
Clock5,
@@ -51,7 +51,6 @@ const Graphql = dynamic(() => import('icons').then((mod) => mod.Graphql))
const CREATE_STUDIO_ENTITY = 'Create Studio Entity'
export function useCreateCommands(options?: CommandOptions) {
const enableCreateCommands = useFlag('enablecreatecommands')
const setIsOpen = useSetCommandMenuOpen()
const {
ref,
@@ -451,7 +450,7 @@ export function useCreateCommands(options?: CommandOptions) {
},
{
deps: [sections],
enabled: enableCreateCommands,
enabled: true,
}
)
@@ -469,7 +468,7 @@ export function useCreateCommands(options?: CommandOptions) {
...options,
orderSection: (sections) => sections,
sectionMeta: { priority: 3 },
enabled: enableCreateCommands,
enabled: true,
}
)
}