Commit Graph

28 Commits

Author SHA1 Message Date
Ali Waseem 2e904abebf feat(studio): add D + letter shortcuts for Database sub-pages (#45546)
## 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).
2026-05-05 09:57:25 -06:00
Charis 4a0bb36ca8 style: require sorted imports in studio/components (#44408)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-01 10:22:37 +02:00
Danny White df55c5c327 feat(studio): platform webhooks scaffolding (#43276)
## What kind of change does this PR introduce?

Impending feature addition. Resolves DEPR-340.

## What is the current behavior?

We don’t have any platform webhook support.

## What is the new behavior?

This puts the scaffolding for platform webhooks **behind a feature
flag**. The content is currently UI-only (with mock data and a
[temporary tracking
file](https://github.com/supabase/supabase/blob/8adadc61f57c70b686a0f5f05e9f7f05837e0466/apps/studio/components/interfaces/Platform/Webhooks/DEPR-340-backend-integration-tracker.md)).

Merging this in lets us work incrementally from here on.
2026-03-06 02:56:54 +00:00
Riccardo Busetti 43bccc52a3 feat(etl): Add new flags per org (#43292)
This PR adds new feature flags for controlling etl destinations
visibility based on the org slug.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-03 15:44:57 +08:00
Andrey A. c5a142dd2b fix: do not show replication for self-hosted and CLI (#41970) 2026-01-20 10:02:08 -07:00
Saxon Fletcher 81098b2926 Event triggers (#41657)
* event triggers

* rename to event

* fixes

* fixes

* template

* use supabase roles instead

* useMemo array operations

* use blank as default

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2026-01-07 09:12:10 +10:00
Riccardo Busetti 09cda344a1 ref(etl): Add better badges (#40828)
* ref(etl): Add better badges

* Fix

* Update apps/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* UI nudges

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-27 11:42:27 +08:00
Riccardo Busetti 1a3ba9f15a ref(etl): Rename ETL Replication to Replication and update docs (#40769)
* ref(etl): Rename ETL Replication to Replication and update docs

* Fix

* Fix

* Fix

* Fix

* Fix
2025-11-25 20:45:50 +08:00
kemal.earth 4a9def58c1 feat(studio): rename reports to observability (#40317)
* feat: rename reports to observability on nav sidebar

* fix: observability route

* feat: observability navigation and redirects

* fix: first time load redirects

* feat: change auth overview reports link

* feat: clean up of other links to observability sections

* fix: query perf redirects

* chore: find exhaustive deps and disable for time being

* fix: charis suggested fixes

* fix: forgotten suggested fix

* chore: delete old reports views files

* fix: paths in reports tests

* fix: url sync useEffect should trigger only once

* feat: reorganise observability sidebar

* fix: data api not being selected

* fix: wrong layout for realitime

* fix: custom reports reloading

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
2025-11-18 17:54:05 +00:00
Joshen Lim d78f6a1678 Set up feature for ETL + Analytics Buckets private alpha (#40523)
* Set up feature for ETL + Analytics Buckets private alpha

* Nit

* Add override

* Remove console log

* Update feature flag logic
2025-11-18 17:49:46 +08:00
Riccardo Busetti 91464b8fe8 ref(etl): Rename Replication to ETL Replication (#40202)
* ref(etl): Rename Replication to ETL Replication

* Fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-07 12:02:40 +08:00
Danny White 4a4ccc30f5 chore: remove sidebar labels (#39924)
* basics

* draft docs

* remove labels

* restore needed pills

* remove extraneous diff

* vault beta status

* remove audit logs beta

* minor fix

* fix integration status
2025-11-07 10:00:49 +11:00
Jordi Enric 5df4e2e442 FE-1955 fix query perf links (#39622)
fix
2025-10-17 16:15:15 +02:00
Joshen Lim 579332fda3 Add flag to disable wrappers UI (#39150) 2025-10-02 01:34:20 +08:00
Alaister Young a0f86b3010 feat: disable users features (#38020)
* feat: disable logs features

* feat: disable project homepage features

* feat: disable org features

* Nit fixes

* reenable billing

* feat: disable database features

* feat: disable users features

* Change create user flag to send invite

* Change create user flag to send invite flag

* Tiny nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-19 14:22:12 +08:00
Alaister Young 33bd798d14 feat: disable database features (#38019)
* 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>
2025-08-19 12:52:00 +08:00
Danny White d914b81f47 feat: consolidate settings (#37580)
* feat: move storage settings

* feat: redirect

* feat: database settings in service area

* feat: move data api settings

* fix: revert data API placement

* feat: minor UX touches

* fix: simplify configuration group

* feat: references to database settings

* feat: references to storage settings

* fix: redirects and formatting

* fix: Import StorageMenu dynamically to avoid SSR issues with useLocalStorage

* fix: move Data API closer to semantic siblings

* fix: revert smart comma

* Shift bucket sort logic into storage explorer store

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-04 16:21:54 +10:00
Raminder Singh 26462884ca feat: use enablePgReplicate feature flag (#36876) 2025-07-04 15:53:56 +05:30
Terry Sutton 0ffe63f062 add replication area to dashboard (#35946)
* First

* Update link

* Type issue
2025-05-30 13:31:37 -02:30
Raminder Singh 23ceb9072d Add replication UI in Studio (#30090)
* 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>
2025-04-23 10:52:46 +05:30
Joshen Lim 8fc6dab790 Fix link to wrappers integrations from database page (#30731)
* Fix link to wrappers integrations from database page

* Update next.config redirects for webhooks and wrappers

* Fix link to webhooks

* Move the search and selectedCategory into useQueryState.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-11-29 10:20:41 +01:00
Terry Sutton dd4788bce4 Chore/move advisors (#30283)
* 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>
2024-11-05 17:25:23 +08:00
Joshen Lim ceee53a8d1 Support opening tables in table editor via schema visualizer (#30052)
* Support opening tables in table editor via schema visualizer

* Shift wrappers in database menu

* Dont open new tab
2024-10-24 11:18:43 +08:00
Terry Sutton b6de81485c new Integrations page (#29671)
* Start new integrations page

* Move cronjobs into integrations

* Rearrange

* Remove duplicate

* Move around menu items
2024-10-22 09:39:36 -02:30
Ivan Vasilov fd3309c886 feat: UI for pg-cron (#29291)
* 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>
2024-10-03 15:11:17 -02:30
Terry Sutton 83679e3ddf Chore/move security advisor basics (#26669)
* Start

* Start

* Move advisors

* cleanup

* Add redirects

* Check for an id

* Cleanup

* Link to the advisor from the table editor

* Cleanup

* Link to rows in performance grid
2024-05-28 16:05:21 -02:30
Terry Sutton 8916d8022b Chore/linter v3 (#22842)
* Add links to docs, new categories and update lint script

* Split linter into security and performance

* Move not found to own component

* Move type

* Split linter into two pages, DRY components

* Cleanup
2024-04-18 14:23:11 -02:30
Jonathan Summers-Muir c59141f83c chore: Reorder database links (#22835)
* 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>
2024-04-18 09:38:24 -02:30