Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Settings: Share product usage data is one more row of Experimental, below Mark pull requests (#1396)

Deee9492d517866
diff --git a/desktop/lib/measurement/setup_usage_choice.dart b/desktop/lib/measurement/setup_usage_choice.dart
index 748d04caf..a2555a0af 100644
--- a/desktop/lib/measurement/setup_usage_choice.dart
+++ b/desktop/lib/measurement/setup_usage_choice.dart
@@ -3,6 +3,12 @@ import 'package:flutter/material.dart';
import '../shared/widgets/setting_row.dart';
import 'product_measurement.dart';
+/// What sharing product usage data means, said the same wherever its switch is: Settings ▸ Experimental's row, signed
+/// in or not, and the web's Privacy page.
+const productUsageDetail =
+ 'Help improve Harness by sharing usage counts and duration statistics. '
+ 'Your prompts, code, files, and conversations are never included.';
+
/// Settings-only control for this computer before an account preference is known.
class SetupUsageChoice extends StatefulWidget {
const SetupUsageChoice({super.key, required this.measurement});
@@ -47,7 +53,7 @@ class _SetupUsageChoiceState extends State<SetupUsageChoice> {
listenable: widget.measurement,
builder: (context, _) => SettingRow(
title: 'Share product usage data',
- inlineControl: true,
+ detail: productUsageDetail,
controlSemanticLabel: 'Share product usage data',
control: Switch(
key: const ValueKey('product-usage-sharing'),
diff --git a/desktop/lib/settings/sections/experimental_section.dart b/desktop/lib/settings/sections/experimental_section.dart
index ca8598544..f06519e45 100644
--- a/desktop/lib/settings/sections/experimental_section.dart
+++ b/desktop/lib/settings/sections/experimental_section.dart
@@ -48,8 +48,6 @@ class _ExperimentalSectionState extends State<ExperimentalSection> {
crossAxisAlignment: CrossAxisAlignment.stretch,
spacing: 10,
children: [
- if (!kIsWeb && widget.notifier != null)
- ProductUsageSetting(notifier: widget.notifier!, compact: true),
if (!preferences.loaded ||
(preferences.error != null &&
preferences.errorFeature == null))
@@ -69,7 +67,7 @@ class _ExperimentalSectionState extends State<ExperimentalSection> {
),
],
),
- for (final feature in features)
+ for (final feature in features) ...[
SettingRow(
title: feature.label,
detail: feature.description,
@@ -85,7 +83,12 @@ class _ExperimentalSectionState extends State<ExperimentalSection> {
!preferences.saving &&
(preferences.isAvailable(feature) ||
preferences.enabled(feature))
- ? (on) => unawaited(preferences.set(feature, on != feature.inverted))
+ ? (on) => unawaited(
+ preferences.set(
+ feature,
+ on != feature.inverted,
+ ),
+ )
: null,
),
),
@@ -112,6 +115,16 @@ class _ExperimentalSectionState extends State<ExperimentalSection> {
)
: null,
),
+ // Product usage sharing is the account's, as the experiments are, and sits among them as one more row,
+ // after the agents' own pull request line (owner, 2026-10-17).
+ if (feature == ExperimentalFeature.agentPullRequestLine &&
+ !kIsWeb &&
+ widget.notifier != null)
+ ProductUsageSetting(
+ notifier: widget.notifier!,
+ compact: true,
+ ),
+ ],
],
),
),
diff --git a/desktop/lib/settings/sections/privacy_section.dart b/desktop/lib/settings/sections/privacy_section.dart
index 49c073279..8912a5040 100644
--- a/desktop/lib/settings/sections/privacy_section.dart
+++ b/desktop/lib/settings/sections/privacy_section.dart
@@ -152,9 +152,11 @@ class _ProductUsagePreferenceState extends State<ProductUsagePreference> {
@override
Widget build(BuildContext context) => widget.compact
+ // One row of Settings ▸ Experimental, drawn like the experiments around it: a title over one line of what it
+ // does. A bare title with its switch beside it, above the page, read as something apart (owner, 2026-10-17).
? SettingRow(
title: 'Share product usage data',
- inlineControl: true,
+ detail: productUsageDetail,
controlSemanticLabel: 'Share product usage data',
control: _control,
)
@@ -164,9 +166,7 @@ class _ProductUsagePreferenceState extends State<ProductUsagePreference> {
children: [
SettingRow(
title: 'Share product usage data',
- detail:
- 'Help improve Harness by sharing usage counts and duration statistics. '
- 'Your prompts, code, files, and conversations are never included.',
+ detail: productUsageDetail,
controlSemanticLabel: 'Share product usage data',
control: _control,
footer: const Text(
diff --git a/desktop/test/privacy_section_test.dart b/desktop/test/privacy_section_test.dart
index 0d2577697..98d12afae 100644
--- a/desktop/test/privacy_section_test.dart
+++ b/desktop/test/privacy_section_test.dart
@@ -36,7 +36,8 @@ void main() {
expect(find.text('See what’s shared'), findsNothing);
expect(find.text('How did your latest task go?'), findsNothing);
expect(find.text('Rate task outcome'), findsNothing);
- expect(find.textContaining('Help improve'), findsNothing);
+ // A row like Experimental's others: its one line of what it does, without the page's rating and receipts.
+ expect(find.textContaining('Help improve'), findsOneWidget);
await tester.tap(find.byType(Switch));
await tester.pumpAndSettle();
expect(find.byType(Switch), findsNothing);
diff --git a/desktop/test/settings_screen_test.dart b/desktop/test/settings_screen_test.dart
index 5f217ec0d..66de0d845 100644
--- a/desktop/test/settings_screen_test.dart
+++ b/desktop/test/settings_screen_test.dart
@@ -357,10 +357,9 @@ void main() {
),
);
semantics.dispose();
- // Search → matching nav row → usage sharing (Desktop) → creature.
+ // Search → matching nav row → creature: usage sharing is a row further down, below Mark pull requests.
await tester.sendKeyEvent(LogicalKeyboardKey.arrowDown);
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
- if (!kIsWeb) await tester.sendKeyEvent(LogicalKeyboardKey.tab);
await tester.pump();
await tester.sendKeyEvent(LogicalKeyboardKey.space);
await tester.pumpAndSettle();