## Problem
Our `<Button>` component breaks the default `button` contract by
redefining the `type` prop to set its variant (`primary`, `default`,
etc) instead of the button type (`submit`, `button`, etc).
This is confusing and forces to write more code when using it with
shadcn components that expect/inject the standard button props.
## Solution
- rename the `type` prop to `variant`
- rename the `htmlType` prop to `type`
- propagate the changes where necessary
- format code
## How to test
As this is just prop renaming, if it builds it's ok
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
This PR improves the replication UI in the following ways:
- Adds a new selecion picker for destinations which is split by the
destination location and it's clearer and can scale more when we add
more destinations.
- Adds a much improved section on lag, highlighting new metrics that
could help debug issues more easily.
- Improves the copy across the whole code.
- Fixes the 2d topological view of replication with better status
handling.
### Screenshots
<img width="1270" height="777" alt="image"
src="https://github.com/user-attachments/assets/0ffc890e-2f80-47e5-bdb1-75071adda024"
/>
<img width="1665" height="656" alt="image"
src="https://github.com/user-attachments/assets/23a27a02-acb2-4891-af95-5bc1d6ec7bfe"
/>
<img width="1454" height="247" alt="image"
src="https://github.com/user-attachments/assets/c8799983-aa63-42b2-9370-ae4e009c1573"
/>
<img width="1120" height="340" alt="image"
src="https://github.com/user-attachments/assets/20a18ad6-e5a9-40ec-80d4-42d6f783d868"
/>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Live slot health indicators, legend, and connection badges.
* Grouped destination type dropdown with alpha badges.
* **Improvements**
* Clearer UI copy for external destinations, alpha disclaimers, and
onboarding flows.
* Consolidated "n/a" handling for lag displays and richer metric
tooltips.
* Simplified replication diagram visuals and clearer table/row
status/lag presentation.
* Replication status responses now include expanded slot health and lag
metrics.
* **Tests**
* New test suites covering destination selection and destination row
states.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Details of change
Adds Snowflake to the Studio replication destination flow:
- destination selection and display
- create/edit form fields
- validate/create/update payload serialization
- generated Platform API types
Snowflake remains gated behind `etlEnableSnowflakePrivateAlpha`.
**Note:** I have configured `etlEnableSnowflakePrivateAlpha` in
ConfigCat ("all" in staging and tied to my own org id in prod).
## Details of Verification Process
- Studio focused Vitest coverage for form serialization and diagram
mapping
- Studio typecheck
- ESLint on changed Studio replication files
- Local `mise fullstack:dev` smoke test to confirm the Snowflake form
renders ok.
<img width="937" height="569" alt="image"
src="https://github.com/user-attachments/assets/8d6b3a87-1f9d-4a59-91da-be719714ea49"
/>
Full create/validate E2E depends on the Platform PR and ETL runtime
rollout.
## Review Requests
Please check the Snowflake wire payload matches the Platform/ETL
contract and that gating/edit/display behavior follows the existing ETL
destination patterns.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Snowflake added as a supported replication destination (private-alpha
gated), including UI for selecting and configuring connection and auth
(account, user, database, schema, role, private key, optional
passphrase).
* **Validation**
* Form validation and submission now handle Snowflake-specific
required/optional fields.
* **Tests**
* Unit tests added for Snowflake form behavior and replication-type
detection.
* **API**
* Destination create/update/validate flows extended to accept Snowflake
payloads.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
Wires the existing `list-page.*` shortcuts up to the Database →
Replication and Database → Migrations pages, so they get the same hotkey
behavior as Roles, Tables, Publications, etc. No new shortcut IDs were
added.
**Migrations page**
- Shift+F → focus the migration search input (label: "Search
migrations")
- F C → clear the search filter
**Replication / Destinations page**
- Shift+F → focus the destinations filter input (label: "Search
destinations")
- F C → clear the filter
- Shift+N → open the Add Destination panel. Wrapped with `<Shortcut>` so
the keybind tooltip shows on hover, and gated on
`!!newDestinationDefaultType` so it stays disabled when no destination
type is available.
Closes
[FE-3141](https://linear.app/supabase/issue/FE-3141/add-shortcuts-for-database-replication-and-migration-page).
## Test plan
- [x] On the Migrations page, press Shift+F → search input focuses &
selects existing text.
- [x] On the Migrations page, type a query then press F C → search
clears.
- [x] On the Replication page, press Shift+F → filter input focuses &
selects.
- [x] On the Replication page, press Shift+N → Add Destination panel
opens (when a destination type is available).
- [x] Hover the "Add destination" button → keybind tooltip shows
Shift+N.
- [x] On the Replication page, type a filter then press F C → filter
clears.
- [x] All four shortcuts appear in Cmd+K under "Shortcuts" while on the
respective page.
- [ ] Disabling list-page shortcuts in Preferences disables them on
these pages too.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added keyboard shortcuts for search field focus and filter reset in
Database Migrations and Destinations pages
* Added keyboard shortcut for "Add destination" action in Destinations
page
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This PR fixes some prettier issues:
- Bump and unify all prettier versions to 3.7.3 across teh whole repo
- Bump the SQL prettier plugin
- When running `test:prettier`, check `mdx` files also
- Run the new prettier format on all files
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
## Context
Small one - while on the database replication page, if you open the
Connect Dialog and change the "type" field, the destination panel opens
up. Happening cause the string for `useQueryState` conflicts here - both
are using `type`
Fix is just to update the string for `useQueryState` for the
DestinationPanel component, changed it to `destinationType`
## Context
Just cleaning up the `unifiedReplication` feature flag now that this is
fully rolled out
Also addresses some bugs that I came across while cleaning up,
specifically for the new home page
- Add enabled features flag check for read replicas in database
replication
- Infra diagram, read replicas
- View connection string CTA to open connect UI with the right database
selected
- Replaced all other actions with a "Manage replica" CTA which links to
the replica details page
## Context
Related to unifying read replicas into database replication page which
is currently in internal testing
## Changes involved
- Updates the "New replica" CTA in `DatabaseSelector` (e.g within the
SQL Editor) to link to the replication page instead of settings
infrastructure
- Refactor replication UI to use URL query states for new destination +
edit destination
## To test
- [ ] Verify that the "New replica" CTA links correctly to replication
page if flag is on
- [ ] Verify that new + edit destination UI works as expected
- Note that there's some server side validation for ETL replication now
so might be tricky to test creating an actual ETL replication
- Minimally can test creating a read replica and ensure that the UI
behaviour is all as expected
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added unified replication experience with URL-based state management
for destination creation and editing
* **Refactor**
* Simplified replication panel component interfaces and consolidated
destination data fetching logic
* Enhanced edit flows to leverage URL parameters for seamless navigation
* **Chores**
* Marked legacy read replica creation panel as deprecated
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
* Use new table component for replication page
* Render replicas in destinations page + support restart, drop, create replicas
* Shift enable replication CTA into panel if unified replication is on
* Nit
* Address 🐰
* Bump the deps, refactor deprecated code.
* Migrate keepPreviousData usage.
* Migrate all uses of InfiniteQuery.
* Fix refetchInterval in queries.
* Migrate all use of isLoading to isPending in mutations.
* Fix accessing location in claim-project.
* Fix a bug in duplicate query keys.
* Migrate all queries to use isPending.
* Revert "Fix accessing location in claim-project."
This reverts commit 2a07df64b5.
* Revert the rss.xml file to master.
* init request upgrade plan modal
* Consolidate UpgradeToPro components across UI + use UpgradePlanButton, UpgradePlanButton determines whether to show request upgrade CTA
* Allow to pass icon to Admonition
* Tiny fix on upgrade plan button CTA to consider addons
* Hook up upgrade request endpoint
* Update API types
* remove hardcode
* Add request upgrade CTA in plan side panel
* Fix disk compute
* Show request upgrade button for change to large compute
* Nit
* Update Supabase docs URLs to use env variable
Co-authored-by: a <a@alaisteryoung.com>
* Refactor: Use DOCS_URL constant for documentation links
This change centralizes documentation links using a new DOCS_URL constant, improving maintainability and consistency.
Co-authored-by: a <a@alaisteryoung.com>
* Refactor: Use DOCS_URL constant for all documentation links
This change replaces hardcoded documentation URLs with a centralized constant, improving maintainability and consistency.
Co-authored-by: a <a@alaisteryoung.com>
* replace more instances
* ci: Autofix updates from GitHub workflow
* remaining instances
* fix duplicate useRouter
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: alaister <10985857+alaister@users.noreply.github.com>
* feat(replication): Add new UI for new table state handling
* Fix
* Fix
* Fix
* Fix
* Fix
* Fix
* Fix
* Improve
* Fix
* Fix
* Fix TS
* Some UI tweaks
* Tweaaakk
* Fix semantics
* Small optimization
* Some adjustments
* Bit more fixes
* Small UI tweak to simplify UI
* Fixy fix
* gahhh tiny tiny tiny
* Last bit of cleanup
* I swear one final tweak
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* feat: use the new tenant-source api to atomically create the tenant and source in pg_replicate
* feat: use the new sink-pipeline api to atomically create the sink and pipeline in pg_replicate
* fix: remove some unused imports
* feat: use the new sink-pipeline api to atomically update the sink and pipeline in pg_replicate
* feat: deleting the sink cascades to delete the pipeline
* chore: update api types
* fix: revert accidental update to types
* remove unused code
* add a comment explaining why deleting only sink is enough
* 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>