Commit fbdf9c3
committed
🤖 fix: non-React flows now respect PostHog experiment assignments
Previously, getSendOptionsFromStorage() (used by resume/creation flows) always
passed the localStorage default to the backend, which treated any non-undefined
value as an explicit user override for userOverridable experiments.
Fix: isExperimentEnabled() now returns undefined for userOverridable experiments
when user hasn't explicitly set a localStorage value. The backend already handles
undefined correctly by falling through to PostHog assignment.
Also addresses code review feedback:
- Move telemetryService property declaration to top of ExperimentsService class
- Add comment explaining the "undefined" string check in hasLocalOverride
- Add docstring for getRemoteExperimentEnabled and move near other helpers
- Document MUX_ENABLE_TELEMETRY_IN_DEV env var in Makefile
Change-Id: I15e5360f7461cd62ad347fbb2e32b0e8dc4b873d
Signed-off-by: Thomas Kosiewski <[email protected]>1 parent 83677f1 commit fbdf9c3
File tree
4 files changed
+40
-9
lines changed- src
- browser
- contexts
- hooks
- node/services
4 files changed
+40
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | | - | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | | - | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | | - | |
81 | | - | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | | - | |
| 24 | + | |
21 | 25 | | |
22 | | - | |
| 26 | + | |
23 | 27 | | |
24 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
25 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
64 | | - | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| |||
0 commit comments