Commit Graph
338 Commits
Author SHA1 Message Date
Andrew Valleteau 45a239f1d5 fix: change the message for transient errors (#35691) 2025-05-15 09:03:59 -02:30
Joshen Lim 9139418ef0 Chore/cleanup feature flags 130524 (#35648)
* Clean up reportsV2 feature flag

* Clean up edgeFunctionCreate feature flag

* Clean up creditTopUp feature flag

* Clean up allowOrioleDb feature flag
2025-05-14 16:56:27 +08:00
Andrew Valleteau 31aad403de fix(studio): early fail query when x-connection-encrypted is invalid (#35331)
* fix(studio): early fail query when x-connection-encrypted is invalid

* fix(studio): uniformize readDatabase and projectDetails connString handling

* chore: update api types

* chore: add connectionString null option

* fix: only enforce x-connection-encrypted on platform

* chore: refactor connString check in a single point

* chore: fix guard logic

* chore: fix pgMetaGuard

* chore: fix types
2025-05-08 12:11:03 +02:00
Joshen LimandAlaister Young ff3832a659 Fix query block read only catch (#35543)
* Fix query block read only catch

* Update apps/studio/components/ui/QueryBlock/QueryBlock.tsx

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

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2025-05-08 15:35:08 +08:00
Jonathan Summers-MuirandJoshen Lim 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
Terry Sutton 7fc8609e19 Fix/ff results panel height (#35483)
* Fix height of results in inline sql editor in firefox

* Rm space
2025-05-06 11:56:18 +08:00
Pamela Chia ef963356ae fix: add missing groups to events (#35437) 2025-05-06 11:38:50 +08:00
Francesco SansalvadoreandAlaister Young 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
2b419c70a1 chore: add usercentrics for consent management (#35384)
* chore: add usercentrics for consent management

* client component to make next.js happy

* address feedback

* move consent state to common

* fix import

* ensure page events are sent correctly

* add feature flag provider to ui library site

* fix ui lib 500 error

* skip in test env

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2025-05-05 13:18:48 +08:00
Terry Sutton 263b0c1c5b Fix pointer events (#35408) 2025-05-01 13:16:13 -02:30
Joshen Lim 4a5e1a8bd4 Update query block bar hover behaviour (#35374)
* Update query block bar hover behaviour

* Smol fix
2025-04-30 17:47:47 +08:00
Daniel Gabriel 915af35334 fix(ui): enable portal for popover components (#35370) 2025-04-30 06:52:23 +00:00
Joshen LimandIvan Vasilov 9088aa7fe8 Fix query block not showing labels (#35328)
* Fix query block not showing labels

* Readd the css file for react-resizable.

* Add react-resizable package to resolve a style.css file not found issue

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-04-28 22:13:38 +02:00
Joshen Lim d75b7c37bb Update all links that were pointing to settings/auth to their respective updated pages (#35281) 2025-04-25 23:59:53 +07:00
Ivan Vasilov 8a321126ac chore: Clean dead code in ui package (#35093)
* Clean up unneeded files and exports in packages/ui.

* Fix references to LogoLoader.

* Import SimpleCodeblock directly from ui package.
2025-04-24 12:24:12 +02:00
Joshen Lim 3996052921 Add error handling UI for QueryBlock (#35032) 2025-04-21 16:17:45 +07:00
Paul CioancaandJoshen Lim 80edc92c62 feat: expose database upgrade logs to end-users (#27924)
* feat: expose pg_upgrade logs to end-users

* chore: don't display database operations group if deployed on the platform

* chore: remove log file from schemas

* chore: bring changes up to date

* Fix layout

* Refactor

* Clean up

* Check if using DefaultPreviewSelectionRenderer is sufficient

* Clean up file

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-21 11:45:48 +07:00
Andrew ValleteauandJoshen Lim 4a3baa6ab6 fix(studio): Handle query timeout error (#34865)
* fix(studio): Handle query timeout error

There is a global timeout of about 50s on /query endpoint
This would fail the request independently from the user statement timeout setting
add a case to handle this error and add a CTA to suggest the user of direct
connection for long running queries

* chore: apply pr comments

* Tiny refactor

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-18 16:08:37 +08:00
Jordi EnricandJoshen Lim 8a340ae610 FE-1338: New UI for LogsDatePickers (FE-1512) (#33164)
* add more date range options to log previewer

* new ui for logs datepickers

* update logsquerypanel

* update previewfilterpanel

* fix some bugs and add copypasting date range support

* handle updating times in copypaste events

* add handlepaste to timesplitinput

* update warehouse datepicker

* update reports datepicker

* rm consolelog

* update logsquerypanel

* update tests

* fix reportsfilterbar

* update api-overview report

* rm consolelogs

* update storage report

* add large range wraning

* update large range max const

* fix default values and label

* fix tests

* add default value to logs previewer

* disable helpers fix

* rm last 7 days helper

* add test for disabled helpers

* add label test

* add helper label test

* reset state when closing without saving

* undo rm

* fm datefns, fix test class

* fix year format

* rm disabled from label

* fix type err in test

* fix test

* fix tests

* max 2 days for warning

* fix refresh not using latest timestamp end

* refactor log explorer to use new logs datepicker state hook

* Remove round to hour/day in helpers

* Use now instead of end of day for datepicker TO

* fix types

* update global timeout for e2e tests

* update test with new default

* fix test

* analytics container taking too long to return data so adding more timeout

* force ci

* fix first render issues

* Smol refactor

* Do not reset timestamp end when refreshing in LogsPreviewer

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-18 14:28:47 +08:00
Joshen Lim fd10704cc1 Make feature preview available + Fix up Connect UI for local self-host (#35060)
* Make feature preview available for local self-host

* Fix up Connect UI for local / self-host

* Fix

* Fix

* Fix
2025-04-16 19:35:09 +08:00
Joshen Lim 53764445ff Add org plan and num projects to organization action card (#35035)
* Add org plan and num projects to organization action card

* Small fix to feature preview modal
2025-04-16 13:34:17 +08:00
Terry Sutton fd8d7739a4 Fix inline editor theme (#35039) 2025-04-15 14:20:53 +00:00
Kevin Grüneberg d05bbb669f perf: use subscription plan from org response (#34993) 2025-04-14 20:37:19 +08:00
Joshen Lim 5a3d00a56e Support drag drop SQL block from assistant to empty custom report (#34930) 2025-04-14 16:54:33 +08:00
Francesco SansalvadoreandTheOtherBrian1 939e5c855a feat: reports infra o11y (#33310)
* test client connections charts

* add granularity to database dashboard

* add range selection

* add selection to area charts

* refactor ChartHeader

* fix default

* fix time preset selected label and add tooltip actions

* client connections stacked chart

* polish all new chartts

* change attribute

* fix

* add real queries

* memory stack

* cleanup

* precision 1

* update charts

* add endpoints

* tooltip

* format

* improve charts

* toggle max value

* show limit

* cleanup

* cleanup

* update api schema

* fix ram_usage_max_available

* remove pgbouncer and comments

* show total with percentage in chart header

* pretty

* hide

* update reports database

* remove client_connections

* revert

* fix connectionStrings error

* restore correct queries and conditions

* vertically zoom in to percentage data

* add feature flag logic on charts

* add feature flag logic to date picker

* chore: remove comment

* add tooltip to charts metrics

* chore: comment new pg endpoints

* feat: lazy load ComposedChartHandler queries

* feat: dim non-hovered chart values when hovering chart label item

* feat: improve dim styling

* chore: improve light mode stacked chart colors

* chore: remove 15s interval

* chore: sync types

* chore: remove type

* chore: restore type

* fix hook error

* show chart type toggle

* remove console log

* temp

* keep connections charts as before

* restore DateRangePicker

* show last aggregate value when not hovering

* clean up imports

* disk IOps read and write

* restore flag

* refactor queries

* clean up grafana promo banner

* Update database-charts.ts | updated language

* fix hook error

* fix hook error

* fix hook error

* attempt fix hook error

---------

Co-authored-by: TheOtherBrian1 <91111415+TheOtherBrian1@users.noreply.github.com>
2025-04-14 10:53:52 +02:00
Joshen Lim 84f73bb675 Chore/use readonly connection string for queryblock (#34892)
* Use read only connection string in queryblock

* Add comments
2025-04-11 16:43:06 +08:00
Saxon Fletcher 3e1f02d11d Move assistant stored state in to IndexedDB (#34848) 2025-04-11 18:33:33 +10:00
Kamil Ogórek c3a352331a ref: Fix all API types after Zod migration (#34903) 2025-04-11 10:28:08 +08:00
Joshen Lim 5df921ba12 Fix overflow in ResourceList (#34894) 2025-04-10 18:27:50 +08:00
Saxon FletcherandJoshen Lim c7378b0bf5 remove flag for just accessing inline editor (#34849)
* remove flag for just accessing inline editor

* remove feature flag in header

* clean up

* fix

* Tiny tiny style fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-09 14:42:15 +08:00
Saxon Fletcher 61a18cdcb6 set default value if empty array (#34828) 2025-04-08 21:30:35 +10:00
fb24d91305 Feat/ Org layout (#33150)
* update test

* move back button, fix width issues on sidebar

* update sidebar logic

* Update ProjectLayout.tsx

* lots of updates. layouts now streamlined. localstorage for tabs in use

* moar

* bunch of new tab logic

* fix empty tab issue

* Update tabs.ts

* layouts switched

* new pages now have fixed layouts

* fix tabs

* fix code bg

* add tabs support for multiple project refs

* intialization issue

* update ID handling

* fixed isOpened state for SQL snippets

* remove old assistant because its bugging up panels

* preview style works in sql editor

* fix border

* removes preview tab if there is one

* fix background of loading skeleton

* lots of issues with types/icons/redirect

* new tab cards

* snippets in empty state now work

* moar stuff

* tabs now in feature flags

* Update tabs.ts

* Update tabs.ts

* moar

* add feature previews

* remove code not needed

* Update next-env.d.ts

* Delete FeaturePreviewModal.tsx

* fix typescript errors. remove more explorer stuff

* remove explorer files

* fixed issues with templates and quickstarts tab

* fixed active state when tabs are not opted in

* logic error

* fix open/highlight issue when opted out of tabs

* templates/quickstarts now displayed with new cards

* Update recent-items.tsx

* Update new-tab.tsx

* add icon back in

* add old empty state back in

* recent items updated to respect project ref

* localstorage cleanup on deletion

* moar

* overflow tabs now working

* correct tab names used for new sql templates/quickstarts

* ongoing queries fix

* cleanup

* update images

* Update RouteValidationWrapper.tsx

* Update AppLayout.tsx

* Update NavigationBar.tsx

* add headers back into side panels

* improve writing

* tabs now drag and drop a billion times better

* Update tabs.tsx

* Update tabs.tsx

* init issues on stores, which caused a race condition.

* fix hydration error

* init

* init sidebars

* init

* Update app-default-navigation.tsx

* user dropdown updates

* moar layouts

* init

* moar

* moar

* updat

* reverse top bar

* some banners

* moar

* start adding account page

* change styling of dropdowns

* Update sidebar.tsx

* fix new tab issue in sql

* Update ProjectLayout.tsx

* Update pnpm-lock.yaml

* latest

* Update pnpm-lock.yaml

* moar layouts on account

* getLayout updates

* more fixes

* force a cache build

* moar

* Update app-default-navigation.tsx

* fix AI button animation

* moar layout

* account pages refactored

* Update user-dropdown.tsx

* Update new-tab.tsx

* move EditorMenuListSkeleton

* Fix type issues

* fixes: DESIGN-87

fixes: DESIGN-87

* refactor sort/filter components

* Update rules-set-button-text.tsx

* remove discussions for now

* small styling fixes

* Update FeaturePreviewModal.tsx

* Update FeaturePreviewModal.tsx

* Update RouteValidationWrapper.tsx

* revert

* revert

* revert

* revert

* revert

* more revert

* Update collapse-button.tsx

* Update SQLEditorTreeViewItem.tsx

* revert

* Update SchemaGraph.tsx

* Delete new-upcoming.tsx

* revert

* Update ProjectLayout.tsx

* fix home link

* Update table-editor.spec.ts

* test update

* Update projects.tsx

* remove

* Delete sidebar-open-top-banner.tsx

* add organizations page

* Update table-editor.spec.ts

* Fix the playwright tests.

* layout fixes

* layout fix

* revert sort/filter

* Update LastSignInWrapper.tsx

* revert

* revert

* remove

* update file names

* revert

* revert

* revert

* advisor lint page tabs revert

* revert

* revert

* revert

* revert

* revert

* revert tabs

* remove packages

* add sidebar

* sidebar docs added

* add sidebar

* fixed issues

* fix mobile

* fixes

* add org side bar in

* redirect updated

* fix more layouts

* move settings icon back down

* remove old stuff

* Delete SideBar.tsx

* use ProfileImage component

* spelling

* Update ThemeSettings.tsx

* Update ThemeSettings.tsx

* Update Sidebar.tsx

* layout udpate

* Update Sidebar.tsx

* fixes

* Minor lints

* Update Sidebar.tsx

* create a alt user dropdown for self hosting and local

* add fragment back in

* Adds Theme Selector for local/self hosting

* Update UserDropdown.tsx

* fix theme selector for local self host

* Update index.ts

* Update DefaultLayout.tsx

* now supports feature preview

* remove old files

* rename files

* revert

* Update LayoutHeader.tsx

* clean

* revert

* revert

* Update resource-banner.tsx

* remove redundant side bar stuff

* organizations action bar updated. removed hardcoded value

* fix type errors

* fix tests

* Undo test changes

* Fix account pages for when feature preview is off

* Bug fixes 1

* Missing key in map of EmailTemplates

* Fix missing border in StorageExplorer

* fix missing header in performance advisor

* Final clean up

* Fix DefaultLayout re-rendering issue on auth pages

* A couple of fixes

* Redirect to /organizations if land on /projects with feature preview on

* Route back to /projects if toggling preview off on /organizations

* Add HomePageActions to /org/slug

* make re-routing nicer

* Moar fixes

* Fix logging in redirect to /organizations irregardless of feature preview

* Fix missing withAuth in OrganizationLayout

* Minor clean upo

* Fix branch dropdown not aligned

* Add feature preview for update layout

* update dropdowns to only be chevron triggered in new layout

* Update content-query.ts

* Update entity-types-infinite-query.ts

* add IS_PLATFORM for org dropdown

* Add IS_PLATFORM check for EnableBranchingDropdown in LayoutHeader

* Midway fixing mobile nav

* Mobile nav fixes

* Address feedbacks

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2025-04-08 11:32:29 +08:00
Jordi Enric 1588f04909 Charts: Strings in Y Axis break charts. (#34804)
fix
2025-04-07 18:17:19 +02:00
Joshen Lim d25451efe5 Remove useKeyboardShortcuts in Results.tsx (#34733)
* Remove useKeyboardShortcuts in Results.tsx

* Remove Cmd C overrides in table editor

* Refactor onCellKeydown to a common utils, and add check for ctrlKey
2025-04-04 18:50:02 +08:00
Joshen Lim caf9a4e962 QueryBlock whitelist now() and left() functions (#34729) 2025-04-04 15:50:03 +08:00
Joshen LimandIvan Vasilov fa8cf46d50 Chore/refactor download results button to use papaparse (#34693)
* refactor LogTable and PreviewFilterPanel to use DownloadResultsButton

* Remove CSVButton file and remove react-csv dependency

* Update

* Change the download button to use file-saver.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-04-03 13:44:16 +02:00
Joshen Lim 0f0b02e0d9 chore: rework disk validation and cleanup (#34533) 2025-04-03 16:58:23 +08:00
Joshen Lim 06091157d9 Table editor filter convert empty string value to null if column is not text based type (#34674) 2025-04-03 15:46:29 +08:00
Ivan Vasilov 86a690b00a fix: Add a catch block around a JSON.parse when rendering AI assistant messages (#34671)
Add a catch block around a json.parse.
2025-04-03 09:44:44 +02:00
Stojan Dimitrovski 63d1dfb941 fix: underline clerk connect page link (#34574) 2025-03-31 16:13:53 +02:00
Joshen LimandAlaister Young 8239e2f27b Cache results in assistant panel (#34509)
* Cache results in assistant panel

* Small fixes

* fix

* disable switching chats while new messages are streaming in

* small comment

* Fix Create new snippet CTA in query block

* Add useCallbacks

* Update

* Remove console log

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-03-31 19:24:21 +08:00
58272034b1 Multiple assistant chats (#34011)
* add assistant chats

* refactoring

* refactor

* refactor to use onfinish

* fix ts

* dependencies removal

* Update useAssistant.ts

* ts

* refactor useAssistant hook to valtio store

* Minor tweaks

* Add name param to newChat, and add names to each call of newChat

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-03-28 16:36:41 +08:00
Joshen Lim 8dc3ed42b8 Advisor Rules (Part 1) (#34175)
* Scaffold advisor rules

* Wrap up implementation

* Add feature flag

* Fix type issues

* Fix types

* fix

* Scaffold

* Revise UI for advisor rules

* Hide edit button

* Refactor AdvisorRulesLayout

* Some fixes from PR feedback
2025-03-28 15:51:19 +08:00
Saxon Fletcher 77dfe11248 Edit edge functions (#33727) 2025-03-26 19:54:12 +10:00
Chris Gwilliams b9ef3cb68f move API keys launch date to Q2 2025 (#34151) 2025-03-21 13:39:19 +01:00
Jordi EnricandIvan Vasilov 4bc169e036 Download Deno Types locally (#34302)
* add supabase assets url to urlImports

* rm unnecessary comment

* add download script

* clean up + jsr supabasejs script

* rm unused jsr-url const

* Exclude the *.ts files in public folder from tsconfig.

* Add the base path when fetching the type definitions.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-03-20 14:47:35 +01:00
Greg Richardson 6a506d39ea fix: edge function deno types (#34281)
* fix: edge function deno types

* fix: edge runtime type path on jsr

* fix: whitelist jsr.io in csp

* feat: deno global types

* fix: vitest with custom loader

* refactor: unnecessary template literal type

* refactor: unnecessary template literals

* fix: ts asset content type
2025-03-20 15:52:48 +08:00
Pamela Chia db1f2b4c4e feat: track new functions behaviour (#34239) 2025-03-19 10:10:45 +01:00
Joshen Lim 1655a17e70 Add support for configuring realtime settings (#33875)
* Add support for configuring realtime settings

* Refactor

* Fix TS

* Fix TS

* Smol update

* Hide new UI for local selfhosted

* Add feature flag

* Fix reset logic

* Fix

* minor refactor

* Fix package.json

* Simplify
2025-03-03 20:08:15 +08:00
Joshen Lim a458977e2d Support for Dedicated Pooler in Connection Pooling (#33817)
* Init

* Initial set up for hooking up supavisor and pgbouncer

* Hook up pgbouncer status check after swapping pooler type

* Add check for nano compute for switching to pg bouncer

* Add check for ipv4 addon

* Remove expect error tag

* Add badge to select options for pooler types

* Remove statement mode

* Resolve undefined problem with react hook form

* Fix

* Update UI texts from PgBouncer to Dedicated Pooler

* Feex

* FEEX

* Fix

* Small update to UI

* Smol update
2025-02-28 11:14:42 +08:00