about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-04-23 04:47:13 +0100
committerGitHub <noreply@github.com>2024-04-23 04:47:13 +0100
commit096725110a7b962ed913fad70cff01aba2bb37b7 (patch)
tree91f6c24265010624f8c88f4b51b1b85b979f6726 /src/lib
parent30c2c0510324ec3d9692365da8d0aab7975937d0 (diff)
downloadvoidsky-096725110a7b962ed913fad70cff01aba2bb37b7.tar.zst
[Statsig] Add test gates and events (#3659)
* [Statsig] Add test gates and events

* Better types
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/statsig/events.ts10
-rw-r--r--src/lib/statsig/gates.ts2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/statsig/events.ts b/src/lib/statsig/events.ts
index 4cc02a9b6..1cfdcbb6a 100644
--- a/src/lib/statsig/events.ts
+++ b/src/lib/statsig/events.ts
@@ -113,4 +113,14 @@ export type LogEvents = {
       | 'ProfileMenu'
       | 'ProfileHoverCard'
   }
+
+  'test:all:always': {}
+  'test:all:sometimes': {}
+  'test:all:boosted_by_gate1': {reason: 'base' | 'gate1'}
+  'test:all:boosted_by_gate2': {reason: 'base' | 'gate2'}
+  'test:all:boosted_by_both': {reason: 'base' | 'gate1' | 'gate2'}
+  'test:gate1:always': {}
+  'test:gate1:sometimes': {}
+  'test:gate2:always': {}
+  'test:gate2:sometimes': {}
 }
diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts
index 84183c1d9..765670aaf 100644
--- a/src/lib/statsig/gates.ts
+++ b/src/lib/statsig/gates.ts
@@ -6,4 +6,6 @@ export type Gate =
   | 'hide_vertical_scroll_indicators'
   | 'show_follow_back_label_v2'
   | 'start_session_with_following_v2'
+  | 'test_gate_1'
+  | 'test_gate_2'
   | 'use_new_suggestions_endpoint'