The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(studio): split cron_job_cleanup dialog-open from enable to stop double-counting (#48348)
claude[bot]4893c396db50
diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.EnableCleanupButton.tsx b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.EnableCleanupButton.tsxindex ab36c741524..68a631a6a8c 100644--- a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.EnableCleanupButton.tsx+++ b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.EnableCleanupButton.tsx@@ -67,7 +67,6 @@ export const EnableCleanupButton = ({ onScheduled }: EnableCleanupButtonProps) =return toast.error('There was an error scheduling the cleanup. Please try again.')}track('cron_job_cleanup_enable_button_clicked', {- origin: 'dialog',retentionInterval: cleanupInterval,})scheduleCleanup({@@ -82,7 +81,7 @@ export const EnableCleanupButton = ({ onScheduled }: EnableCleanupButtonProps) =open={open}onOpenChange={(isOpen) => {setOpen(isOpen)- if (isOpen) track('cron_job_cleanup_enable_button_clicked', { origin: 'header' })+ if (isOpen) track('cron_job_cleanup_dialog_opened')}}><DialogTrigger asChild>diff --git a/packages/common/telemetry-constants.ts b/packages/common/telemetry-constants.tsindex f959ec01e51..937d4804e91 100644--- a/packages/common/telemetry-constants.ts+++ b/packages/common/telemetry-constants.ts@@ -235,9 +235,23 @@ export interface CronJobHistoryClickedEvent {}/**- * Enable cleanup button clicked, either in the cron jobs page header (opens the- * confirmation dialog) or within the dialog itself (schedules the daily cleanup- * job that deletes old rows from cron.job_run_details).+ * Fired when the user clicks the header 'Enable cleanup' button to open the+ * confirmation dialog.+ *+ * @group Events+ * @source studio+ * @page /dashboard/project/{ref}/integrations/cron/jobs+ */+export interface CronJobCleanupDialogOpenedEvent {+ action: 'cron_job_cleanup_dialog_opened'+ groups: TelemetryGroups+}++/**+ * Fired when the user confirms the cleanup dialog, initiating the request to+ * schedule the daily cleanup job (deletes old rows from cron.job_run_details).+ * Emitted on confirm, before the scheduling request resolves, so it does not+ * indicate the job was scheduled successfully.** @group Events* @source studio@@ -246,9 +260,7 @@ export interface CronJobHistoryClickedEvent {export interface CronJobCleanupEnableButtonClickedEvent {action: 'cron_job_cleanup_enable_button_clicked'properties: {- /** Where the button was clicked from */- origin: 'header' | 'dialog'- /** Retention period chosen for the cleanup job, e.g. 7 days. Only sent on dialog confirm. */+ /** Retention period chosen for the cleanup job, e.g. 7 days. */retentionInterval?: string}groups: TelemetryGroups@@ -3573,6 +3585,7 @@ export type TelemetryEvent =| CronJobUpdateClickedEvent| CronJobDeleteClickedEvent| CronJobHistoryClickedEvent+ | CronJobCleanupDialogOpenedEvent| CronJobCleanupEnableButtonClickedEvent| FeaturePreviewEnabledEvent| FeaturePreviewDisabledEvent