Skip to content
Open
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
1 change: 1 addition & 0 deletions .sqlfluff
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[sqlfluff]
dialect = postgres
large_file_skip_byte_limit = 0
11 changes: 11 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
"action-app-initialization-failure": "App startup failed",
"action-app-killed-excessive-resource-usage": "Killed for excessive resource usage",
"action-app-killed-low-memory": "Killed by low memory",
"action-app-launch-ready": "App launch ready",
"action-app-launch-start": "App launch started",
"action-app-launch-timeout": "App launch timed out",
"action-app-memory-warning": "iOS memory warning",
"action-app-moved-to-background": "App moved to background",
"action-app-moved-to-foreground": "App moved to foreground",
Expand All @@ -77,6 +80,7 @@
"action-canonical-path-fail": "Canonical path validation failed",
"action-channel-misconfigured": "Channel configuration error",
"action-checksum-fail": "Checksum validation failed",
"action-checksum-required": "Checksum required",
"action-decrypt-fail": "Bundle decryption failed",
"action-delete": "Version deletion requested",
"action-directory-path-fail": "Directory path validation failed",
Expand Down Expand Up @@ -112,27 +116,34 @@
"action-download-manifest-start": "Manifest download started",
"action-download-zip-complete": "Zip bundle download completed",
"action-download-zip-start": "Zip bundle download started",
"action-finish-download-fail": "Finishing download failed",
"action-get": "New version sent to device",
"action-get-channel": "Channel info retrieved",
"action-invalid-ip": "Request from invalid IP",
"action-key-mismatch": "Signing key mismatch",
"action-insufficient-disk-space": "Insufficient disk space",
"action-low-mem-fail": "Insufficient memory for update",
"action-manifest-path-fail": "Manifest path validation failed",
"action-missing-bundle": "Bundle unavailable for version",
"action-need-plan-upgrade": "Blocked - plan upgrade required",
"action-no-channel-or-override": "No channel or override configured",
"action-no-new": "Already has latest version",
"action-ping": "Device heartbeat",
"action-rate-limited": "Request rate limited",
"action-rate-limit-reached": "Plugin rate limit reached",
"action-reset": "Reset to default version",
"action-set": "Version installed successfully",
"action-set-channel": "Channel set/changed",
"action-set-fail": "Version installation failed",
"action-set-next": "Next version selected",
"action-uninstall": "Previous version uninstalled",
"action-unzip-fail": "Bundle unzip failed",
"action-update-fail": "Update process failed",
"action-custom-id-blocked": "Custom ID blocked",
"action-webview-content-process-terminated": "WebView content process terminated",
"action-webview-dom-content-loaded": "WebView DOM content loaded",
"action-webview-javascript-error": "WebView JavaScript error",
"action-webview-page-loaded": "WebView page loaded",
"action-webview-render-process-gone": "WebView renderer exited",
"action-webview-resource-error": "WebView resource load failed",
"action-webview-security-policy-violation": "WebView security policy violation",
Expand Down
11 changes: 11 additions & 0 deletions src/services/statsActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ export const statsActionFilters = [
['action-download-manifest-file-fail', 'download_manifest_file_fail'],
['action-download-manifest-checksum-fail', 'download_manifest_checksum_fail'],
['action-download-manifest-brotli-fail', 'download_manifest_brotli_fail'],
['action-finish-download-fail', 'finish_download_fail'],
['action-manifest-path-fail', 'manifest_path_fail'],
['action-decrypt-fail', 'decrypt_fail'],
['action-checksum-required', 'checksum_required'],
['action-insufficient-disk-space', 'insufficient_disk_space'],
['action-app-moved-to-foreground', 'app_moved_to_foreground'],
['action-app-moved-to-background', 'app_moved_to_background'],
['action-app-launch-start', 'app_launch_start'],
['action-app-launch-ready', 'app_launch_ready'],
['action-app-launch-timeout', 'app_launch_timeout'],
['action-app-crash', 'app_crash'],
['action-app-crash-native', 'app_crash_native'],
['action-app-anr', 'app_anr'],
Expand All @@ -47,6 +54,8 @@ export const statsActionFilters = [
['action-webview-unclean-restart', 'webview_unclean_restart'],
['action-webview-render-process-gone', 'webview_render_process_gone'],
['action-webview-content-process-terminated', 'webview_content_process_terminated'],
['action-webview-dom-content-loaded', 'webview_dom_content_loaded'],
['action-webview-page-loaded', 'webview_page_loaded'],
['action-uninstall', 'uninstall'],
['action-need-plan-upgrade', 'needPlanUpgrade'],
['action-missing-bundle', 'missingBundle'],
Expand All @@ -72,11 +81,13 @@ export const statsActionFilters = [
['action-set-channel', 'setChannel'],
['action-get-channel', 'getChannel'],
['action-rate-limited', 'rateLimited'],
['action-rate-limit-reached', 'rate_limit_reached'],
['action-disable-auto-update', 'disableAutoUpdate'],
['action-invalid-ip', 'InvalidIp'],
['action-blocked-by-server-url', 'blocked_by_server_url'],
['action-backend-refusal', 'backend_refusal'],
['action-custom-id-blocked', 'customIdBlocked'],
['action-set-next', 'set_next'],
] as const

export const filterToAction: Record<string, string> = Object.fromEntries(statsActionFilters)
Expand Down
22 changes: 22 additions & 0 deletions src/types/supabase.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4729,8 +4729,15 @@ export type Database = {
| "download_manifest_file_fail"
| "download_manifest_checksum_fail"
| "download_manifest_brotli_fail"
| "finish_download_fail"
| "manifest_path_fail"
| "backend_refusal"
| "download_0"
| "checksum_required"
| "insufficient_disk_space"
| "app_launch_start"
| "app_launch_ready"
| "app_launch_timeout"
| "disableProdBuild"
| "disableDevice"
| "disablePlatformElectron"
Expand All @@ -4749,6 +4756,10 @@ export type Database = {
| "webview_unclean_restart"
| "webview_render_process_gone"
| "webview_content_process_terminated"
| "webview_dom_content_loaded"
| "webview_page_loaded"
| "rate_limit_reached"
| "set_next"
stripe_status:
| "created"
| "succeeded"
Expand Down Expand Up @@ -4998,8 +5009,15 @@ export const Constants = {
"download_manifest_file_fail",
"download_manifest_checksum_fail",
"download_manifest_brotli_fail",
"finish_download_fail",
"manifest_path_fail",
"backend_refusal",
"download_0",
"checksum_required",
"insufficient_disk_space",
"app_launch_start",
"app_launch_ready",
"app_launch_timeout",
"disableProdBuild",
"disableDevice",
"disablePlatformElectron",
Expand All @@ -5018,6 +5036,10 @@ export const Constants = {
"webview_unclean_restart",
"webview_render_process_gone",
"webview_content_process_terminated",
"webview_dom_content_loaded",
"webview_page_loaded",
"rate_limit_reached",
"set_next",
],
stripe_status: [
"created",
Expand Down
11 changes: 11 additions & 0 deletions supabase/functions/_backend/plugins/stats_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,16 @@ export const ALLOWED_STATS_ACTIONS = [
'download_manifest_file_fail',
'download_manifest_checksum_fail',
'download_manifest_brotli_fail',
'finish_download_fail',
'manifest_path_fail',
'decrypt_fail',
'checksum_required',
'insufficient_disk_space',
'app_moved_to_foreground',
'app_moved_to_background',
'app_launch_start',
'app_launch_ready',
'app_launch_timeout',
'uninstall',
'needPlanUpgrade',
'missingBundle',
Expand All @@ -59,6 +66,7 @@ export const ALLOWED_STATS_ACTIONS = [
'setChannel',
'getChannel',
'rateLimited',
'rate_limit_reached',
'disableAutoUpdate',
'keyMismatch',
'InvalidIp',
Expand All @@ -80,4 +88,7 @@ export const ALLOWED_STATS_ACTIONS = [
'webview_unclean_restart',
'webview_render_process_gone',
'webview_content_process_terminated',
'webview_dom_content_loaded',
'webview_page_loaded',
'set_next',
] as const satisfies readonly Database['public']['Enums']['stats_action'][]
22 changes: 22 additions & 0 deletions supabase/functions/_backend/utils/supabase.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4729,8 +4729,15 @@ export type Database = {
| "download_manifest_file_fail"
| "download_manifest_checksum_fail"
| "download_manifest_brotli_fail"
| "finish_download_fail"
| "manifest_path_fail"
| "backend_refusal"
| "download_0"
| "checksum_required"
| "insufficient_disk_space"
| "app_launch_start"
| "app_launch_ready"
| "app_launch_timeout"
| "disableProdBuild"
| "disableDevice"
| "disablePlatformElectron"
Expand All @@ -4749,6 +4756,10 @@ export type Database = {
| "webview_unclean_restart"
| "webview_render_process_gone"
| "webview_content_process_terminated"
| "webview_dom_content_loaded"
| "webview_page_loaded"
| "rate_limit_reached"
| "set_next"
stripe_status:
| "created"
| "succeeded"
Expand Down Expand Up @@ -4998,8 +5009,15 @@ export const Constants = {
"download_manifest_file_fail",
"download_manifest_checksum_fail",
"download_manifest_brotli_fail",
"finish_download_fail",
"manifest_path_fail",
"backend_refusal",
"download_0",
"checksum_required",
"insufficient_disk_space",
"app_launch_start",
"app_launch_ready",
"app_launch_timeout",
"disableProdBuild",
"disableDevice",
"disablePlatformElectron",
Expand All @@ -5018,6 +5036,10 @@ export const Constants = {
"webview_unclean_restart",
"webview_render_process_gone",
"webview_content_process_terminated",
"webview_dom_content_loaded",
"webview_page_loaded",
"rate_limit_reached",
"set_next",
],
stripe_status: [
"created",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'finish_download_fail';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'checksum_required';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'manifest_path_fail';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'rate_limit_reached';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'set_next';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'insufficient_disk_space';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'app_launch_start';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'app_launch_ready';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'app_launch_timeout';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'webview_dom_content_loaded';
ALTER TYPE public.stats_action ADD VALUE IF NOT EXISTS 'webview_page_loaded';
5 changes: 5 additions & 0 deletions tests/stats-actions.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ const HEALTH_STATS_ACTIONS = [
'app_killed_excessive_resource_usage',
'app_initialization_failure',
'app_memory_warning',
'app_launch_start',
'app_launch_ready',
'app_launch_timeout',
'webview_javascript_error',
'webview_unhandled_rejection',
'webview_resource_error',
'webview_security_policy_violation',
'webview_unclean_restart',
'webview_render_process_gone',
'webview_content_process_terminated',
'webview_dom_content_loaded',
'webview_page_loaded',
] as const

describe('stats action filters', () => {
Expand Down
Loading