Commit ca753bc
authored
[iOS][Feature Flags] Remove SAD flag for active and inactive users (#2681)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1206329551987282/task/1211866611125558?focus=true
Tech Design URL:
CC:
### Description
This PR removes two feature flags for SAD prompts:
**Active Users**
Commit:
60b2521
Feature Flag Task:
https://app.asana.com/1/137249556945/project/1206329551987282/task/1211866611125558?focus=true
**Inactive Users**
Commit:
208a41a
Feature Flag Task:
https://app.asana.com/1/137249556945/project/1206329551987282/task/1211866470962985?focus=true
Even though we use remote settings for the two prompts to function, the
settings are defined in the parent feature, so it is safe to remove the
subfeature from the codebase.
### Testing Steps
1. Put a breakpoint in `DefaultBrowserPromptFeatureFlagger.swift` ->
`private func getSettings(_ value: DefaultBrowserPromptFeatureSettings)
-> Int` line 102.
2. Open Debug Menu -> 'Default Browser Prompt’ and follow the
instructions to make SAD prompt appear.
3. Ensure that
`settingsProvider.defaultBrowserPromptFeatureSettings[value.rawValue]
as? Int` returns a value and it’s not nil.
### Impact and Risks
<!—
What's the impact on users if something goes wrong?
High: Could affect user privacy, lose user data, break core
functionality
Medium: Could disrupt specific features or user flows
Low: Minor visual changes, small bug fixes, improvement to existing
features
None: Internal tooling, documentation
—>
#### What could go wrong?
<!-- Describe specific scenarios and how you've addressed them —>
### Quality Considerations
<!—
Focus on what matters for your changes:
- What edge cases exist?
- How does this affect performance?
- What monitoring have you added?
- What documentation needs updating?
- How does this impact privacy/security?
—>
### Notes to Reviewer
<!-- Anything specific you want reviewers to focus on —>
—
###### Internal references:
[Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f) |
[Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552) |
[Tech Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Removes active/inactive scheduled default browser prompt feature flags
and gating, simplifying to use privacy-config settings only and updating
factory, logic, and tests accordingly.
>
> - **Feature flags/config**:
> - Remove iOS `FeatureFlag` cases `scheduledSetDefaultBrowserPrompts`
and `scheduledSetDefaultBrowserPromptsForInactiveUsers`, related
override/support lists, and source mappings in
`iOS/Core/FeatureFlag.swift`.
> - Remove iOS subfeatures from `SetAsDefaultAndAddToDockSubfeature` in
`PrivacyFeature.swift`.
> - **Default Browser Prompt (SAD) implementation**:
> - Simplify `DefaultBrowserPromptFeatureFlagAdapter` to only expose
`defaultBrowserPromptFeatureSettings` (no enablement booleans).
> - `DefaultBrowserPromptFactory` no longer accepts
`featureFlagProvider`; `DefaultBrowserPromptFeatureFlag` now constructed
with only `settingsProvider`.
> - Drop enablement checks in prompt deciders
(`DefaultBrowserPromptTypeDecider` active/inactive) and in
`DefaultBrowserPromptService.resume()`; always record activity.
> - Debug view: always shows settings and is enabled; remove
feature-enabled gating.
> - **SetDefaultBrowserCore**:
> - Delete active/inactive feature provider protocols; keep only
settings-driven `DefaultBrowserPromptFeatureFlagger` values.
> - **Tests**:
> - Remove tests/mocks for enablement booleans; update tests to use
settings-only paths and constructor changes.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f04cf27. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 1a510ad commit ca753bc
File tree
15 files changed
+8
-185
lines changed- iOS
- Core
- DuckDuckGoTests/DefaultBrowserPrompt
- DuckDuckGo
- AppServices
- DefaultBrowserPromptDebugView
- DefaultBrowserPrompt
- LocalPackages/SetDefaultBrowser
- Sources
- SetDefaultBrowserCore
- FeatureFlagger
- PromptDecider
- SetDefaultBrowserTestSupport
- SetDefaultBrowserUI/Factory
- Tests/SetDefaultBrowserTests
15 files changed
+8
-185
lines changedLines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | 470 | | |
477 | 471 | | |
478 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 157 | | |
164 | 158 | | |
165 | 159 | | |
| |||
318 | 312 | | |
319 | 313 | | |
320 | 314 | | |
321 | | - | |
322 | | - | |
323 | 315 | | |
324 | 316 | | |
325 | 317 | | |
| |||
488 | 480 | | |
489 | 481 | | |
490 | 482 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | 483 | | |
496 | 484 | | |
497 | 485 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 80 | | |
87 | 81 | | |
88 | 82 | | |
| |||
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 35 | | |
44 | 36 | | |
45 | 37 | | |
| |||
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 36 | + | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| |||
99 | 95 | | |
100 | 96 | | |
101 | 97 | | |
102 | | - | |
103 | 98 | | |
104 | 99 | | |
105 | 100 | | |
| |||
121 | 116 | | |
122 | 117 | | |
123 | 118 | | |
124 | | - | |
125 | 119 | | |
126 | 120 | | |
127 | 121 | | |
| |||
155 | 149 | | |
156 | 150 | | |
157 | 151 | | |
158 | | - | |
159 | 152 | | |
160 | 153 | | |
161 | 154 | | |
| |||
180 | 173 | | |
181 | 174 | | |
182 | 175 | | |
183 | | - | |
184 | 176 | | |
185 | 177 | | |
186 | 178 | | |
| |||
Lines changed: 0 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 31 | | |
58 | 32 | | |
59 | 33 | | |
| |||
Lines changed: 3 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 22 | | |
37 | 23 | | |
38 | 24 | | |
| |||
62 | 48 | | |
63 | 49 | | |
64 | 50 | | |
65 | | - | |
| 51 | + | |
66 | 52 | | |
67 | 53 | | |
68 | 54 | | |
| |||
71 | 57 | | |
72 | 58 | | |
73 | 59 | | |
74 | | - | |
| 60 | + | |
75 | 61 | | |
76 | 62 | | |
77 | 63 | | |
| |||
82 | 68 | | |
83 | 69 | | |
84 | 70 | | |
85 | | - | |
86 | 71 | | |
87 | | - | |
| 72 | + | |
88 | 73 | | |
89 | | - | |
90 | 74 | | |
91 | 75 | | |
92 | 76 | | |
93 | 77 | | |
94 | 78 | | |
95 | 79 | | |
96 | 80 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 81 | | |
106 | 82 | | |
107 | 83 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 45 | | |
52 | 46 | | |
53 | 47 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
| |||
Lines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
| |||
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 37 | | |
50 | 38 | | |
51 | 39 | | |
| |||
0 commit comments