Skip to content

Commit b2d1da6

Browse files
authored
Merge pull request #10871 from gitbutlerapp/copilot/add-feature-toggle-new-apply
Add apply3 feature flag toggle to Experimental settings
2 parents a5010be + 65c9c3f commit b2d1da6

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

apps/desktop/cypress/e2e/support/mock/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const MOCK_TELEMETRY_SETINGS: TelemetrySettings = {
1010
export const MOCK_FEATURE_FLAGS: FeatureFlags = {
1111
cv3: false,
1212
ws3: false,
13+
apply3: false,
1314
actions: false,
1415
butbot: false,
1516
rules: false,

apps/desktop/src/components/profileSettings/ExperimentalSettings.svelte

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@
5656
/>
5757
{/snippet}
5858
</SectionCard>
59+
<SectionCard labelFor="apply3" roundedTop={false} roundedBottom={false} orientation="row">
60+
{#snippet title()}
61+
New apply to workspace
62+
{/snippet}
63+
{#snippet caption()}
64+
Use the V3 version of apply and unapply operations for workspace changes.
65+
{/snippet}
66+
{#snippet actions()}
67+
<Toggle
68+
id="apply3"
69+
checked={$settingsStore?.featureFlags.apply3}
70+
onclick={() =>
71+
settingsService.updateFeatureFlags({ apply3: !$settingsStore?.featureFlags.apply3 })}
72+
/>
73+
{/snippet}
74+
</SectionCard>
5975
<SectionCard labelFor="rules" roundedTop={false} roundedBottom={false} orientation="row">
6076
{#snippet title()}
6177
Workspace Rules

apps/desktop/src/lib/config/appSettingsV2.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ export type FeatureFlags = {
190190
cv3: boolean;
191191
/** Enable the usage of the V3 workspace API */
192192
ws3: boolean;
193+
/** Use the V3 version of apply and unapply. */
194+
apply3: boolean;
193195
/** Enable the usage of GitButler Acitions. */
194196
actions: boolean;
195197
/** Enable the usage of butbot chat */

crates/but-settings/src/api.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub struct TelemetryUpdate {
1818
pub struct FeatureFlagsUpdate {
1919
pub cv3: Option<bool>,
2020
pub ws3: Option<bool>,
21+
pub apply3: Option<bool>,
2122
pub actions: Option<bool>,
2223
pub butbot: Option<bool>,
2324
pub rules: Option<bool>,
@@ -90,6 +91,7 @@ impl AppSettingsWithDiskSync {
9091
FeatureFlagsUpdate {
9192
cv3,
9293
ws3,
94+
apply3,
9395
actions,
9496
butbot,
9597
rules,
@@ -103,6 +105,9 @@ impl AppSettingsWithDiskSync {
103105
if let Some(ws3) = ws3 {
104106
settings.feature_flags.ws3 = ws3;
105107
}
108+
if let Some(apply3) = apply3 {
109+
settings.feature_flags.apply3 = apply3;
110+
}
106111
if let Some(actions) = actions {
107112
settings.feature_flags.actions = actions;
108113
}

0 commit comments

Comments
 (0)