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.

Merge branch 'main' into feat/web

Dev jacob69885faf39fd
diff --cc desktop/lib/settings/settings_body.dart
index b9179fb02,000000000..624c40446
mode 100644,000000..100644
--- a/desktop/lib/settings/settings_body.dart
+++ b/desktop/lib/settings/settings_body.dart
@@@ -1,55 -1,0 +1,61 @@@
+import 'package:flutter/material.dart';
+
+import '../state/app_state.dart';
+import 'experimental_features.dart';
+import 'sections/about_section.dart';
+import 'sections/account_section.dart';
+import 'sections/profiles_section.dart';
+import 'sections/debug_section.dart';
+import 'sections/devices_section.dart';
+import 'sections/experimental_section.dart';
+import 'sections/notifications_section.dart';
+import 'sections/shortcuts_section.dart';
- import 'sections/tracking_section.dart';
+import 'sections/usage_section.dart';
+import 'settings_section.dart';
+
+/// The screen behind a [SettingsSection].
+///
+/// Switch immediately, disposing the previous section instead of retaining it
+/// for a cross-fade while the new section starts its work.
+class SettingsBody extends StatelessWidget {
+ const SettingsBody({
+ super.key,
+ required this.section,
+ required this.notifier,
+ this.experimentalFeatures,
+ });
+
+ final SettingsSection section;
+ final AppNotifier notifier;
+ final ExperimentalFeaturesStore? experimentalFeatures;
+
+ @override
+ Widget build(BuildContext context) {
+ final screen = switch (section) {
+ SettingsSection.account => AccountSection(notifier: notifier),
+ SettingsSection.profiles => ProfilesSection(notifier: notifier),
+ SettingsSection.usage => const UsageSection(),
+ SettingsSection.customize => throw StateError(
+ 'Customization opens over the workspace.',
+ ),
+ SettingsSection.notifications => const NotificationsSection(),
+ SettingsSection.experimental => ExperimentalSection(
+ store: experimentalFeatures ?? notifier.experimentalFeatures,
+ controller: notifier.swarmSettings,
+ ),
- SettingsSection.devices => const DevicesSection(),
++ SettingsSection.devices => ListenableBuilder(
++ listenable: experimentalFeatures ?? notifier.experimentalFeatures,
++ builder: (context, _) => DevicesSection(
++ dial: notifier.dial,
++ onDeviceSettings: notifier.setDeviceSettings,
++ showCompanion: (experimentalFeatures ?? notifier.experimentalFeatures)
++ .enabled(ExperimentalFeature.focusBarCreature),
++ ),
++ ),
+ SettingsSection.shortcuts => const ShortcutsSection(),
+ SettingsSection.debug => const DebugSection(),
- SettingsSection.tracking => const TrackingSection(),
+ SettingsSection.about => AboutSection(notifier: notifier),
+ };
+ return KeyedSubtree(key: ValueKey(section), child: screen);
+ }
+}
diff --cc desktop/lib/settings/settings_screen.dart
index e17ab8630,4fe8dbda4..508f0d135
--- a/desktop/lib/settings/settings_screen.dart
+++ b/desktop/lib/settings/settings_screen.dart
@@@ -27,13 -33,9 +26,12 @@@ Future<void> showSettingsScreen
AppNotifier notifier, {
SettingsSection? initialSection,
ExperimentalFeaturesStore? experimentalFeatures,
- // Which door opened Settings — see [AnalyticsEvents.screenView]. `required`,
- // because a pane reachable several ways is close to meaningless as a bare
- // count.
+ // Which door opened Settings. No longer read since analytics was removed;
+ // kept so the callers need not change.
required String source,
+ // Narrower than this, the list and a section take turns on the screen (a
+ // phone). Desktop passes nothing: its window never gets that narrow.
+ double compactBelow = 0,
}) async {
if (initialSection == SettingsSection.customize) {
await showHarnessCustomizePane(context);
@@@ -146,9 -126,7 +134,8 @@@ class _SettingsScreenState extends Stat
Navigator.of(context).pop(target);
return;
}
+ if (_compact) setState(() => _sectionOpen = true);
if (target == _section) return;
- analytics.screenView(_screenName(target), source: 'rail');
setState(() => _section = target);
}