## What kind of change does this PR introduce?
UI chore.
## What is the current behavior?
The Keyboard shortcuts sheet renders shortcut definitions from the
static registry, so contextual Database navigation shortcuts appear in
the sheet even when `DatabaseLayout` is not active. This makes the
Navigation section noisy as more product-specific navigation shortcuts
are added.
## What is the new behavior?
The shortcuts sheet now reads the mounted, enabled shortcut set at
runtime. Global navigation remains under Navigation when it is the only
navigation scope, and splits into _**Global** Navigation_ plus
_**Database** Navigation_ when contextual database shortcuts are active.
This also replaces the one-off `DatabaseNavShortcuts` component with a
reusable `ProductMenuShortcuts` registrar so future product layouts can
register scoped navigation shortcuts from their product menu model.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added keyboard shortcut support for product menu navigation items with
router integration
* **Improvements**
* Keyboard shortcuts are now organized into logical groups (Global
Navigation and Database Navigation)
* Shortcut reference dynamically displays only active shortcuts instead
of static definitions
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Ali Waseem <waseema393@gmail.com>
## Summary
Adds a contextual `D + <letter>` chord pattern for jumping between
Database sub-pages, mounted only while `DatabaseLayout` is active.
Establishes the pattern we can repeat for other sections (Auth, Storage,
Functions, etc.).
Linear:
[FE-3140](https://linear.app/supabase/issue/FE-3140/define-subnavigation-pattern-for-database-management-page)
## Pattern
- Chords are 2-key sequences (`D`, `<letter>`) — no global leader, no
`G` prefix.
- Registration is contextual: `<DatabaseNavShortcuts />` lives inside
`DatabaseLayout`, so the leading `D` is only "owned" while the user is
under `/project/<ref>/database/*`. Doesn't burn a global key.
- Hover tooltips on each sub-menu item show the chord, anchored to the
label text (Linear-style). Powered by `<ShortcutTooltip>` already used
in the main nav.
- Items hidden by feature flags (Roles, Column Privileges, Replication)
auto-disable the chord — no muscle-memory navigating to a 404.
## Shortcuts added
| Sub-page | Chord | Notes |
|---|---|---|
| Tables | `D T` | |
| Functions | `D F` | |
| Triggers | `D R` | t**R**iggers — `T` taken by Tables |
| Indexes | `D I` | |
| Extensions | `D X` | e**X**tensions |
| Schema Visualizer | `D V` | |
| Enumerated Types | `D E` | |
| Publications | `D U` | p**U**blications — avoids collision with Schema
Visualizer's `D P` (Download as PNG) |
| Column Privileges | `D C` | flag-gated |
| Settings | `D ,` | mirrors global `G ,` for project settings — avoids
collision with Schema Visualizer's `D S` (Download as SVG) |
| Replication | `D L` | rep**L**ication — flag-gated |
| Roles | `D O` | r**O**les — flag-gated |
| Backups | `D B` | platform-only |
| Migrations | `D M` | |
External-link sub-menu items (Policies, Wrappers, Webhooks, Security
Advisor, Performance Advisor, Query Performance) are intentionally not
chorded — they route out of `/database/*` and don't belong to the
section's namespace.
## Collision audit
Other shortcuts active on database pages (table-list, schema-visualizer)
were checked against the new chords:
- **Schema Visualizer** (`/database/schemas`): `D P` (Download PNG), `D
S` (Download SVG), `O A`, `O S`. Publications and Settings were remapped
to `D U` and `D ,` to avoid the `D P` / `D S` clashes.
- **List pages** (`/database/tables`, etc.): `Shift+F`, `Shift+N`, `O
S`, `F C` — no overlap with `D + <letter>`.
## Files
- `state/shortcuts/registry/database-nav.ts` — new registry module with
the 14 chord definitions.
- `state/shortcuts/registry.ts` — spreads the new IDs/definitions into
the canonical registry.
- `components/interfaces/DatabaseNavShortcuts.tsx` — null-rendering hook
component that wires `useShortcut` for each chord, keyed off
`useGenerateDatabaseMenu` so URLs and feature gating stay in sync with
the sidebar.
- `components/layouts/DatabaseLayout/DatabaseLayout.tsx` — mounts the
component.
- `components/layouts/DatabaseLayout/DatabaseMenu.utils.tsx` — tags each
menu item with its `shortcutId`.
- `components/ui/ProductMenu/ProductMenu.types.ts` — adds optional
`shortcutId?: ShortcutId` field.
- `components/ui/ProductMenu/ProductMenuItem.tsx` — renders the hover
tooltip when an item has a `shortcutId`, anchored to the label span.
## Test plan
- [ ] On `/project/<ref>/database/tables`, press `D F` — navigates to
`/database/functions`.
- [ ] On `/project/<ref>/database/schemas`, press `D P` — downloads the
PNG (Schema Visualizer wins, no nav conflict).
- [ ] On `/project/<ref>/database/schemas`, press `D U` — navigates to
`/database/publications`.
- [ ] On `/project/<ref>/database/tables`, press `D ,` — navigates to
`/database/settings`.
- [ ] Hover any sub-menu item with a chord — pill appears next to the
label after ~1s.
- [ ] On a project with the Replication flag off — `D L` does nothing.
- [ ] Navigate to `/auth` — pressing `D F` does nothing (chord unmounts
with the layout).
- [ ] Type `D` then `F` slowly inside an input — does not navigate
(input-focus guard).
## What kind of change does this PR introduce?
Refactor, cleanup, and docs update.
## What is the current behavior?
After the page-title rollout, `ProjectLayout` is still in a transitional
state:
- it accepts a deprecated `title` prop
- it still supports a separate `browserTitle.surface`
- wrapper layouts are split between passing `title` directly and passing
`browserTitle.section`
That makes the API harder to reason about than it needs to be, even
though the rendered titles are already correct.
## What is the new behavior?
This cleanup finishes the API simplification that came out of the
stacked PR review:
- wrapper layouts stay `title`-first for DX
- `ProjectLayout` no longer accepts `title`
- `product` is now the single source of truth for the project-surface
title segment
- `browserTitle` is now only used for extra browser-title metadata
(`entity`, `section`, `override`)
- the remaining project-scoped callers now pass `browserTitle.section`
when they need a section label
- docs now reflect the final pattern instead of the transitional one
Rendered page titles stay the same.
## Additional context
Checks run:
- `pnpm --filter studio exec vitest --run lib/page-title.test.ts
components/layouts/ProjectLayout/index.test.tsx`
- `pnpm --filter studio typecheck`
- `pnpm exec prettier --check ...` on touched files
This is intended as the post-rollout cleanup PR based on Joshen's review
feedback across the stacked title changes.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Stacked PR 2/5 for page title improvements. Includes Auth, Database,
editors, and Edge Functions layout title adoption.
_Base:
[dnywh/feat/page-titles](https://github.com/supabase/supabase/pull/43538)_
---
## What kind of change does this PR introduce?
- Resolves FE-1960
- Resolves FE-1983
- Resolves DEPR-207
## What is the current behavior?
Page titles between surfaces are inconsistent and vague. Sometimes they
say the product name:
```
My Project | My Org | Supabase
```
...even when on a specific surface like Database > Tables.
Other times they show the entity name but skip over the project or org
name :
```
Edge Functions | Supabase
```
## What is the new behavior?
Auth, Database, editors, and Edge Functions adopt the layout title
format introduced in https://github.com/supabase/supabase/pull/43538:
```
users | Table Editor | My Project | My Org | Supabase
hello-world | Logs | Edge Functions | My Project | My Org | Supabase
Backups | Database | My Project | My Org | Supabase
Authentication | My Project | My Org | Supabase
```
That format is:
entity, section, surface, project, org, brand
## Additional context
Related stacked PRs also based on the the original
[dnywh/feat/page-titles](https://github.com/supabase/supabase/pull/43538)
branch:
- https://github.com/supabase/supabase/pull/43535
- https://github.com/supabase/supabase/pull/43536
- https://github.com/supabase/supabase/pull/43537
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
This PR adds new feature flags for controlling etl destinations
visibility based on the org slug.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* feat(preferences): allow disable hotkeys
Add a section in /account/me for disabling hotkeys. Only added one
hotkey for now (Cmd + E for toggling editor side panel) but we can add
more with the same pattern.
* refactor: remove default export on ProjectLayout
* feat(hotkeys): allow toggling of command menu and ai assistant hotkeys
* Nit
* PRettier lint
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* feat: disable logs features
* feat: disable project homepage features
* feat: disable org features
* Nit fixes
* reenable billing
* feat: disable database features
* Rename creation_enable_rls_toggle to just enable_rls_toggle and apply it to GridHeaderActions
* Minor nits
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Replace all usage of useProjectContext with useSelectedProjectQuery
* Replace all usage of useSelectedProject with useSelectedProjectQuery
* Replace all usage of useProjectByRef with useProjectByRefQuery
* Replace all usage of useSelectedOrganization with useSelectedOrganizationQuery
* Deprecate useSelectedProject, useSelectedOrganization, and useProjectByRef hooks
* Deprecate ProjecContext
* add dummy sinks and pipelines pages
* update api types
* show empty sources state
* show empty replication state at /replication
* create source when enable replication button is clicked
* improve replication page when replication is enabled
* replace sources page with publications page
* publications table
* show publications in table
* create publication wip
* show toast error instead of throwing an exception
* user can now delete a publication
* show empty sinks page
* create and list sinks
* add ui to delete a sink
* show pipelines on the pipelines page
* add ui to create and delete pipelines
* get pipeline status wip
* show pipeline status wip
* show correct label on action buttons
* start and stop pipelines
* remove a couple of console.logs
* fix error when deleting a pipeline
* only consider replication enabled when a source with name = ref is present
* add source and sink names
* correct colspan for 'no pipelines' row
* hide 'supabase_realtime' publication on ui
* move filtering to fetch query
* show sink name in ui
* show source/sink names on pipelines page
* fix start/stop status shown on ui
* fix prettier formatting
* update api types
* extract pipeline action button as a separate component
* fix a crashing page
* fixed publications page crash
* update to match with changes in api
* add new replication page under database
* hide replication page behind feature flag
* update types
* update api types
* show destinations empty state
* add destinations table
* factor out components from Destinations table
* show status dot
* move pipeline fetch query to parent component
* add ability to enable/disable a pipeline
* show loader when starting or stopping a pipeline
* fix a bug in which loading & empty states were shown together
* fix a bug in which error & empty states were shown together
* wrap in default layout
* add new destination panel
* add type field
* fix a forwardRef error
* fix layout
* create destination
* delete destination
* add ability to create or delete destinations with pipelines
* create source if missing
* show only a single error
* add an enable switch
* new layout
* add subsections
* comment out unused code
* show enabled switch only in the header
* close panel when destination is created
* disable buttons when api requests in flight
* reduce panel size
* remove commented out code
* treat max size and max fill secs as numbers
* use drop down to show publications
* simpler vertical layout
* add separators
* add form validation
* remove publications drop down padding
* add new publication button
* hide advanced settings behind an accordion
* add some margin between icon and text
* show publications panel on clicking new publication button
* add header to new publication panel
* fix validation not running for publication drop down
* create publication in the new publication panel
* add table selector in new publication panel
* update api types
* remove old code
* update platform.d.ts
* update navigation bar utils
* remove a redirect from replication page to publications page
* ask user for confirmation before deleting destination
* edit destination panel
* edit destination panel values fixed
* bug fixes
* fix prettier formatting
* enable/disable pipeline after editing
* rename snake_case params to camelCase
* loading button when editing
* remove merge markers
* update api types
* add max_staleness parameter in sinks for bigquery
* add read replicas flow diagram to replication page
* remove an unused import
* Revert "add read replicas flow diagram to replication page"
This reverts commit 8852d7847b457885603dba786141a8aaf8e99350.
* add panel to warn users about additional cost before creating a destination
* hide replication page contents behind a feature flag
* fix merge conflicts
* styling changes
* revert static flag
* styling updates
* fixes
* fix switch
* copy
* fix layout
---------
Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
* Move advisory things to Advisors page, move schema visualizer to top of database section
* Tiny clean up
* Tiny clean up
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Add crons option in the database menu.
* Add react-hook-form to the studio package.json.
* Refactor the functionSelector to be used by other features.
* Add the bulk of the functionality for the cron UI. Some of the code is copy-pasted from functions feature, needs to be cleaned before merging.
* Tons of changes, the Create Cron sheet works now.
* Added some more functionality for the cronjob feature.
* Convert the Cron table to a listing with cards.
* Add click-to-copy in the Auth Hooks feature.
* Remove extra prop.
* Fix type errors.
* Fix some random issues. Fix the tests.
* Fix the tests.
* Add a style for disabled radio button item.
* Make the default SQL snippet. Handle the case pg_net is not installed.
* Fix the heading and save button when creating a new cron job.
* Change the name of the custom label in the schedule dropdown.
* Minor fixes.
* Rename all mentions of cronjobs to cron jobs.
* Always show the cron jobs link.
* Rename the link from crons to cron-jobs.
* Fix the disabled state for the stacked radio group.
* More minor fixes.
* More small fixes.
* Fix the tests.
* Minor UI tweaks
* More minor tweaks
* Add padding bottom
* Add feature flag for the cron ui.
* Fix the SQL function option.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Make the resource banner sticky.
* Remove main from all layouts that are using it.
* Update apps/studio/components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner.tsx
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
* Fix the whitespace.
* Fix some of the pages with broken layouts.
* Fix a merge error.
* Fix the layout of the SQL editor.
---------
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
* chore: move column priv
* update docs
* Minor fixes for column privileges. Add an explanation alert.
* Add a right icon to productMenuItem component.
* Rename the database replication into publications.
* Change the order for the database menu.
* Fix various links to db publications.
* Remove duplicate entry.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Final replacements of ui setNotification with toast
* Rip out UiStore
* Rip out UiStore
* Shift files under authConfigSchema to components/Auth
* Rip out use of observers
* Move listEncryptedColumns method to a function.
* Remove encryptColumn method since it's unused.
* Add CRUD RQ queries/mutations for vault secrets.
* Use the new queries/mutations.
* Add RQ for secret/decrypted values of secrets.
* Add RQ queries/mutations for pg-sodium keys.
* Use the new hook for decrypted value.
* Use the new hooks for pg sodium keys.
* Remove unneeded code from the vault store.
* Delete VaultStore and all usages of it.
* Small style fix
* Fix invalidation for create, update, delete secrets
* Small UI fixes to EditSecretModal
* Fix invalidation for pg-sodium-keys rq
* Add default error handler for pg sodium keys rq
* Undo
* Add default error handler for vault secrets RQ
* Remove observer on vault pages
* Fix database wrappers with vault
* Add loading state for vault keys
* fix pg sodium keys invalidation
* Opt for immutable const declaration in SecretsManagement
* remove keyId and keyName context from ColumnEditor, no longer supports TLE
* Address PR comments
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Init RQ for database roles
* Shift all use of roles from pg meta mobx store to RQ
* Deprecate and remove roles pg meta mobx store
* Fix import
* Fix
* Address comments
* remove function child
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* Replace all usage of meta.triggers with react query
* Deprecate and remove ttriggers mobx store
* Fix
* Update apps/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
---------
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* Hide RLS assistant features for orgs with HIPAA
* Replace all usage of meta.publications with react query
* Deprecate publications store from meta store mobx, shift updateTableRealtime logic to SidePanelEditor
* Address comments
* Move all studio files from /studio to /apps/studio.
* Move studio specific prettier ignores.
* Fix the ui references from studio.
* Fix the css imports.
* Fix all package.json issues.
* Fix the prettier setup for the studio app.
* Add .turbo folder to prettierignore.
* Fix the github workflows.