From 3d55164563db987c9eaf077f6de310f835c8deb8 Mon Sep 17 00:00:00 2001 From: Jordi Enric <37541088+jordienr@users.noreply.github.com> Date: Wed, 17 Sep 2025 12:59:07 +0200 Subject: [PATCH 01/12] propagate sentry issue id to form (#38714) * propagate sentry issue id to form * fix, add to payload * empty * name fix * add test button * rm thrower * Update apps/studio/components/ui/GlobalErrorBoundaryState.tsx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> --------- Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> --- .../components/interfaces/Support/SupportFormV2.tsx | 4 ++++ apps/studio/components/ui/GlobalErrorBoundaryState.tsx | 8 ++++---- apps/studio/data/feedback/support-ticket-send.ts | 3 +++ apps/studio/pages/_app.tsx | 7 +++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/apps/studio/components/interfaces/Support/SupportFormV2.tsx b/apps/studio/components/interfaces/Support/SupportFormV2.tsx index c0c1c7ef988ee..5d8077f91a8a2 100644 --- a/apps/studio/components/interfaces/Support/SupportFormV2.tsx +++ b/apps/studio/components/interfaces/Support/SupportFormV2.tsx @@ -66,6 +66,7 @@ import { SEVERITY_OPTIONS, } from './Support.constants' import { formatMessage, uploadAttachments } from './SupportForm.utils' +import { useRouter } from 'next/router' const MAX_ATTACHMENTS = 5 const INCLUDE_DISCUSSIONS = ['Problem', 'Database_unresponsive'] @@ -93,6 +94,8 @@ export const SupportFormV2 = ({ message: urlMessage, error, } = useParams() + const router = useRouter() + const dashboardSentryIssueId = router.query.sid as string const uploadButtonRef = useRef(null) const [isSubmitting, setIsSubmitting] = useState(false) @@ -239,6 +242,7 @@ export const SupportFormV2 = ({ .map((x) => x.trim().replace(/ /g, '_').toLowerCase()) .join(';'), browserInformation: detectBrowser(), + ...(dashboardSentryIssueId && { dashboardSentryIssueId }), } if (values.projectRef !== 'no-project') { diff --git a/apps/studio/components/ui/GlobalErrorBoundaryState.tsx b/apps/studio/components/ui/GlobalErrorBoundaryState.tsx index 87bb6b27f228f..92f916d1964c0 100644 --- a/apps/studio/components/ui/GlobalErrorBoundaryState.tsx +++ b/apps/studio/components/ui/GlobalErrorBoundaryState.tsx @@ -15,7 +15,6 @@ import { } from 'ui' import { InlineLinkClassName } from './InlineLink' -// More correct version of FallbackProps from react-error-boundary export type FallbackProps = { error: unknown resetErrorBoundary: (...args: any[]) => void @@ -31,6 +30,9 @@ export const GlobalErrorBoundaryState = ({ error, resetErrorBoundary }: Fallback ? errorMessage.includes("Failed to execute 'removeChild' on 'Node'") : false + // Get Sentry issue ID from error if available + const sentryIssueId = (!!error && typeof error === 'object' && (error as any).sentryId) ?? '' + const handleClearStorage = () => { try { localStorage.clear() @@ -67,7 +69,6 @@ export const GlobalErrorBoundaryState = ({ error, resetErrorBoundary }: Fallback
{errorMessage}
- {isRemoveChildError ? (
- Verify that the filter values are correct, as the error may stem from an
- incorrectly applied filter
+ The key that's used to retrieve data from your foreign table is either
+ incorrect or missing. Verify the key in your{' '}
+
+ Note: Vault keys from the main project do not sync to branches. You may add
+ them manually into{' '}
+
+ Verify that the filter values are correct, as the error may stem from an + incorrectly applied filter +
+ )} +- {(value / 1000).toFixed(2) + 's'} + {(value / 1000).toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + })} + s
) : (–
@@ -207,7 +211,7 @@ export const QueryPerformanceGrid = ({ queryPerformanceQuery }: QueryPerformance- {value.toFixed(0)}ms + {Math.round(value).toLocaleString()}ms
) : (–
@@ -244,7 +248,11 @@ export const QueryPerformanceGrid = ({ queryPerformanceQuery }: QueryPerformance cacheHitRateToNumber(value).toFixed(2) === '0.00' && 'text-foreground-lighter' )} > - {cacheHitRateToNumber(value).toFixed(2)}% + {cacheHitRateToNumber(value).toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + })} + % ) : (–
From 3a9c377ac3b5ae75df929ba336ff15397114e2b2 Mon Sep 17 00:00:00 2001 From: "kemal.earth" <606977+kemaldotearth@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:25:25 +0100 Subject: [PATCH 09/12] feat(studio): add query perf symlink to reports (#38783) * feat: add query perf symlink to reports * nit: remove preserveQueryParams from QP link --- .../layouts/ReportsLayout/ReportsMenu.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/studio/components/layouts/ReportsLayout/ReportsMenu.tsx b/apps/studio/components/layouts/ReportsLayout/ReportsMenu.tsx index bdcbc96054ff8..a770362494a59 100644 --- a/apps/studio/components/layouts/ReportsLayout/ReportsMenu.tsx +++ b/apps/studio/components/layouts/ReportsLayout/ReportsMenu.tsx @@ -1,5 +1,5 @@ import { PermissionAction } from '@supabase/shared-types/out/constants' -import { Plus } from 'lucide-react' +import { Plus, ArrowUpRight } from 'lucide-react' import Link from 'next/link' import { useRouter } from 'next/router' import { useMemo, useState } from 'react' @@ -146,6 +146,12 @@ const ReportsMenu = () => { }, ] : []), + { + name: 'Query Performance', + key: 'query-performance', + url: `/project/${ref}/advisors/query-performance`, + rightIcon:- No data available for the selected time range and filters -
) : isErrorState ? (Error loading chart data @@ -112,10 +112,11 @@ export const ReportChartV2 = ({