Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"sharp": "0.32.6",
"tailwind-merge": "^1.13.2",
"tsx": "^4.19.3",
"typescript": "~5.5.0"
"typescript": "catalog:"
},
"externals": {
"sharp": "commonjs sharp"
Expand Down
2 changes: 1 addition & 1 deletion apps/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"tailwindcss": "catalog:",
"tsconfig": "workspace:*",
"tsx": "^4.19.3",
"typescript": "~5.5.0",
"typescript": "catalog:",
"unist-builder": "3.0.0"
}
}
4 changes: 2 additions & 2 deletions apps/docs/app/api/crawlers/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function htmlShell(
body: string
) {
const libraryName = REFERENCES[lib].name
let title = libraryName + ': ' + section.title ?? ''
let title = libraryName + ': ' + (section.title ?? '')

return (
'<!doctype html><html>' +
Expand Down Expand Up @@ -106,7 +106,7 @@ function libraryNav(sections: Array<AbbrevApiReferenceSection & { url: URL }>) {

async function sectionDetails(lib: string, version: string, section: AbbrevApiReferenceSection) {
const libraryName = REFERENCES[lib].name
let result = '<h1>' + (libraryName + ': ' + section.title ?? '') + '</h1>'
let result = '<h1>' + (libraryName + ': ' + (section.title ?? '')) + '</h1>'

if (section.type === 'markdown') {
result += await markdown(lib, version, section)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Link from 'next/link'

import { ChevronLeft } from 'lucide-react'
import { BASE_PATH } from '~/lib/constants'
import clientLibsCommon from '~/spec/common-cli.yml' with { type: 'yml' }
import * as NavItems from './NavigationMenu.constants'
import { ChevronLeft } from 'lucide-react'

const NavigationMenuCliList = ({ currentLevel, setLevel, id }) => {
const menu = NavItems[id]
Expand Down Expand Up @@ -111,7 +111,7 @@ const NavigationMenuCliList = ({ currentLevel, setLevel, id }) => {
</Link>
<div className="flex items-center gap-3 my-3">
<img
src={`${BASE_PATH}` + menu.icon ?? `/img/icons/menu/${id}.svg`}
src={`${BASE_PATH}` + (menu.icon ?? `/img/icons/menu/${id}.svg`)}
className="w-5 rounded"
/>

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"tsconfig": "workspace:*",
"tsx": "^4.19.3",
"twoslash": "^0.3.1",
"typescript": "~5.5.0",
"typescript": "catalog:",
"unist-util-visit-parents": "5.1.3",
"vite": "catalog:",
"vite-tsconfig-paths": "^4.3.2",
Expand Down
30 changes: 28 additions & 2 deletions apps/docs/spec/cli_v1_commands.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
clispec: '001'
info:
id: cli
version: 2.40.7
version: 2.45.5
title: Supabase CLI
language: sh
source: https://github.com/supabase/cli
Expand Down Expand Up @@ -78,7 +78,7 @@ flags:
name: --workdir <string>
description: path to a Supabase project directory
default_value: ''
- id: 'yes'
- id: "yes"
name: --yes
description: answer yes to all prompts
default_value: 'false'
Expand Down Expand Up @@ -2253,6 +2253,7 @@ commands:
- local-dev
links: []
subcommands:
- supabase-gen-bearer-jwt
- supabase-gen-signing-key
- supabase-gen-types
flags: []
Expand Down Expand Up @@ -2346,6 +2347,31 @@ commands:
name: --append
description: Append new key to existing keys file instead of overwriting.
default_value: 'false'
- id: supabase-gen-bearer-jwt
title: supabase gen bearer-jwt
summary: Generate a Bearer Auth JWT for accessing Data API
tags: []
links: []
usage: supabase gen bearer-jwt [flags]
subcommands: []
flags:
- id: exp
name: --exp <time>
description: Expiry timestamp for this token.
default_value: ''
- id: role
name: --role <string>
description: Postgres role to use.
required: true
default_value: ''
- id: sub
name: --sub <string>
description: User ID to impersonate.
default_value: anonymous
- id: valid-for
name: --valid-for <duration>
description: Validity duration for this token.
default_value: 30m0s
- id: supabase-functions
title: supabase functions
summary: Manage Supabase Edge functions
Expand Down
12 changes: 12 additions & 0 deletions apps/studio/components/interfaces/HomeNew/ActivityStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export const ActivityStats = () => {
href={`/project/${ref}/database/migrations`}
icon={<Database size={18} strokeWidth={1.5} className="text-foreground" />}
label={<span>Last migration</span>}
trackingProperties={{
stat_type: 'migrations',
stat_value: migrationsData?.length ?? 0,
}}
value={
isLoadingMigrations ? (
<Skeleton className="h-6 w-24" />
Expand All @@ -81,6 +85,10 @@ export const ActivityStats = () => {
href={`/project/${ref}/database/backups/scheduled`}
icon={<Archive size={18} strokeWidth={1.5} className="text-foreground" />}
label={<span>Last backup</span>}
trackingProperties={{
stat_type: 'backups',
stat_value: backupsData?.backups?.length ?? 0,
}}
value={
isLoadingBackups ? (
<Skeleton className="h-6 w-24" />
Expand All @@ -103,6 +111,10 @@ export const ActivityStats = () => {
href={`/project/${ref}/branches`}
icon={<GitBranch size={18} strokeWidth={1.5} className="text-foreground" />}
label={<span>{isDefaultProject ? 'Recent branch' : 'Branch Created'}</span>}
trackingProperties={{
stat_type: 'branches',
stat_value: branchesData?.length ?? 0,
}}
value={
isLoadingBranches ? (
<Skeleton className="h-6 w-24" />
Expand Down
54 changes: 50 additions & 4 deletions apps/studio/components/interfaces/HomeNew/AdvisorSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
} from 'components/interfaces/Linter/Linter.utils'
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
import { Lint, useProjectLintsQuery } from 'data/lint/lint-query'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
import {
AiIconAnimation,
Expand All @@ -32,6 +34,8 @@ export const AdvisorSection = () => {
const { ref: projectRef } = useParams()
const { data: lints, isLoading: isLoadingLints } = useProjectLintsQuery({ projectRef })
const snap = useAiAssistantStateSnapshot()
const { mutate: sendEvent } = useSendEventMutation()
const { data: organization } = useSelectedOrganizationQuery()

const [selectedLint, setSelectedLint] = useState<Lint | null>(null)

Expand All @@ -54,11 +58,40 @@ export const AdvisorSection = () => {

const handleAskAssistant = useCallback(() => {
snap.toggleAssistant()
}, [snap])
if (projectRef && organization?.slug) {
sendEvent({
action: 'home_advisor_ask_assistant_clicked',
properties: {
issues_count: totalErrors,
},
groups: {
project: projectRef,
organization: organization.slug,
},
})
}
}, [snap, sendEvent, projectRef, organization, totalErrors])

const handleCardClick = useCallback((lint: Lint) => {
setSelectedLint(lint)
}, [])
const handleCardClick = useCallback(
(lint: Lint) => {
setSelectedLint(lint)
if (projectRef && organization?.slug) {
sendEvent({
action: 'home_advisor_issue_card_clicked',
properties: {
issue_category: lint.categories[0] || 'UNKNOWN',
issue_name: lint.name,
issues_count: totalErrors,
},
groups: {
project: projectRef,
organization: organization.slug,
},
})
}
},
[sendEvent, projectRef, organization]
)

return (
<div>
Expand Down Expand Up @@ -111,6 +144,19 @@ export const AdvisorSection = () => {
open: true,
initialInput: createLintSummaryPrompt(lint),
})
if (projectRef && organization?.slug) {
sendEvent({
action: 'home_advisor_fix_issue_clicked',
properties: {
issue_category: lint.categories[0] || 'UNKNOWN',
issue_name: lint.name,
},
groups: {
project: projectRef,
organization: organization.slug,
},
})
}
}}
tooltip={{
content: { side: 'bottom', text: 'Help me fix this issue' },
Expand Down
48 changes: 48 additions & 0 deletions apps/studio/components/interfaces/HomeNew/CustomReportSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import { AnalyticsInterval } from 'data/analytics/constants'
import { useContentInfiniteQuery } from 'data/content/content-infinite-query'
import { Content } from 'data/content/content-query'
import { useContentUpsertMutation } from 'data/content/content-upsert-mutation'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { uuidv4 } from 'lib/helpers'
import { useProfile } from 'lib/profile'
import type { Dashboards } from 'types'
Expand All @@ -35,6 +37,8 @@ export function CustomReportSection() {
const endDate = dayjs().toISOString()
const { ref } = useParams()
const { profile } = useProfile()
const { mutate: sendEvent } = useSendEventMutation()
const { data: organization } = useSelectedOrganizationQuery()

const { data: reportsData } = useContentInfiniteQuery(
{ projectRef: ref, type: 'report', name: 'Home', limit: 1 },
Expand Down Expand Up @@ -185,6 +189,20 @@ export function CustomReportSection() {
content: newReport,
},
})

if (ref && organization?.slug) {
sendEvent({
action: 'home_custom_report_block_added',
properties: {
block_id: snippet.id,
position: 0,
},
groups: {
project: ref,
organization: organization.slug,
},
})
}
return
}
const current = [...editableReport.layout]
Expand All @@ -193,16 +211,46 @@ export function CustomReportSection() {
const updated = { ...editableReport, layout: current }
setEditableReport(updated)
persistReport(updated)

if (ref && organization?.slug) {
sendEvent({
action: 'home_custom_report_block_added',
properties: {
block_id: snippet.id,
position: current.length - 1,
},
groups: {
project: ref,
organization: organization.slug,
},
})
}
}

const handleRemoveChart = ({ metric }: { metric: { key: string } }) => {
if (!editableReport) return
const removedChart = editableReport.layout.find(
(x) => x.attribute === (metric.key as unknown as Dashboards.Chart['attribute'])
)
const nextLayout = editableReport.layout.filter(
(x) => x.attribute !== (metric.key as unknown as Dashboards.Chart['attribute'])
)
const updated = { ...editableReport, layout: nextLayout }
setEditableReport(updated)
persistReport(updated)

if (ref && organization?.slug && removedChart) {
sendEvent({
action: 'home_custom_report_block_removed',
properties: {
block_id: String(removedChart.id),
},
groups: {
project: ref,
organization: organization.slug,
},
})
}
}

const handleUpdateChart = (
Expand Down
Loading
Loading