fix(studio): correct projectRef gate and isMatureProject UTC parse

useOnboardingSurveyPrompt: shouldShowPrompt required !!projectRef for all
surfaces, which would always be false during org creation (no project
selected). Gate is now only applied to project_home, where it's meaningful.

Home.tsx: isMatureProject was parsing inserted_at in local time while
isRecentlyCreatedProject (directly below) explicitly uses dayjs.utc().
Both now use UTC for consistency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Danny WhiteandClaude Sonnet 4.6 committed 2026-05-22 18:27:15 +10:00
1 parent 81bc1ebf1c
commit 10e2443df7
2 files changed
+2 -2

No files matched your search

@@ -83,7 +83,7 @@ export function useOnboardingSurveyPrompt({ surface }: { surface: OnboardingSurv
const shouldShowPrompt =
isPromptStateLoaded &&
!!orgSlug &&
!!projectRef &&
(surface !== 'project_home' || !!projectRef) &&
!!profileId &&
promptState === null &&
variantMatchesSurface(variant, surface)
@@ -31,7 +31,7 @@ export const ProjectHome = () => {
const showHomepageUsageV2 = useFlag('newHomepageUsageV2')
const isMatureProject = dayjs(project?.inserted_at).isBefore(dayjs().subtract(10, 'day'))
const isMatureProject = dayjs.utc(project?.inserted_at).isBefore(dayjs.utc().subtract(10, 'day'))
const hasShownEnableBranchingModalRef = useRef(false)
const isPaused = project?.status === PROJECT_STATUS.INACTIVE