Commit Graph

260 Commits

Author SHA1 Message Date
Riccardo Busetti
e9424b98de feat(replication): Delete destination and pipeline atomically (#37790) 2025-08-11 08:23:15 +02:00
Riccardo Busetti
1ea8c656db feat(replication): Add new UI for new table state handling (#37662)
* 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>
2025-08-07 12:16:03 +02:00
Joshen Lim
cab0585533 Fe 1799/consolidate to useselectedprojectquery and (#37684)
* 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
2025-08-06 10:53:10 +07:00
Michael Ong
61dedfa76f Chore/add e2e test for database (#37452)
* chore: add tests for database

* chore: add final tests and some refactoring

* chore: update playwright config
2025-08-05 12:33:32 +02:00
Saxon Fletcher
8b18592f3a fix visualiser size (#37674)
* fix visualiser size

* fix default assistant chat form
2025-08-05 10:14:12 +07:00
Drake Costa
ecc0388ef5 Fix Webhook Form not rendering persisted HTTP Headers upon refresh (#37600)
* resolve useEffect race condition

* force state re-initialization using `key` prop
2025-08-04 18:43:49 +00:00
Saxon Fletcher
c76707012d basic typography classes (#37613)
* basic typography classes

* Clean up classes for where we use h1 tags

* Clean up classes for where we use h2, h3, h4

* Clean up classes for where we use h6

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-04 20:55:34 +10:00
Joshen Lim
58d6b4b912 Invalidate project upgrade eligibility query when disabling database extension (#37589)
* Invalidate project upgrade eligibility query when disabling database extension

* Add link to extension upgrade warning, link to extensions page with filter

* Swap a for Link
2025-08-01 10:53:06 +02:00
Ivan Vasilov
b3c6992e56 feat: Make the protected schemas dynamic, namespace schemas are now protected (#37290)
* Add hooks for async protected schemas.

* Migrate the ProtectedSchemaWarning to support the new implementation.

* sq

* Migrate all uses of protected schemas to the new approach.

* Delete extra file.

* Refactor the import foreign schema dialog to forbid protected and exposed schemas.

* Add the type to the protected schema.

* Revert ImportForeignSchemaDialog, it'll be addressed in another PR.

* Update apps/studio/hooks/useProtectedSchemas.ts

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

* Fix a bad commit.

* Minor fixes.

* Fix the FDW delete mutation to handle names with numbers.

* Simplify the logic to skip a fetch.

* Minor fixes.

* Make the useIcebergFdwSchemasQuery work for all iceberg FDWs.

* Fix the tab schemas to always show in the Table Editor.

* Apply suggestion from @joshenlim

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

* Fix a minor typo.

* Refactor ProtectedSchemaWarning to use Admonition, and standardise input field for target schema iceberg

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-07-30 11:38:50 +02:00
Joshen Lim
5da5ad06c0 Shift pipeline status page to its own route (#37431)
* Shift pipeline status page to its own route

* Fix back link
2025-07-29 16:33:14 +08:00
Riccardo Busetti
0ecddf1901 feat(replication): Implement UI to render pipeline replication status (#37376) 2025-07-24 13:04:07 +02:00
Joshen Lim
31b8fbe487 Deprecate getAPIKeys from project settings v2, use new api keys endpoint instead (#37300)
* Deprecate getAPIKeys from project settings v2, use new api keys endpoint instead

* use getPreferredKeys where appropriate

* Prevent usage of secret key for storage and realtime inspector

* Add dashboard API api-keys endpoint

* Simplify

* Disable edge functions test if legacy api keys are disabled

* Revert

* Fix graphiql

* Remove all usage of api keys from project settings, except DisplayApiSettings

* Update

* Fix

* Small fix for an undefined upload url.

* Fix the storage state initialization when the resumable url changes.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-07-22 16:22:03 +08:00
Joshen Lim
88dca021d6 Webhooks automatically append authorization header if edge function with verify JWT enabled is selected (#36759)
* Webhooks automatically append authorization header if edge function with verify JWT enabled is selected

* Fix when selecting http request to remove auth header as well

* fixy fix
2025-07-21 12:16:06 +08:00
Riccardo Busetti
e3b646fea6 feat(replication): Implement new error UI when the pipeline fails (#37105) 2025-07-15 13:10:37 +03:00
Joshen Lim
0666d5c03e Add portal to PopoverContent in TimezoneSelection.tsx (#37001) 2025-07-15 18:05:13 +08:00
Saxon Fletcher
d8f34dcd79 remove duplicate download (#37093) 2025-07-14 15:33:39 +08:00
Riccardo Busetti
9fc9dc593a feat(replication): Improve status display of the pipeline (#37024) 2025-07-11 16:51:51 +02:00
Saxon Fletcher
216b235877 Review branch diff with AI (#36915) 2025-07-10 09:11:34 +10:00
Riccardo Busetti
a77d40e43b feat(replication): Update the API calls for replication endpoints (#36866) 2025-07-08 16:34:03 +02:00
Saxon Fletcher
94c45c2863 AI UI refine and renaming (#36819)
* ui refinements

* rename chat

* copy

* prose message styles

* add icon back

* fix message save

* simplify empty state

* update suggestions

* pass through props

* button styles

* onboarding icons

* name button

* remove results

* current chat name

* use type

* fix down arrow

* re-add chat name
2025-07-08 12:09:11 +10:00
Terry Sutton
2aee61530d Chore/fix index delete (#36774)
pass schema to delete index
2025-06-30 13:06:18 -02:30
Joshen Lim
7aa111b863 Chore/misc fixes 200625 (#36545)
* Fix database functions editor not resetting maximized state when panel is closed

* Small update to copy in compute costs confirmation modal
2025-06-23 13:47:35 +08:00
Peter
b399331479 fix: webhook delete dialog spacing and typo (#36445)
* Add space between words and fix typo

* pnpm format
2025-06-16 16:29:40 -05:00
Joshen Lim
46337689db Add is nullable column to ColumnList (#36352) 2025-06-12 15:33:07 +08:00
Jordi Enric
792e2316f0 fix schema selector in create fn sheet (#36141)
* fix schema selector in create fn sheet

* fix schemaselctor in auth hook

* add portal false to schemaselector in sqlfunction for cronjobs

* Fix schema selector in function sheet

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2025-06-03 09:26:13 -02:30
Terry Sutton
0ffe63f062 add replication area to dashboard (#35946)
* First

* Update link

* Type issue
2025-05-30 13:31:37 -02:30
Jordi Enric
ba29cf187d Add copy schema to schema vizz (#34806)
* copy state

* add tooltip and better sql generation

* fix

* fix tooltip
2025-05-29 16:00:37 +00:00
Raminder Singh
b411ed3421 chore: rename sink to destination for the etl api (#35931)
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-05-26 21:30:10 +05:30
Ivan Vasilov
76b123cfb0 chore: Add a badge on extension card to deprecated extensions (#35868)
Add a badge on extension card to deprecated extensions.
2025-05-23 10:45:51 +02:00
Julien Goux
b7057fa9d8 fix: move triggers requests to query route (#35667) 2025-05-20 15:41:43 +08:00
Joshen Lim
009005c759 Minor fix database trigger header (#35666) 2025-05-18 15:28:33 +08:00
Andrew Valleteau
45a239f1d5 fix: change the message for transient errors (#35691) 2025-05-15 09:03:59 -02:30
Joshen Lim
bc4ca2e275 Remove unnecessary includeSystemSchemas, stay consistent with hosted (#35670)
* Remove unnecessary includeSystemSchemas, stay consistent with hosted

* Fix space

* Add error hanlding for function_name in trigger sheet

* Refactor
2025-05-14 22:35:23 +08:00
Monica Khoury
afbc8bb3c2 fix: clarify restore project disk sizing behavior (#35607)
* fix: clarify restore project disk sizing behavior

* add disk can only be expanded
2025-05-14 15:30:50 +03:00
Raminder Singh
520428680d feat: call the new api endpoints to handle partial failures in pg_replicate (#35418)
* 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
2025-05-10 12:04:37 +05:30
Jonathan Summers-Muir
2815dac7e0 Feat/index suggestions inline (#35107)
* init

* hovercard

* adds button to install index advisor

* hover card now now insert indexes

* update

* moved hook

* align alert dialog to design syste,

* Update index-advisor.utils.ts

* shows all index statements now

* Update query-performance.tsx

* Some refactors

* Clean up

* Fix

* One last nit refactor

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-05-07 19:09:58 +08:00
Francesco Sansalvadore
a4cfcd9b2e global user dropdown in docs and www (#35063)
* docs: user nav dropdown

* www: user dropdown nav

* update menus

* chore: add complete local storage allowlist

* move all local-storage to common

* reload after logOut

* add local storage key changes from #35175

* fix errors

* add more keys

* fix merge bugs

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-05-05 11:48:06 +02:00
Joshen Lim
3c3fe9b5f1 Chore/fix papercuts 020525 (#35427)
* Fix giant icon in roles edit button

* Fix portals for edge functions and realtime inspector

* Set refetchInterval to 2000 in DiskManagementForm if requested_modification in data

* Fix
2025-05-05 11:27:29 +08:00
Daniel Gabriel
915af35334 fix(ui): enable portal for popover components (#35370) 2025-04-30 06:52:23 +00:00
Joshen Lim
dd03625f55 Chore/refactor triggers to remove mobx (#35254)
* Set up create trigger

* Hook up update trigger

* Deprecate CreateTrigger

* Small clean up DeleteTrigger

* Update apps/studio/components/interfaces/Database/Triggers/TriggerSheet.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2025-04-28 11:33:37 +08:00
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
323ac72cb1 FIx layout in support form (#35065) 2025-04-21 15:36:42 +07:00
Joshen Lim
a4d5af48c8 Downgrade and fix radix dialog version to 1.0.5, and remove unnecessary modal props from all usages of DropdownMenu (#35027)
* Downgrade and fix radix dialog version to 1.0.5, and remove unnecessary modal props from all usages of DropdownMenu

* Downgrade and fix radix dialog version to 1.0.5, and remove unnecessary modal props from all usages of DropdownMenu

* Fix PopoverPOrtal

* Fix
2025-04-15 17:29:32 +08:00
Kevin Grüneberg
d05bbb669f perf: use subscription plan from org response (#34993) 2025-04-14 20:37:19 +08:00
Jonathan Summers-Muir
36a2d79e8e chore: add warning text to restore dialog (#34920)
* Update BackupsList.tsx

* Add base variant warning

* Update size

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-11 18:09:00 +08:00
Kamil Ogórek
c3a352331a ref: Fix all API types after Zod migration (#34903) 2025-04-11 10:28:08 +08:00
Ivan Vasilov
f05a714eef fix: Fix the modality of dropdowns in sheets (#34911)
Fix the dropdowns modal.
2025-04-10 15:41:44 -02:30
Terry Sutton
ee24dbe271 Fix dropdowns (#34901) 2025-04-10 14:01:47 +00:00
Joshen Lim
09959606e8 Add toast messages for success and failure when downloading schema visualizer current view (#34833)
* Add toast messages for success and failure when downloading schema visualizer view

* Support downloading as either PNG or SVG
2025-04-10 10:44:23 +08:00
Joshen Lim
09c6f0aa2c DropdownMenu component modal prop default to false, but allow passing prop value (#34846)
* DropdownMenu component modal prop default to false, but allow passing prop value

* Smol fix for advisor
2025-04-09 13:59:57 +08:00