From e38f55530b975a976ed83661c13ee2d7acb26549 Mon Sep 17 00:00:00 2001 From: Jordi Enric <37541088+jordienr@users.noreply.github.com> Date: Thu, 23 Oct 2025 13:02:33 +0200 Subject: [PATCH 01/11] add redirect to query performance (#39800) fix --- apps/studio/next.config.js | 5 +++++ 1 file changed, 5 insertions(+) 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', From f1ca06f2ea022ae8bb2ae45db2dcb043345a8139 Mon Sep 17 00:00:00 2001 From: Thomas <31189692+ecktoteckto@users.noreply.github.com> Date: Thu, 23 Oct 2025 13:33:47 +0200 Subject: [PATCH 02/11] fix(billing): do not show auto-renewal banner on aws marketplace onboarding page for private offers --- .../AwsMarketplaceCreateNewOrg.tsx | 21 ++++++++++++------- .../AwsMarketplaceLinkExistingOrg.tsx | 21 ++++++++++++------- packages/api-types/types/platform.d.ts | 1 + 3 files changed, 27 insertions(+), 16 deletions(-) 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/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: { From ec53ba827b58a923d56f7179439c795adb6fb9c8 Mon Sep 17 00:00:00 2001 From: "kemal.earth" <606977+kemaldotearth@users.noreply.github.com> Date: Thu, 23 Oct 2025 13:12:36 +0100 Subject: [PATCH 03/11] fix(studio): cache hit rate on query perf with pg_stat_statements (#39804) fix: cache hit rate on query perf with pg_stat_statements On the old table the number wasnt rendering due to it being a string. Added a guard. --- .../interfaces/QueryPerformance/QueryPerformanceGrid.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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, })} From de6bf4f036f7f6bc86a6820f5453c89582b3cc26 Mon Sep 17 00:00:00 2001 From: hallidayo <22655069+Hallidayo@users.noreply.github.com> Date: Thu, 23 Oct 2025 13:35:39 +0100 Subject: [PATCH 04/11] docs: nextjs auth based cookie link (#39655) next js cookie auth links --- apps/docs/content/guides/auth/quickstarts/nextjs.mdx | 2 +- apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/) From 37500328a214a0972ccd0fdccb26f79f7d968704 Mon Sep 17 00:00:00 2001 From: Jordi Enric <37541088+jordienr@users.noreply.github.com> Date: Thu, 23 Oct 2025 15:22:06 +0200 Subject: [PATCH 05/11] Rename Active Users to Auth Activity (#39805) rename active users to auth activity --- .../Auth/Overview/OverviewUsage.tsx | 33 ++++++++++++++++--- .../data/reports/v2/auth-report.test.tsx | 6 ++-- apps/studio/data/reports/v2/auth.config.ts | 7 ++-- 3 files changed, 36 insertions(+), 10 deletions(-) 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}

+ + + )} + {
{ 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) From f1e4970352af9db32cbb8155c52da901ce03e8de Mon Sep 17 00:00:00 2001 From: Charis <26616127+charislam@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:24:23 -0400 Subject: [PATCH 06/11] db: allow public read access to troubleshooting entries table (#33172) * db: allow public read access to troubleshooting entries table * chore: allow troubleshooting generation from public client --- apps/docs/features/docs/Troubleshooting.utils.ts | 16 +++++----------- apps/docs/lib/supabase.ts | 1 + ...23193135_anon_read_access_troubleshooting.sql | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 supabase/migrations/20251023193135_anon_read_access_troubleshooting.sql 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/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); From c44220c09648ccafb650e27ea49f41050498a53a Mon Sep 17 00:00:00 2001 From: Jordi Enric <37541088+jordienr@users.noreply.github.com> Date: Thu, 23 Oct 2025 15:25:43 +0200 Subject: [PATCH 07/11] add coming up state to new project home DESIGN-300 (#39680) * add coming up state to new project home * handle redirect correctly * tweak spinner/laben logic * show empty state in advisor whiel coming up * prevent query while advisor is forcing empty state * fix enabled * rm state dep * move complex bool to variable --- .../interfaces/HomeNew/AdvisorSection.tsx | 37 ++++++++---- .../components/interfaces/HomeNew/Home.tsx | 25 ++++++--- .../interfaces/HomeNew/ServiceStatus.tsx | 56 +++++++++++-------- .../layouts/ProjectLayout/ProjectLayout.tsx | 24 +++++++- apps/studio/pages/new/[slug].tsx | 3 +- 5 files changed, 99 insertions(+), 46 deletions(-) diff --git a/apps/studio/components/interfaces/HomeNew/AdvisorSection.tsx b/apps/studio/components/interfaces/HomeNew/AdvisorSection.tsx index 8d2e466e4b091..d5d302a7cdcd7 100644 --- a/apps/studio/components/interfaces/HomeNew/AdvisorSection.tsx +++ b/apps/studio/components/interfaces/HomeNew/AdvisorSection.tsx @@ -30,9 +30,16 @@ import { import { Row } from 'ui-patterns' import ShimmeringLoader from 'ui-patterns/ShimmeringLoader' -export const AdvisorSection = () => { +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/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/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsx index ccfdc593341f1..f1da887ef0a2d 100644 --- a/apps/studio/pages/new/[slug].tsx +++ b/apps/studio/pages/new/[slug].tsx @@ -146,6 +146,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 +255,7 @@ const Wizard: NextPageWithLayout = () => { organization: res.organization_slug, }, }) - router.push(`/project/${res.ref}/building`) + router.push(isHomeNew ? `/project/${res.ref}` : `/project/${res.ref}/building`) }, }) From 7f7cea24d80afb59f5551e0247530a89701cfd9d Mon Sep 17 00:00:00 2001 From: Chris Chinchilla Date: Thu, 23 Oct 2025 15:32:32 +0200 Subject: [PATCH 08/11] docs: Correct code path in SvelteKit getting started (#39806) Correct code path in SvelteKit getting started --- .../guides/getting-started/tutorials/with-sveltekit.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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! From bbf93f0c2fa4c5b8e000c59c9f59107081c1bff5 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Thu, 23 Oct 2025 22:15:28 +0800 Subject: [PATCH 09/11] Fix region empty after selecting cloud provider (#39797) --- apps/studio/pages/new/[slug].tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/studio/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsx index f1da887ef0a2d..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'] @@ -285,7 +287,7 @@ const Wizard: NextPageWithLayout = () => { useOrganizationAvailableRegionsQuery( { slug: slug, - cloudProvider: PROVIDERS[defaultProvider].id, + cloudProvider: PROVIDERS[cloudProvider as CloudProvider].id, desiredInstanceSize: instanceSize as DesiredInstanceSize, }, { @@ -296,6 +298,9 @@ const Wizard: NextPageWithLayout = () => { refetchOnReconnect: false, } ) + const recommendedSmartRegion = smartRegionEnabled + ? availableRegionsData?.recommendations.smartGroup.name + : undefined const regionError = smartRegionEnabled && defaultProvider !== 'AWS_NIMBUS' ? availableRegionsError @@ -474,6 +479,12 @@ const Wizard: NextPageWithLayout = () => { } }, [regionError]) + useEffect(() => { + if (recommendedSmartRegion) { + form.setValue('dbRegion', recommendedSmartRegion) + } + }, [recommendedSmartRegion]) + useEffect(() => { if (watchedInstanceSize !== instanceSize) { form.setValue('instanceSize', instanceSize, { From e5beda1b0ea84e2f9959a6fe8d29b854e6d7ea34 Mon Sep 17 00:00:00 2001 From: "kemal.earth" <606977+kemaldotearth@users.noreply.github.com> Date: Thu, 23 Oct 2025 16:48:49 +0100 Subject: [PATCH 10/11] fix(studio): auth overview table arrow styling (#39810) * fix: align arrows to end always * chore: remove dummy data --- .../interfaces/Auth/Overview/OverviewMonitoring.tsx | 4 ++-- .../components/interfaces/Auth/Overview/OverviewTable.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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]} ))} From 3b8b20b038fdf9969afd09c74a606ae21d0c4be6 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Thu, 23 Oct 2025 13:04:44 -0300 Subject: [PATCH 11/11] docs: fix updateUser method call in auth-anonymous guide (#39811) * docs: fix updateUser method call in auth-anonymous guide * Update auth-anonymous.mdx --- apps/docs/content/guides/auth/auth-anonymous.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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") ) ```