Skip to content

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

cleanup(studio): remove outdated migration (#41008)

Charis304eaa356029
diff --git a/apps/studio/hooks/misc/useLegacyInlineEditorHotkeyMigration.ts b/apps/studio/hooks/misc/useLegacyInlineEditorHotkeyMigration.ts
deleted file mode 100644
index 01f359647eb..00000000000
--- a/apps/studio/hooks/misc/useLegacyInlineEditorHotkeyMigration.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { useEffect } from 'react'
-
-import { LOCAL_STORAGE_KEYS } from 'common'
-import { SIDEBAR_KEYS } from 'components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider'
-import { useLocalStorageQuery } from './useLocalStorage'
-
-const LEGACY_INLINE_EDITOR_HOTKEY_KEY = 'supabase-dashboard-hotkey-inline-editor'
-
-/**
- * Migrates the inline editor hotkey preference to the new sidebar editor panel key.
- * Runs when idle (or within 5 seconds) to avoid blocking render.
- */
-const useLegacyInlineEditorHotkeyMigration = () => {
- const [_inlineEditorEnabled, setInlineEditorEnabled] = useLocalStorageQuery(
- LOCAL_STORAGE_KEYS.HOTKEY_SIDEBAR(SIDEBAR_KEYS.EDITOR_PANEL),
- true
- )
-
- useEffect(() => {
- if (typeof window === 'undefined') return
-
- const migrate = () => {
- try {
- const legacyValue = window.localStorage.getItem(LEGACY_INLINE_EDITOR_HOTKEY_KEY)
-
- if (legacyValue !== null) {
- setInlineEditorEnabled(legacyValue === 'true')
- window.localStorage.removeItem(LEGACY_INLINE_EDITOR_HOTKEY_KEY)
- }
- } catch (error) {
- console.warn('Failed to migrate inline editor hotkey preference', error)
- }
- }
-
- if (typeof window.requestIdleCallback === 'function') {
- const idleCallbackId = window.requestIdleCallback(migrate, { timeout: 5000 })
- return () => window.cancelIdleCallback?.(idleCallbackId)
- }
-
- const timeoutId = window.setTimeout(migrate, 5000)
- return () => window.clearTimeout(timeoutId)
- }, [setInlineEditorEnabled])
-}
-
-export const LegacyInlineEditorHotkeyMigration = () => {
- useLegacyInlineEditorHotkeyMigration()
- return null
-}
diff --git a/apps/studio/pages/_app.tsx b/apps/studio/pages/_app.tsx
index 4e1430b0d99..124028c19fd 100644
--- a/apps/studio/pages/_app.tsx
+++ b/apps/studio/pages/_app.tsx
@@ -52,7 +52,6 @@ import { GlobalErrorBoundaryState } from 'components/ui/ErrorBoundary/GlobalErro
import { useRootQueryClient } from 'data/query-client'
import { customFont, sourceCodePro } from 'fonts'
import { useCustomContent } from 'hooks/custom-content/useCustomContent'
-import { LegacyInlineEditorHotkeyMigration } from 'hooks/misc/useLegacyInlineEditorHotkeyMigration'
import { AuthProvider } from 'lib/auth'
import { API_URL, BASE_PATH, IS_PLATFORM, useDefaultProvider } from 'lib/constants'
import { ProfileProvider } from 'lib/profile'
@@ -164,8 +163,6 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
</ThemeProvider>
</RouteValidationWrapper>
</TooltipProvider>
- {/* Temporary migration, to be removed by 2025-11-28 */}
- <LegacyInlineEditorHotkeyMigration />
<Telemetry />
{!isTestEnv && (
<ReactQueryDevtools initialIsOpen={false} position="bottom-right" />