Commit Graph

32 Commits

Author SHA1 Message Date
Ali Waseem 3fcf980b0a fix(studio): batch of production Sentry crash fixes (array/null guards) (#47460)
Fixes a batch of production Studio crashes from Sentry (all caught by
the global error boundary). Most are missing array/null guards where an
endpoint typed as an array — or with a nested array field — returned a
non-array body in production; a few are one-off render crashes.

Resolves FE-3748.

## Issues fixed

| Sentry | Error | Fix |
| --- | --- | --- |
| [J7R](https://supabase.sentry.io/issues/7492997940/) | Maximum update
depth exceeded | Disable RadialBar animation in disk-cooldown countdown
|
| [JR5](https://supabase.sentry.io/issues/7548484681/) |
resourceWarnings.find is not a function | Guard in
ResourceExhaustionWarningBanner |
| [JCJ](https://supabase.sentry.io/issues/7506024989/) |
resourceWarnings.find is not a function | Guard in ProjectLayout +
normalize query |
| [K1Y](https://supabase.sentry.io/issues/7584792331/) | snippet.name on
undefined | Optional-chain SQL editor download filename |
| [B3K](https://supabase.sentry.io/issues/7141649636/) |
pagination.count on undefined | Guard pagination in projects infinite
query |
| [JVP](https://supabase.sentry.io/issues/7560437621/) | schemas.some /
extensions.find | Coerce pg-meta lists to arrays in
useInstalledIntegrations |
| [JR2](https://supabase.sentry.io/issues/7548339272/) | extensions.find
is not a function | (same fix as JVP) |
| [JQR](https://supabase.sentry.io/issues/7547163939/) | lints.filter is
not a function | Normalize project lints query |
| [JR3](https://supabase.sentry.io/issues/7548433501/) |
entitlements.find is not a function | Guard call sites + normalize
entitlements query |
| [JQS](https://supabase.sentry.io/issues/7547557098/) |
selected_addons.find is not a function | Normalize addons query arrays |


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved stability across several Studio screens by handling missing
or unexpected data more safely.
* Downloads now use a fallback name when a snippet name isn’t available.
* Project, entitlement, schema, addon, warning, and extension views are
less likely to break when data is missing or not in the expected format.
* Pagination and countdown visuals now behave more consistently, with
reduced chance of runtime errors or animation-related glitches.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-07-02 08:38:17 +00:00
Charis 205cbe7d26 chore(studio}: enforce import order, remove bare import specifiers (#44585) 2026-04-07 20:34:10 -04:00
Charis 3b7052b5a9 cleanup: fix import order and prefixes for studio/data (#44501) 2026-04-03 09:15:57 +02:00
Ivan Vasilov 8b657165b5 chore: Migrate to use custom type for ReactQuery queries and mutations (#40073)
* Add custom types for queries, mutations and infinite queries.

* Migrate all queries to use the new type.

* Migrate all infinite queries to useCustomInfiniteQueryOptions.

* Migrate all mutations to use useCustomMutationOptions.

* Add type to all imports in `types` folder.
2025-11-03 13:18:13 +01:00
Joshen Lim 64e3e047eb Final final cleaning up barrel files (#40018)
* Final final cleaning up barrel files

* Fix merge conflict
2025-10-31 14:02:59 +08:00
Ivan Vasilov da4a40e308 chore: Migrate RQ functions to use object syntax style (#39895)
* Migrate all uses of invalidateQueries to use object syntax.

* Migrate the remainder of useInfiniteQuery.

* Migrate all setQueriesData.

* Migrate all fetchQuery uses.

* Migrate some leftover functions from RQ.

* Fix issues found by Charis.
2025-10-28 10:43:14 +01:00
Alaister Young 8855d05803 chore(studio): swap react-query to object syntax (#39842)
* chore(studio): swap react-query to object syntax

* Fix small issues found

* Fix realtime settings

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-27 09:38:27 +01:00
Riccardo Busetti 77356bf946 feat(replication): Significantly improve the replication UI behavior (#38237) 2025-08-29 12:20:51 +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
Joshen Lim bcf943ee88 Advisor rules update for LW15 (#37202)
* Advisor rules update for LW15

* Simplify UX to confirmation modal

* Rename section to settings

* fix

* patchy

* further simplify

* Smol styling fix

* Create + Delete lint rules to also invalidate lints
2025-07-16 22:20:08 +08:00
Ivan Vasilov 4add928dae chore: Update API types (#35879)
* Regenerate all types from develop branch.

* Fix all types in studio.

* Remove extra type.
2025-05-26 15:43:14 +02:00
Joshen Lim e88595be86 Fix edge functions secrets permissions state (#34506)
* Fix edge functions secrets permissions state

* Fix type issues from advisor rules PR
2025-03-28 17:17:01 +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
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 342c9c4112 Fix connection pooling feature flag (#33914)
* Fix connection pooling feature flag

* Fix type issues with lint-query after updating API typs

* Apply same fix for connection_string to ConnectTabContent

* Update useMemo dependency arrays in ConnectionPooling

* Remove allowPgBouncerSelection enabled check on react queries - feels unnecessary and adds some complexity to the loading state of the forms

* Remove conosle log
2025-02-28 17:50:16 +08:00
Joshen Lim b37d377917 Add check for project active healthy status in some RQs that are unnecessary when project is paused (#30377) 2024-11-12 17:47:55 +08:00
Terry Sutton 607a6930c5 move linting to api (#26341)
* Start

* Fix type issues.

* Remove client side lints

* Fix error handler

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-05-23 14:34:29 -02:30
Oliver Rice f9db8f3482 Update lints (#26263)
update lints
2024-05-13 14:13:15 -05:00
Terry Sutton 8adf98ed96 Pass exposed schemas to lint query (#25784)
* Pass exposed schemas to lint query

* Type cleanup
2024-05-08 15:02:55 -02:30
Ivan Vasilov 52e63f2e8d chore: Update the linter with the latest changes (#23434)
Update the linter with the latest changes.
2024-04-30 11:23:54 +03:00
Ivan Vasilov e50aecc594 chore: Update the linter with the latest code (#23271)
Update the linter with the latest code.
2024-04-26 10:57:56 -02:30
Ivan Vasilov eadf3d5353 fix: Escape the escape chars so that auth_rls_initplan rule works properly (#23176)
Escape the escape chars so that auth_rls_initplan rule works properly.
2024-04-23 16:42:58 -02:30
Ivan Vasilov 1edaf9ed0c fix: Add another lint rule for accessing user metadata in RLS (#22904)
* Remove selectedRow which was row index but the info was already available through selectedLint.

* Update the lint query with the new code.

* Merge a render function into its calling component.

* Remove duplicated logic for entity name and icon.

* Fix minor mapping logic.

* Unite the loading flags in the security advisor.
2024-04-19 13:40:15 +02:00
Alaister Young 41a1737a9a feat: long otp expiry lint (#22891)
* feat: long otp expiry lint

* refetch auth query on re-run lints

* Remove duplicate lint rule

* clean up

* Update apps/studio/pages/project/[ref]/database/security-advisor.tsx

Co-authored-by: Inian <inian1234@gmail.com>

* add auth otp short length lint

* Only check phone OTP for linting if the phone provider is enabled.

---------

Co-authored-by: Inian <inian1234@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-04-19 09:44:33 +00:00
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
Terry Sutton 6b1a44524c Chore/linter v2 (#22790)
* Start mocking in v2 elements

* wip

* Cleanup header

* Get side panel working

* Style side panel

* Cleanup

* Add new lint

* Start filters

* Add lint filters

* Nudge loading state

* Fix empty state

* Cleanup

* Cleanup

* Font nudges

* Visual nudges

* Fix filters

* Fix shimmer

* Cleanup
2024-04-17 12:42:54 -02:30
Bobbie Soedirgo 8ad3a33104 fix(studio): backslash escaping in linter query (#22829) 2024-04-17 12:05:00 +00:00
Ivan Vasilov 1ca7cc36ce fix: Another lint update (#22682)
* Update the lint query with the latest from splinter.

* Fix a misspell.
2024-04-13 08:13:05 -02:30
Ivan Vasilov 5458fa4f32 fix: Update the lint query with the latest from splinter repo (#22672)
* Update the lint query with the latest from splinter repo.

* Update the lint to exclude some extension schemas.
2024-04-12 17:56:22 +02:00
Ivan Vasilov db2fb81ec8 feat: Add more lint rules (#22594)
* Refactor the functions page to keep its state in the URL.

* Derive the filter options from currently active lints.

* Update the lint query sql.

* Update the urls to the docs.

* Fix the paddings on the filterPopover.

* Add handling for the other types of lints.

* Comment out the ignore lint functionality.

* Fix a misspell.

* unbest

* Bring back the CTA button.

* Update the SQL code from the splinter repo.

* Add handling for the duplicate index lint rule.

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-04-11 11:50:17 +02:00
Charis fef87b78fb fix: change remediation links for database linter (#22520)
* fix: change remediation links for database linter

* fix: tab update behavior
2024-04-05 19:58:23 +00:00
Terry Sutton 280928a8e6 Feat/lints (#22003)
* Add lints, 2

* Add basic table

* Handle ignoring lints

* Add loading state

* Cleanup

* move utils

* Cleanup

* Shift lint to react query

* Merge master solve import lint issue

* Update lints UI

* Optional params

* Add entity and schema name

* Rename lints to linter, format results

* Wrap in markdown

* Adjust layout of some components

* Add CTAs to each lint

* fix ignored problems section

* Update type

* Add cta buttons for auth rls initialization issues

* Change metadata object

* Remove unneeded file.

* Add a component for CTA for a lint row.

* Make the lint query to be more type-safe.

* Various fixes to the lint table.

* Show the remediation link.

* Fix the button icons.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-04-01 20:37:48 +00:00