diff --git a/apps/docs/content/guides/auth/auth-anonymous.mdx b/apps/docs/content/guides/auth/auth-anonymous.mdx index 5a32482cefeb7..8125fb121b5f2 100644 --- a/apps/docs/content/guides/auth/auth-anonymous.mdx +++ b/apps/docs/content/guides/auth/auth-anonymous.mdx @@ -160,10 +160,10 @@ await supabase.auth.updateUser(UserAttributes(email: 'valid.email@supabase.io')) <$Show if="sdk:swift"> -You can use the [`updateUser()`](/docs/reference/swift/auth-updateuser) method to link an email or phone identity to the anonymous user. +You can use the [`update(user:)`](/docs/reference/swift/auth-updateuser) method to link an email or phone identity to the anonymous user. ```swift -try await supabase.auth.updateUser( +try await supabase.auth.update( user: UserAttributes(email: "valid.email@supabase.io") ) ``` diff --git a/apps/docs/content/guides/auth/quickstarts/nextjs.mdx b/apps/docs/content/guides/auth/quickstarts/nextjs.mdx index 94924ff67ca5c..7df9374334b38 100644 --- a/apps/docs/content/guides/auth/quickstarts/nextjs.mdx +++ b/apps/docs/content/guides/auth/quickstarts/nextjs.mdx @@ -31,7 +31,7 @@ hideToc: true Use the `create-next-app` command and the `with-supabase` template, to create a Next.js app pre-configured with: - - [Cookie-based Auth](docs/guides/auth/server-side/creating-a-client?queryGroups=package-manager&package-manager=npm&queryGroups=framework&framework=nextjs&queryGroups=environment&environment=server) + - [Cookie-based Auth](/docs/guides/auth/server-side/creating-a-client?queryGroups=package-manager&package-manager=npm&queryGroups=framework&framework=nextjs&queryGroups=environment&environment=server) - [TypeScript](https://www.typescriptlang.org/) - [Tailwind CSS](https://tailwindcss.com/) diff --git a/apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx b/apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx index 2a58a49ab6fec..64d58d9dee472 100644 --- a/apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx +++ b/apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx @@ -18,7 +18,7 @@ hideToc: true Use the `create-next-app` command and the `with-supabase` template, to create a Next.js app pre-configured with: - - [Cookie-based Auth](docs/guides/auth/server-side/creating-a-client?queryGroups=package-manager&package-manager=npm&queryGroups=framework&framework=nextjs&queryGroups=environment&environment=server) + - [Cookie-based Auth](/docs/guides/auth/server-side/creating-a-client?queryGroups=package-manager&package-manager=npm&queryGroups=framework&framework=nextjs&queryGroups=environment&environment=server) - [TypeScript](https://www.typescriptlang.org/) - [Tailwind CSS](https://tailwindcss.com/) diff --git a/apps/docs/content/guides/getting-started/tutorials/with-sveltekit.mdx b/apps/docs/content/guides/getting-started/tutorials/with-sveltekit.mdx index 3bc1c934eab80..ccdc1bcdf5121 100644 --- a/apps/docs/content/guides/getting-started/tutorials/with-sveltekit.mdx +++ b/apps/docs/content/guides/getting-started/tutorials/with-sveltekit.mdx @@ -227,9 +227,9 @@ Now, create the associated `src/routes/account/+page.server.ts` file that handle and handle all form actions through the `actions` object. <$CodeSample -path="/user-management/sveltekit-user-management/src/routes/+page.server.ts" +path="/user-management/sveltekit-user-management/src/routes/account/+page.server.ts" lines={[[1, -1]]} -meta="name=src/routes/+page.server.ts" +meta="name=src/routes/account/+page.server.ts" /> ### Launch! diff --git a/apps/docs/features/docs/Troubleshooting.utils.ts b/apps/docs/features/docs/Troubleshooting.utils.ts index ce613c7ef43ec..d8cf6d7d5c040 100644 --- a/apps/docs/features/docs/Troubleshooting.utils.ts +++ b/apps/docs/features/docs/Troubleshooting.utils.ts @@ -2,8 +2,7 @@ import { cache } from 'react' import { z } from 'zod' import { cache_fullProcess_withDevCacheBust } from '~/features/helpers.fs' -import { IS_PLATFORM } from '~/lib/constants' -import { supabaseAdmin } from '~/lib/supabaseAdmin' +import { supabase } from '~/lib/supabase' import { getAllTroubleshootingEntriesInternal, getArticleSlug as getArticleSlugInternal, @@ -27,10 +26,9 @@ export interface ITroubleshootingEntry { export const getArticleSlug = getArticleSlugInternal async function getAllTroubleshootingEntriesTyped() { - const result: ITroubleshootingEntry[] = ( - IS_PLATFORM ? await getAllTroubleshootingEntriesInternal() : [] - ) as ITroubleshootingEntry[] - return result + const result: ITroubleshootingEntry[] = + (await getAllTroubleshootingEntriesInternal()) as ITroubleshootingEntry[] + return result ?? [] } export const getAllTroubleshootingEntries = cache_fullProcess_withDevCacheBust( getAllTroubleshootingEntriesTyped, @@ -91,15 +89,11 @@ export async function getAllTroubleshootingErrors() { } async function getTroubleshootingUpdatedDatesInternal() { - if (!IS_PLATFORM) { - return new Map() - } - const databaseIds = (await getAllTroubleshootingEntries()) .map((entry) => entry.data.database_id) .filter((id) => !id.startsWith('pseudo-')) - const { data, error } = await supabaseAdmin() + const { data, error } = await supabase() .from('troubleshooting_entries') .select('id, date_updated') .in('id', databaseIds) diff --git a/apps/docs/lib/supabase.ts b/apps/docs/lib/supabase.ts index 78f371e4b8525..ad1f28a791229 100644 --- a/apps/docs/lib/supabase.ts +++ b/apps/docs/lib/supabase.ts @@ -1,4 +1,5 @@ import { createClient, type SupabaseClient } from '@supabase/supabase-js' + import { type Database as DatabaseGenerated } from 'common' export type Database = { diff --git a/apps/studio/components/interfaces/Auth/Overview/OverviewMonitoring.tsx b/apps/studio/components/interfaces/Auth/Overview/OverviewMonitoring.tsx index 9e65ac30826a2..43c7868ed0fb8 100644 --- a/apps/studio/components/interfaces/Auth/Overview/OverviewMonitoring.tsx +++ b/apps/studio/components/interfaces/Auth/Overview/OverviewMonitoring.tsx @@ -184,9 +184,9 @@ export const OverviewMonitoring = () => { { key: 'actions', header: '', - className: 'text-right flex-shrink-0', + className: 'w-6', render: (row) => ( -
+
), diff --git a/apps/studio/components/interfaces/Auth/Overview/OverviewTable.tsx b/apps/studio/components/interfaces/Auth/Overview/OverviewTable.tsx index 91ee66dd7e4ac..3f2451a66f3d2 100644 --- a/apps/studio/components/interfaces/Auth/Overview/OverviewTable.tsx +++ b/apps/studio/components/interfaces/Auth/Overview/OverviewTable.tsx @@ -61,7 +61,7 @@ export function OverviewTable({ columns, data, isLoading, emptyMessage }: Ove (data as unknown as T[]).map((row, idx) => ( {columns.map((col) => ( - + {col.render ? col.render(row) : (row as any)[col.key as string]} ))} diff --git a/apps/studio/components/interfaces/Auth/Overview/OverviewUsage.tsx b/apps/studio/components/interfaces/Auth/Overview/OverviewUsage.tsx index da2b2a5e80ae9..0ba0062ea149c 100644 --- a/apps/studio/components/interfaces/Auth/Overview/OverviewUsage.tsx +++ b/apps/studio/components/interfaces/Auth/Overview/OverviewUsage.tsx @@ -3,10 +3,20 @@ import { ScaffoldSectionTitle, ScaffoldSectionContent, } from 'components/layouts/Scaffold' -import { Card, CardContent, CardHeader, CardTitle, cn, Skeleton } from 'ui' +import { + Card, + CardContent, + CardHeader, + CardTitle, + cn, + Skeleton, + Tooltip, + TooltipContent, + TooltipTrigger, +} from 'ui' import Link from 'next/link' import { useParams } from 'common' -import { ChevronRight, ExternalLink } from 'lucide-react' +import { ChevronRight, ExternalLink, HelpCircle } from 'lucide-react' import { Reports } from 'icons' import { getChangeColor, @@ -28,6 +38,7 @@ export const StatCard = ({ suffix = '', invert = false, href, + tooltip, }: { title: string current: number @@ -36,6 +47,7 @@ export const StatCard = ({ suffix?: string invert?: boolean href?: string + tooltip?: string }) => { const router = useRouter() const isZeroChange = previous === 0 @@ -53,7 +65,19 @@ export const StatCard = ({ return ( - {title} + + {title} + {tooltip && ( + + + + + +

{tooltip}

+
+
+ )} +
{
{ +export const AdvisorSection = ({ showEmptyState = false }: { showEmptyState?: boolean }) => { const { ref: projectRef } = useParams() - const { data: lints, isLoading: isLoadingLints } = useProjectLintsQuery({ projectRef }) + const { data: lints, isLoading: isLoadingLints } = useProjectLintsQuery( + { + projectRef, + }, + { + enabled: !showEmptyState, + } + ) const snap = useAiAssistantStateSnapshot() const { mutate: sendEvent } = useSendEventMutation() const { data: organization } = useSelectedOrganizationQuery() @@ -93,6 +100,10 @@ export const AdvisorSection = () => { [sendEvent, projectRef, organization] ) + if (showEmptyState) { + return + } + return (
{isLoadingLints ? ( @@ -199,15 +210,21 @@ export const AdvisorSection = () => { ) : ( - - - -

- No security or performance errors found -

-
-
+ )}
) } + +function EmptyState() { + return ( + + + +

+ No security or performance errors found +

+
+
+ ) +} diff --git a/apps/studio/components/interfaces/HomeNew/Home.tsx b/apps/studio/components/interfaces/HomeNew/Home.tsx index ffb9b1de5c802..49d80d5c36a67 100644 --- a/apps/studio/components/interfaces/HomeNew/Home.tsx +++ b/apps/studio/components/interfaces/HomeNew/Home.tsx @@ -31,6 +31,7 @@ export const HomeV2 = () => { const hasShownEnableBranchingModalRef = useRef(false) const isPaused = project?.status === PROJECT_STATUS.INACTIVE + const isComingUp = project?.status === PROJECT_STATUS.COMING_UP const [sectionOrder, setSectionOrder] = useLocalStorage( `home-section-order-${project?.ref || 'default'}`, @@ -101,9 +102,11 @@ export const HomeV2 = () => { {sectionOrder.map((id) => { if (IS_PLATFORM && id === 'usage') { return ( - - - +
+ + + +
) } if ( @@ -123,16 +126,20 @@ export const HomeV2 = () => { } if (id === 'advisor') { return ( - - - +
+ + + +
) } if (id === 'custom-report') { return ( - - - +
+ + + +
) } })} diff --git a/apps/studio/components/interfaces/HomeNew/ServiceStatus.tsx b/apps/studio/components/interfaces/HomeNew/ServiceStatus.tsx index d5ed3f78d2b33..23d77e00f5706 100644 --- a/apps/studio/components/interfaces/HomeNew/ServiceStatus.tsx +++ b/apps/studio/components/interfaces/HomeNew/ServiceStatus.tsx @@ -254,36 +254,44 @@ export const ServiceStatus = () => { (service) => !service.isHealthy && service.status !== 'COMING_UP' ) const anyComingUp = services.some((service) => service.status === 'COMING_UP') - const overallStatusLabel = isLoadingChecks - ? 'Checking...' - : anyUnhealthy && !isProjectNew - ? 'Unhealthy' - : anyComingUp || isMigrationLoading || (isProjectNew && !allServicesOperational) - ? 'Coming up...' - : 'Healthy' + // Spinner only while the overall project is in COMING_UP; otherwise show 6-dot grid + const showSpinnerIcon = project?.status === 'COMING_UP' + + const getOverallStatusLabel = (): string => { + if (isLoadingChecks) return 'Checking...' + if (anyComingUp) return 'Coming up...' + if (anyUnhealthy) return 'Unhealthy' + return 'Healthy' + } + + const overallStatusLabel = getOverallStatusLabel() return ( - {services.map((service, index) => ( -
- ))} -
+ showSpinnerIcon ? ( + + ) : ( +
+ {services.map((service, index) => ( +
+ ))} +
+ ) } label={Status} value={{overallStatusLabel}} diff --git a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceCreateNewOrg.tsx b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceCreateNewOrg.tsx index d07d7a2db4b5c..bf5242d319a54 100644 --- a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceCreateNewOrg.tsx +++ b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceCreateNewOrg.tsx @@ -47,12 +47,14 @@ const AwsMarketplaceCreateNewOrg = ({ onboardingInfo }: Props) => { return ( <> - {onboardingInfo && !onboardingInfo.aws_contract_auto_renewal && ( - - )} + {onboardingInfo && + !onboardingInfo.aws_contract_auto_renewal && + !onboardingInfo.aws_contract_is_private_offer && ( + + )}

@@ -62,8 +64,11 @@ const AwsMarketplaceCreateNewOrg = ({ onboardingInfo }: Props) => {

You can read more on billing through AWS in our {''} - {/*TODO(thomas): Update docs link once the new docs exist*/} - + Billing Docs.

diff --git a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx index 45e5446be47af..d653482a4e438 100644 --- a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx +++ b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx @@ -118,12 +118,14 @@ export const AwsMarketplaceLinkExistingOrg = ({ return ( <> - {onboardingInfo && !onboardingInfo.aws_contract_auto_renewal && ( - - )} + {onboardingInfo && + !onboardingInfo.aws_contract_auto_renewal && + !onboardingInfo.aws_contract_is_private_offer && ( + + )} <> @@ -136,8 +138,11 @@ export const AwsMarketplaceLinkExistingOrg = ({

You can read more on billing through AWS in our {''} - {/*TODO(thomas): Update docs link once the new docs exist*/} - + Billing Docs.

diff --git a/apps/studio/components/interfaces/QueryPerformance/QueryPerformanceGrid.tsx b/apps/studio/components/interfaces/QueryPerformance/QueryPerformanceGrid.tsx index a35322a52def4..5cad7d106c47f 100644 --- a/apps/studio/components/interfaces/QueryPerformance/QueryPerformanceGrid.tsx +++ b/apps/studio/components/interfaces/QueryPerformance/QueryPerformanceGrid.tsx @@ -280,11 +280,14 @@ export const QueryPerformanceGrid = ({ } if (col.id === 'cache_hit_rate') { + const numericValue = typeof value === 'number' ? value : parseFloat(value) return (
- {typeof value === 'number' && !isNaN(value) && isFinite(value) ? ( -

- {value.toLocaleString(undefined, { + {typeof numericValue === 'number' && + !isNaN(numericValue) && + isFinite(numericValue) ? ( +

+ {numericValue.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2, })} diff --git a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx index 8752cde1a01fa..98b53f5f2f232 100644 --- a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx +++ b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx @@ -3,7 +3,7 @@ import Head from 'next/head' import { useRouter } from 'next/router' import { forwardRef, Fragment, PropsWithChildren, ReactNode, useEffect, useState } from 'react' -import { LOCAL_STORAGE_KEYS, useParams } from 'common' +import { LOCAL_STORAGE_KEYS, useParams, useFlag } from 'common' import { CreateBranchModal } from 'components/interfaces/BranchManagement/CreateBranchModal' import ProjectAPIDocs from 'components/interfaces/ProjectAPIDocs/ProjectAPIDocs' import { AIAssistant } from 'components/ui/AIAssistantPanel/AIAssistant' @@ -318,11 +318,13 @@ const ContentWrapper = ({ isLoading, isBlocking = true, children }: ContentWrapp const { ref } = useParams() const state = useDatabaseSelectorStateSnapshot() const { data: selectedProject } = useSelectedProjectQuery() + const isHomeNewFlag = useFlag('homeNew') const isBranchesPage = router.pathname.includes('/project/[ref]/branches') const isSettingsPages = router.pathname.includes('/project/[ref]/settings') const isVaultPage = router.pathname === '/project/[ref]/settings/vault' const isBackupsPage = router.pathname.includes('/project/[ref]/database/backups') + const isHomePage = router.pathname === '/project/[ref]' const requiresDbConnection: boolean = (!isSettingsPages && !routesToIgnoreDBConnection.includes(router.pathname)) || isVaultPage @@ -343,6 +345,20 @@ const ContentWrapper = ({ isLoading, isBlocking = true, children }: ContentWrapp const isProjectPauseFailed = selectedProject?.status === PROJECT_STATUS.PAUSE_FAILED const isProjectOffline = selectedProject?.postgrestStatus === 'OFFLINE' + // handle redirect to home for building state + const shouldRedirectToHomeForBuilding = + isHomeNewFlag && requiresDbConnection && isProjectBuilding && !isBranchesPage && !isHomePage + + // We won't be showing the building state with the new home page + const shouldShowBuildingState = + requiresDbConnection && isProjectBuilding && !isBranchesPage && !(isHomeNewFlag && isHomePage) + + useEffect(() => { + if (shouldRedirectToHomeForBuilding && ref) { + router.replace(`/project/${ref}`) + } + }, [shouldRedirectToHomeForBuilding, ref, router]) + useEffect(() => { if (ref) state.setSelectedDatabaseId(ref) }, [ref]) @@ -383,7 +399,11 @@ const ContentWrapper = ({ isLoading, isBlocking = true, children }: ContentWrapp return } - if (requiresDbConnection && isProjectBuilding && !isBranchesPage) { + if (shouldRedirectToHomeForBuilding) { + return + } + + if (shouldShowBuildingState) { return } diff --git a/apps/studio/data/reports/v2/auth-report.test.tsx b/apps/studio/data/reports/v2/auth-report.test.tsx index 198b1ce902af1..3a80edf758303 100644 --- a/apps/studio/data/reports/v2/auth-report.test.tsx +++ b/apps/studio/data/reports/v2/auth-report.test.tsx @@ -8,7 +8,7 @@ describe('defaultAuthReportFormatter', () => { const data = { result: [{ timestamp: String(timestamp), count: 1 }] } const attributes = [ - { attribute: 'ActiveUsers', provider: 'logs', label: 'Active Users', enabled: true }, + { attribute: 'ActiveUsers', provider: 'logs', label: 'Auth Activity', enabled: true }, ] const result = defaultAuthReportFormatter(data, attributes) @@ -28,7 +28,7 @@ describe('defaultAuthReportFormatter', () => { } const attributes = [ - { attribute: 'active_users', label: 'Active Users' }, + { attribute: 'active_users', label: 'Auth Activity' }, { attribute: 'sign_in_attempts', label: 'Sign In Attempts' }, ] @@ -47,7 +47,7 @@ describe('defaultAuthReportFormatter', () => { const data = { result: [] } const attributes = [ - { attribute: 'ActiveUsers', provider: 'logs', label: 'Active Users', enabled: true }, + { attribute: 'ActiveUsers', provider: 'logs', label: 'Auth Activity', enabled: true }, ] const result = defaultAuthReportFormatter(data, attributes) diff --git a/apps/studio/data/reports/v2/auth.config.ts b/apps/studio/data/reports/v2/auth.config.ts index 0c5b3b9b047ae..69e9ab74777f6 100644 --- a/apps/studio/data/reports/v2/auth.config.ts +++ b/apps/studio/data/reports/v2/auth.config.ts @@ -513,7 +513,7 @@ export const createUsageReportConfig = ({ return [ { id: 'active-user', - label: 'Active Users', + label: 'Auth Activity', // https://supabase.slack.com/archives/C08N7894QTG/p1761210058358439?thread_ts=1761147906.491599&cid=C08N7894QTG valuePrecision: 0, hide: false, showTooltip: true, @@ -521,11 +521,12 @@ export const createUsageReportConfig = ({ showMaxValue: false, hideChartType: false, defaultChartStyle: 'line', - titleTooltip: 'The total number of active users over time.', + titleTooltip: + "Users who generated any Auth event in this period. This metric tracks authentication activity, not total product usage. Some active users won't appear here if their session stayed valid.", availableIn: ['free', 'pro', 'team', 'enterprise'], dataProvider: async () => { const attributes = [ - { attribute: 'ActiveUsers', provider: 'logs', label: 'Active Users', enabled: true }, + { attribute: 'ActiveUsers', provider: 'logs', label: 'Auth Activity', enabled: true }, ] const sql = AUTH_REPORT_SQL.ActiveUsers(interval, filters) diff --git a/apps/studio/next.config.js b/apps/studio/next.config.js index f9f9e9e3c1f0e..051184142f11d 100644 --- a/apps/studio/next.config.js +++ b/apps/studio/next.config.js @@ -307,6 +307,11 @@ const nextConfig = { source: '/project/:ref/query-performance', destination: '/project/:ref/reports/query-performance', }, + { + permanent: true, + source: '/project/:ref/advisors/query-performance', + destination: '/project/:ref/reports/query-performance', + }, { permanent: true, source: '/project/:ref/database/query-performance', diff --git a/apps/studio/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsx index ccfdc593341f1..d0448411dbdfb 100644 --- a/apps/studio/pages/new/[slug].tsx +++ b/apps/studio/pages/new/[slug].tsx @@ -91,6 +91,8 @@ import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import { InfoTooltip } from 'ui-patterns/info-tooltip' +// [Joshen] This page is getting rather big and complex, let's aim to break this down into smaller components + const sizes: DesiredInstanceSize[] = ['micro', 'small', 'medium'] const sizesWithNoCostConfirmationRequired: DesiredInstanceSize[] = ['micro', 'small'] @@ -146,6 +148,7 @@ const Wizard: NextPageWithLayout = () => { const projectCreationDisabled = useFlag('disableProjectCreationAndUpdate') const showPostgresVersionSelector = useFlag('showPostgresVersionSelector') const cloudProviderEnabled = useFlag('enableFlyCloudProvider') + const isHomeNew = useFlag('homeNew') const showAdvancedConfig = useIsFeatureEnabled('project_creation:show_advanced_config') const { infraCloudProviders: validCloudProviders } = useCustomContent(['infra:cloud_providers']) @@ -254,7 +257,7 @@ const Wizard: NextPageWithLayout = () => { organization: res.organization_slug, }, }) - router.push(`/project/${res.ref}/building`) + router.push(isHomeNew ? `/project/${res.ref}` : `/project/${res.ref}/building`) }, }) @@ -284,7 +287,7 @@ const Wizard: NextPageWithLayout = () => { useOrganizationAvailableRegionsQuery( { slug: slug, - cloudProvider: PROVIDERS[defaultProvider].id, + cloudProvider: PROVIDERS[cloudProvider as CloudProvider].id, desiredInstanceSize: instanceSize as DesiredInstanceSize, }, { @@ -295,6 +298,9 @@ const Wizard: NextPageWithLayout = () => { refetchOnReconnect: false, } ) + const recommendedSmartRegion = smartRegionEnabled + ? availableRegionsData?.recommendations.smartGroup.name + : undefined const regionError = smartRegionEnabled && defaultProvider !== 'AWS_NIMBUS' ? availableRegionsError @@ -473,6 +479,12 @@ const Wizard: NextPageWithLayout = () => { } }, [regionError]) + useEffect(() => { + if (recommendedSmartRegion) { + form.setValue('dbRegion', recommendedSmartRegion) + } + }, [recommendedSmartRegion]) + useEffect(() => { if (watchedInstanceSize !== instanceSize) { form.setValue('instanceSize', instanceSize, { diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts index 1fd3fd3a196aa..1dd23516f7797 100644 --- a/packages/api-types/types/platform.d.ts +++ b/packages/api-types/types/platform.d.ts @@ -4679,6 +4679,7 @@ export interface components { CloudMarketplaceOnboardingInfoResponse: { aws_contract_auto_renewal: boolean aws_contract_end_date: string + aws_contract_is_private_offer: boolean aws_contract_settings_url: string aws_contract_start_date: string organization_linking_eligibility: { diff --git a/supabase/migrations/20251023193135_anon_read_access_troubleshooting.sql b/supabase/migrations/20251023193135_anon_read_access_troubleshooting.sql new file mode 100644 index 0000000000000..9ba0cb7d1e29d --- /dev/null +++ b/supabase/migrations/20251023193135_anon_read_access_troubleshooting.sql @@ -0,0 +1,14 @@ +-- Give anon and authenticated read access to the troubleshooting entries table +-- Allows troubleshooting entries to be generated in local dev + +create policy anon_read_troubleshooting_entries +on public.troubleshooting_entries +for select +to anon +using (true); + +create policy authenticated_read_troubleshooting_entries +on public.troubleshooting_entries +for select +to authenticated +using (true);