mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
## What kind of change does this PR introduce? Feature and docs update. ## What is the current behavior? The Dashboard lists Pipelines destinations under Database > Replication. Read replicas have moved to Infrastructure, but the temporary notices remain on the destinations page and new destination sheet. Closes PIPE-1021. ## What is the new behavior? The canonical Dashboard routes are Database > Pipelines, while legacy Replication list and detail URLs permanently redirect to the equivalent Pipelines routes. Navigation, command palette, shortcuts, pipeline links, docs, and current marketing copy use Pipelines. Read-replica notices and their obsolete dismissal state are removed. | Before | After | | --- | --- | | <img width="1024" height="759" alt="Replication Database Agua Basket Supabase" src="https://github.com/user-attachments/assets/53f9f565-1ed1-43e9-a7d9-b66b2a47e948" /> | <img width="1024" height="759" alt="2540" src="https://github.com/user-attachments/assets/14ab2d61-d01c-483f-9d4f-0ac286dae159" /> | The Management API, pipeline behaviour, replication logs, and Postgres replication terminology remain unchanged. ## To test - Open `/project/<ref>/database/pipelines` and confirm the Database navigation, page header, and pipeline breadcrumb say Pipelines. - Open `/project/<ref>/database/replication?source=bookmark#destinations` and a legacy pipeline detail URL. Confirm each redirects to the matching Pipelines URL while preserving parameters and fragments. - From the Pipelines page, open Add destination. Confirm no read-replica migration notice appears. - Open the Pipelines guide and confirm its Dashboard steps lead to Database > Pipelines. ## Before merge - [ ] Get changelog entry reviewed https://github.com/supabase/changelog/pull/262 and prepare to merge simultaneously <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added dedicated **Database > Pipelines** pages for pipeline lists and details. - Added permanent redirects from legacy Replication URLs to their corresponding Pipelines pages. - Read replica management links now open **Settings > Infrastructure**. - **Documentation** - Updated Pipelines setup, monitoring, troubleshooting, and usage guidance to reference the current dashboard locations. - Updated Realtime guidance to use **Database > Publications**. - **Updates** - Renamed dashboard navigation, breadcrumbs, commands, and keyboard shortcuts from **Replication** to **Pipelines**. - Removed the “Read replicas have moved” notification. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
204 lines
5.8 KiB
TypeScript
204 lines
5.8 KiB
TypeScript
import { useParams } from 'common'
|
|
import { Blocks, Code, Database, History, Search } from 'lucide-react'
|
|
import type { CommandOptions } from 'ui-patterns/CommandMenu'
|
|
import { useRegisterCommands } from 'ui-patterns/CommandMenu'
|
|
import { IRouteCommand } from 'ui-patterns/CommandMenu/internal/types'
|
|
|
|
import { COMMAND_MENU_SECTIONS } from '@/components/interfaces/App/CommandMenu/CommandMenu.utils'
|
|
import { orderCommandSectionsByPriority } from '@/components/interfaces/App/CommandMenu/ordering'
|
|
import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'
|
|
|
|
export function useDatabaseGotoCommands(options?: CommandOptions) {
|
|
let { ref } = useParams()
|
|
ref ||= '_'
|
|
|
|
const { databaseReplication, databaseRoles, integrationsWrappers } = useIsFeatureEnabled([
|
|
'database:replication',
|
|
'database:roles',
|
|
'integrations:wrappers',
|
|
])
|
|
|
|
useRegisterCommands(
|
|
COMMAND_MENU_SECTIONS.QUERY,
|
|
[
|
|
{
|
|
id: 'run-sql',
|
|
name: 'Run SQL',
|
|
route: `/project/${ref}/sql/new`,
|
|
icon: () => <Code />,
|
|
},
|
|
],
|
|
{
|
|
...options,
|
|
deps: [ref],
|
|
orderSection: orderCommandSectionsByPriority,
|
|
sectionMeta: { priority: 2 },
|
|
}
|
|
)
|
|
|
|
useRegisterCommands(
|
|
COMMAND_MENU_SECTIONS.NAVIGATE,
|
|
[
|
|
{
|
|
id: 'nav-database-tables',
|
|
name: 'Tables',
|
|
value: 'Database: Tables',
|
|
route: `/project/${ref}/database/tables`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-database-triggers',
|
|
name: 'Triggers',
|
|
value: 'Database: Triggers',
|
|
route: `/project/${ref}/database/triggers`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-database-functions',
|
|
name: 'Functions',
|
|
value: 'Database: Functions',
|
|
route: `/project/${ref}/database/functions`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-database-policies',
|
|
name: 'Policies',
|
|
value: 'Database: Policies (RLS)',
|
|
route: `/project/${ref}/database/policies`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-database-extensions',
|
|
name: 'Extensions',
|
|
value: 'Database: Extensions',
|
|
route: `/project/${ref}/database/extensions`,
|
|
defaultHidden: true,
|
|
},
|
|
...(databaseRoles
|
|
? [
|
|
{
|
|
id: 'nav-database-roles',
|
|
name: 'Roles',
|
|
value: 'Database: Roles',
|
|
route: `/project/${ref}/database/roles`,
|
|
defaultHidden: true,
|
|
} as IRouteCommand,
|
|
]
|
|
: []),
|
|
...(databaseReplication
|
|
? [
|
|
{
|
|
id: 'nav-database-replication',
|
|
name: 'Pipelines',
|
|
value: 'Database: Pipelines',
|
|
route: `/project/${ref}/database/pipelines`,
|
|
defaultHidden: true,
|
|
} as IRouteCommand,
|
|
]
|
|
: []),
|
|
{
|
|
id: 'nav-database-backups',
|
|
name: 'Backups',
|
|
value: 'Database: Backups',
|
|
route: `/project/${ref}/database/backups/scheduled`,
|
|
defaultHidden: true,
|
|
},
|
|
...(integrationsWrappers
|
|
? [
|
|
{
|
|
id: 'nav-database-wrappers',
|
|
name: 'Wrappers',
|
|
value: 'Database: Wrappers',
|
|
route: `/project/${ref}/integrations?category=wrappers`,
|
|
defaultHidden: true,
|
|
} as IRouteCommand,
|
|
]
|
|
: []),
|
|
{
|
|
id: 'nav-database-migrations',
|
|
name: 'Migrations',
|
|
value: 'Database: Migrations',
|
|
route: `/project/${ref}/database/migrations`,
|
|
defaultHidden: true,
|
|
},
|
|
],
|
|
{ ...options, deps: [ref] }
|
|
)
|
|
|
|
useRegisterCommands(
|
|
COMMAND_MENU_SECTIONS.DATABASE,
|
|
[
|
|
{
|
|
id: 'run-schema-visualizer',
|
|
name: 'View your schemas',
|
|
route: `/project/${ref}/database/schemas`,
|
|
icon: () => <Search />,
|
|
},
|
|
{
|
|
id: 'run-view-database-functions',
|
|
name: 'View and create functions',
|
|
route: `/project/${ref}/database/functions`,
|
|
icon: () => <Database />,
|
|
},
|
|
{
|
|
id: 'run-view-database-triggers',
|
|
name: 'View and create triggers',
|
|
route: `/project/${ref}/database/triggers`,
|
|
icon: () => <Database />,
|
|
},
|
|
{
|
|
id: 'run-view-database-enumerated-types',
|
|
name: 'View and create enumerated types',
|
|
route: `/project/${ref}/database/types`,
|
|
icon: () => <Database />,
|
|
},
|
|
{
|
|
id: 'run-view-database-extensions',
|
|
name: 'View your extensions',
|
|
route: `/project/${ref}/database/extensions`,
|
|
icon: () => <Blocks />,
|
|
},
|
|
{
|
|
id: 'run-view-database-indexes',
|
|
name: 'View and create indexes',
|
|
route: `/project/${ref}/database/indexes`,
|
|
icon: () => <Database />,
|
|
},
|
|
{
|
|
id: 'run-view-database-policies',
|
|
name: 'View and create RLS policies',
|
|
route: `/project/${ref}/database/policies`,
|
|
icon: () => <Database />,
|
|
},
|
|
...(databaseRoles
|
|
? [
|
|
{
|
|
id: 'run-view-database-roles',
|
|
name: 'View your roles',
|
|
route: `/project/${ref}/database/roles`,
|
|
icon: () => <Database />,
|
|
} as IRouteCommand,
|
|
]
|
|
: []),
|
|
{
|
|
id: 'run-view-database-backups',
|
|
name: 'View your backups',
|
|
route: `/project/${ref}/database/backups/scheduled`,
|
|
icon: () => <Database />,
|
|
},
|
|
{
|
|
id: 'run-view-database-migrations',
|
|
name: 'View your migrations',
|
|
route: `/project/${ref}/database/migrations`,
|
|
icon: () => <History />,
|
|
},
|
|
],
|
|
{
|
|
...options,
|
|
deps: [ref],
|
|
orderSection: orderCommandSectionsByPriority,
|
|
sectionMeta: { priority: 3 },
|
|
}
|
|
)
|
|
}
|